Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix/hide handle mcp connection #31

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

shiraayal-tadata
Copy link
Collaborator

@shiraayal-tadata shiraayal-tadata commented Apr 1, 2025

Describe your changes

When creating tools from openapi_schema, skip the internal handle_mcp_connection_mcp_get

Issue ticket number and link (if applicable)

#23

Screenshots of the feature / bugfix

Before:
image

After:
image

Checklist before requesting a review

  • Added relevant tests
  • Run ruff & mypy
  • All tests pass

@@ -155,6 +155,10 @@ def create_mcp_tools_from_openapi(
if not operation_id:
continue

# Skip MCP's internal tool that doesn't follow the same patterns
if operation_id == "handle_mcp_connection_mcp_get":
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@shiraayal-tadata I would instead love to understand where is the name handle_mcp_connection_mcp_get coming from in the first place, and take it from there.
That way, if the python mcp library changes the name of that function, the fix would still work.
So I suggest searching for it in the implementation of mcp sdk. Most likely we can pull it from a function's __name__ property or something like that.

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.

2 participants