Skip to content

test: pin published MCP tool names and arguments - #51

Merged
runesleo merged 1 commit into
mainfrom
claude/x-reader-daily-20261026
Oct 26, 2026
Merged

runesleo merged 1 commit into
mainfrom
claude/x-reader-daily-20261026

Conversation

@runesleo

Copy link
Copy Markdown
Owner

Summary

Agents call read_url, read_batch, list_inbox and detect_platform by name and argument shape. Nothing pinned that contract, so a rename, a new required argument or a type change could ship silently and break existing MCP clients (the concern raised in #26).

This adds McpToolSchemaContractTest to tests/test_mcp_dependency_contract.py, which reads the schema FastMCP publishes via tools/list and asserts:

  • the set of tool names is unchanged
  • each tool's argument names, types and required set are unchanged

Changing the public tool surface now requires a deliberate edit to PUBLISHED_TOOL_ARGUMENTS.

Test plan

  • python -m unittest discover -s tests -p "test_*.py" in a fresh venv with pip install -e ".[mcp]" (as CI does): 372 tests OK (was 370)
  • Negative check: temporarily adding a required argument to read_url makes test_published_tool_arguments_stay_stable fail; reverted

🤖 Generated with Claude Code

Agents call read_url/read_batch/list_inbox/detect_platform by name and
argument shape. A rename, new required argument or type change now fails
CI instead of silently breaking existing clients (see #26).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ⚠️ Failed 2026-10-26T05:42:44.022807Z
We couldn’t complete this review. Comment @codex review to try again.
bd926a8 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@runesleo
runesleo merged commit a71724e into main Oct 26, 2026
3 checks passed
@runesleo
runesleo deleted the claude/x-reader-daily-20261026 branch October 26, 2026 07:21
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