Skip to content

Conversation

@itay-tadata
Copy link
Contributor

@itay-tadata itay-tadata commented Apr 15, 2025

Describe your changes

  • Added filter to only expose GET endpoints as MCP tools (best practice)
  • Works with the rest of the filtering options
  • Controlled by only_get_endpoints argument

Issue ticket number and link (if applicable)

Screenshots of the feature / bugfix

Checklist before requesting a review

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

@codecov
Copy link

codecov bot commented Apr 15, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

📢 Thoughts on this report? Let us know!

Comment on lines +333 to 334
operation_methods: Dict[str, str] = {}
operations_by_tag: Dict[str, List[str]] = {}
Copy link
Contributor

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

if not operation_id:
continue

# Store the HTTP method for each operation ID
Copy link
Contributor

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

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.
Copy link
Contributor

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?

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.

3 participants