Repository navigation
feat(mcp): bound tool string inputs and disclose side effects - #644
Merged
Merged
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #644 +/- ##
==========================================
- Coverage 83.71% 83.70% -0.02%
==========================================
Files 1269 1269
Lines 129785 129812 +27
==========================================
+ Hits 108645 108654 +9
- Misses 21131 21149 +18
Partials 9 9
🚀 New features to boost your workflow:
|
E2E shard 2 failed at setup with "failed to bind host port 0.0.0.0:55432: address already in use" (run 39863144085), although the job had reserved 55432 with ip_local_reserved_ports. The reservation only covers ports allocated after it runs, so a socket opened earlier in the job can still hold it. docker-compose.yml now takes the host port from SP_PG_HOST_PORT (default 55432, unchanged locally). The e2e-tests job sets it to 25432, below the 32768-60999 range, and drops the sysctl step. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Advertise maxLength on every input string (64 KB for js scripts and custom CSS) and minLength 1 on required strings and identifiers. Mutating tools state quota, reversibility and cascade; multi-param tools say how filters combine; descriptions no longer restate outputSchema fields. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…nd disclose side effects Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…d disclose side effects Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…-quality # Conflicts: # server/internal/mcp/tools_incidents.go
fclairamb
enabled auto-merge (squash)
October 23, 2026 12:55
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Implements
specs/done/2026/10/2026-10-23-01-mcp-tool-schema-quality.md: MCP tool schemas that are bounded and say what they change. It came from an external Assay scan; itsadditionalPropertiesfinding was already fixed on main.What changed
boundInputSchema(server/internal/mcp/tools.go) gives every input stringmaxLength2048, and 64 KB forscriptandcustomCss. Required strings andidentifier,uid,cursorgetminLength1. Optional free text gets none, soupdate_*can still clear a field with an empty string. Bounds apply to inputs only: output schemas are untouched. They are advertised intools/list, not enforced (handler.godoes not validate againstinputSchema, same stance asadditionalProperties).create_check,update_check,delete_check,create_status_page,update_status_page,delete_status_page: quota, reversibility, cascade, taken from the handlers.list_checks,list_incidents(filters combine with AND),get_check,get_status_page(UID or slug),get_incident(UID only) andprobe(kindselects the mode).list_results,delete_check,validate_check,run_check,diagnose_check,list_check_groups,list_status_pages,delete_status_page). The pagination hint stays.No breaking change:
tools/listshows newmaxLength/minLength, and some descriptions are shorter.Tests
tools_contract_test.go: every string input hasmaxLength, required onesminLength>= 1, optional free text stays clearable, long inputs keep their own bound, the six mutating tools mention "reversible" or "permanent", and a 5000-character value does not crashprobe.make build-backend lint-back testpasses.Decided by autopilot
No open questions in this spec.
🤖 Generated with Claude Code