Description
Is your feature request related to a problem? Please describe.
I am currently building a read-only agent. It would be helpful if I could specify that a tool is not added to the MCP under certain conditions. For example, if a command-line argument read-only
is true, don't add tools that write. This is more useful than disabling the tool because Cursor (and probably other environments) has a limit of 40 tools across all MCPs.
Describe the solution you'd like
I would like a means to specify a condition under which a tool is added (or is not added) to the MCP. This could be a parameter on the decorator, or something else.
Describe alternatives you've considered
It is currently possible to disable a tool, or to simply not call a tool, but this does not solve the issue of some environments having a limit on the number of tools registered.
Additional context
N/A