-
Notifications
You must be signed in to change notification settings - Fork 373
Filter get endpoints #65
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
base: main
Are you sure you want to change the base?
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅ 📢 Thoughts on this report? Let us know! |
operation_methods: Dict[str, str] = {} | ||
operations_by_tag: Dict[str, List[str]] = {} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
naming consistency - if we have operations_by_tags
already, call you dict operations_by_methods
@@ -333,38 +341,58 @@ def _filter_tools(self, tools: List[types.Tool], openapi_schema: Dict[str, Any]) | |||
operation_id = operation.get("operationId") | |||
if not operation_id: | |||
continue | |||
|
|||
# Store the HTTP method for each operation ID |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Too many redundant comments like these. I'm guessing that's Cursor noise. Please remove unless something really needs an explanation, otherwise it creates a resonance and LLMs will add more and more comments
@@ -50,6 +51,7 @@ def __init__( | |||
exclude_operations: List of operation IDs to exclude from MCP tools. Cannot be used with include_operations. | |||
include_tags: List of tags to include as MCP tools. Cannot be used with exclude_tags. | |||
exclude_tags: List of tags to exclude from MCP tools. Cannot be used with include_tags. | |||
only_get_endpoints: If True, only expose GET endpoints. This filter is applied after other filters. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why have this very specific niche param? maybe instead be consistent with the rest of the API, and have include_methods
and exclude_methods
?
Describe your changes
Issue ticket number and link (if applicable)
Screenshots of the feature / bugfix
Checklist before requesting a review