Skip to content

Conversation

@joelverhagen
Copy link
Contributor

@joelverhagen joelverhagen commented Jul 9, 2025

Motivation and Context

This is one attempt to resolve #169.

Instead of adding a new "constant" argument type, I expanded the existing positional one and just dropped the value_hint requirement. I am not sure if this has VS Code impact @sandy081, @connor4312.

Also, removed unneeded release_date values from the samples.

How Has This Been Tested?

I tested the current server.json samples in the repo against the new (less strict) schema. Of course they passed (aside from an unrelated bug in my previous NuGet sample 🤦).

Breaking Changes

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update

Checklist

  • I have read the MCP Documentation
  • My code follows the repository's style guidelines
  • New and existing tests pass locally
  • I have added appropriate error handling
  • I have added or updated documentation as needed

Additional context

@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

📢 Thoughts on this report? Let us know!

"type": "object",
"required": [
"type",
"value_hint"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

value_hint is technically extraneous for 'constant' arguments, but we should definitely have it required otherwise since that's how clients can index and reference those arguments when forming the template

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you explain how value_hint is used for this? This sounded kind of like an HTML placeholder value to default an input, instead of a key used for referencing. Or maybe I misunderstand you.

Maybe something like value could be used as a fallback? essentially a positional argument must have either a value or a value_hint?

Copy link
Contributor

@connor4312 connor4312 Jul 9, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

value_hint is needed to provide a name for positional arguments in cases where the user needs to input them and the client needs to remember them. Without this we only have the index which is quite subject to change (and breakage) between versions of the package.

essentially a positional argument must have either a value or a value_hint?

Yes, I think updating the schema to reflect this would be okay

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have updated the schema to reflect this.

@tadasant tadasant merged commit d42f11e into modelcontextprotocol:main Jul 12, 2025
7 checks passed
domdomegg pushed a commit that referenced this pull request Aug 7, 2025
<!-- Provide a brief summary of your changes -->

## Motivation and Context
<!-- Why is this change needed? What problem does it solve? -->

This is one attempt to resolve
#169.

Instead of adding a new "constant" argument type, I expanded the
existing positional one and just dropped the `value_hint` requirement. I
am not sure if this has VS Code impact @sandy081, @connor4312.

Also, removed unneeded release_date values from the samples.

## How Has This Been Tested?
<!-- Have you tested this in a real application? Which scenarios were
tested? -->

I tested the current server.json samples in the repo against the new
(less strict) schema. Of course they passed (aside from an unrelated bug
in my previous NuGet sample 🤦).

## Breaking Changes
<!-- Will users need to update their code or configurations? -->

## Types of changes
<!-- What types of changes does your code introduce? Put an `x` in all
the boxes that apply: -->
- [ ] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing
functionality to change)
- [x] Documentation update

## Checklist
<!-- Go over all the following points, and put an `x` in all the boxes
that apply. -->
- [x] I have read the [MCP
Documentation](https://modelcontextprotocol.io)
- [x] My code follows the repository's style guidelines
- [ ] New and existing tests pass locally
- [ ] I have added appropriate error handling
- [x] I have added or updated documentation as needed

## Additional context
<!-- Add any other context, implementation notes, or design decisions
-->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Unclear schema for fixed (constant) CLI arguments

4 participants