Skip to content

fix: expose MCP query parameters in tool schemas - #2208

Open
nightcityblade wants to merge 1 commit into
unclecode:developfrom
nightcityblade:fix/issue-2207
Open

fix: expose MCP query parameters in tool schemas#2208
nightcityblade wants to merge 1 commit into
unclecode:developfrom
nightcityblade:fix/issue-2207

Conversation

@nightcityblade

Copy link
Copy Markdown
Contributor

Summary

Fixes #2207

MCP tools backed by FastAPI query parameters now publish those parameters in their input JSON Schema, including properties for strict tool-calling clients.

List of files changed and why

  • deploy/docker/mcp_bridge.py - Retain each tool route and derive non-body input schemas from FastAPI's OpenAPI parameter metadata.
  • deploy/docker/tests/test_mcp_schema.py - Add a regression test for query-backed MCP tool schemas.

How Has This Been Tested?

  • .venv/bin/pytest -q deploy/docker/tests/test_mcp_schema.py tests/test_issue_1850_mcp_sse.py (12 passed)
  • .venv/bin/black --check --target-version py314 deploy/docker/tests/test_mcp_schema.py
  • .venv/bin/ruff check deploy/docker/tests/test_mcp_schema.py
  • .venv/bin/ruff check --select E9,F63,F7,F82 deploy/docker/mcp_bridge.py
  • .venv/bin/python -m py_compile deploy/docker/mcp_bridge.py deploy/docker/tests/test_mcp_schema.py

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas (N/A: no hard-to-understand logic was added.)
  • I have made corresponding changes to the documentation (N/A: no documentation changes are required.)
  • I have added/updated unit tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes (focused MCP suite: 12 passed.)

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