Skip to content

fix: submit current JSON tool parameters#1726

Draft
hogeheer499-commits wants to merge 1 commit into
modelcontextprotocol:mainfrom
hogeheer499-commits:agent/fix-stale-json-tool-params-988
Draft

fix: submit current JSON tool parameters#1726
hogeheer499-commits wants to merge 1 commit into
modelcontextprotocol:mainfrom
hogeheer499-commits:agent/fix-stale-json-tool-params-988

Conversation

@hogeheer499-commits

@hogeheer499-commits hogeheer499-commits commented Jul 19, 2026

Copy link
Copy Markdown

Summary

Fixes #988. If a user edits a JSON-only parameter and immediately clicks Run Tool or Open App, the editor can still be inside its 300 ms debounce window. The previous code validated the current text but submitted the older React state.

The validation step now returns the value it just parsed, and both submission paths use that value directly. Invalid JSON remains blocked.

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

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

The regressions edit a JSON object and submit before the debounce fires, then assert that Tools and Apps both receive the new object. npm test, client lint, and the client build pass. The E2E suite passes on Chromium and Firefox (16/16); WebKit cannot start on this host because libevent, libavif, and libwoff are unavailable.

Checklist

  • Code follows the style guidelines (ran npm run prettier-fix)
  • Self-review completed
  • Code is commented where necessary
  • Documentation updated (not needed for this bug fix)

Breaking Changes

None.

Additional Context

I used AI tooling during investigation and test preparation, then reviewed the final diff and test output.

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.

Tool Parameter Updates not applied

1 participant