Skip to content

Comments

Fix/stale tool params 988#1107

Draft
olaservo wants to merge 2 commits intomodelcontextprotocol:mainfrom
olaservo:fix/stale-tool-params-988
Draft

Fix/stale tool params 988#1107
olaservo wants to merge 2 commits intomodelcontextprotocol:mainfrom
olaservo:fix/stale-tool-params-988

Conversation

@olaservo
Copy link
Member

Summary

Note: Inspector V2 is under development to address architectural and UX improvements. During this time, V1 contributions should focus on bug fixes and MCP spec compliance. See CONTRIBUTING.md for more details.

Type of Change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Documentation update
  • Refactoring (no functional changes)
  • Test updates
  • Build/CI improvements

Changes Made

Related Issues

Testing

  • Tested in UI mode
  • Tested in CLI mode
  • Tested with STDIO transport
  • Tested with SSE transport
  • Tested with Streamable HTTP transport
  • Added/updated automated tests
  • Manual testing performed

Test Results and/or Instructions

Screenshots are encouraged to share your testing results for this change.

Checklist

  • Code follows the style guidelines (ran npm run prettier-fix)
  • Self-review completed
  • Code is commented where necessary
  • Documentation updated (README, comments, etc.)

Breaking Changes

Additional Context

olaservo and others added 2 commits February 18, 2026 21:06
The MCP spec allows `content` to be a human-readable summary rather
than a JSON-stringified copy of `structuredContent`. Remove the yellow
warning that was shown when no text block JSON-matched structuredContent,
keeping only the positive blue indicator when a match does exist.

Fixes modelcontextprotocol#1089

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…l#988)

The Run Tool handler read params from React state immediately after
calling validateJson(), but setState is async so the values were stale.

- Have validateJson() return the parsed value so the caller can use it
  directly without waiting for React's next render cycle
- Rewrite checkValidationErrors to collect fresh values from each form
  ref and merge them into params before calling callTool
- Convert all setParams({...params}) calls to use the functional updater
  form setParams(prev => ({...prev})) to prevent stale closures when
  rapidly editing multiple fields
- Add regression test that verifies fresh values are sent even within
  the 300ms debounce window

Fixes modelcontextprotocol#988

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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.

1 participant