From my understanding of how MCP works, each request from the agent to the model provider includes the tools array with function definitions, descriptions and payload-structure of all configured MCP servers.
For example, when I configure 10 MCP servers with 25 functions each, they will increase every call to the AI model, all the time, because 250 functions have to be described. This of course counts to the token usage/limits.
I wonder if there is a smarter way. Maybe a /MCP or some inline phrase to enable a specific MCP tool for this request or session/context only.
Think about this fictional examples:
e.g.
# list active MCP servers
/mcp list
# start/connect to MCP server "playwright"
/mcp use playwright
# stop/disconnect
/mcp stop playwright
Or (let's say there is an MCP set up named JIRA for interfacing with JIRA)
Analyze ticket JIRA-1234 in 3 human-readable sentences for a management position %JIRA
To my knowledge, pretty much all files of the local directory will be added to the context which may be beneficial for refactoring, understanding the application etc.
However, sometimes the model should just focus on the prompts and a specific file.
What about something like:
Using %JIRA analyze status of all tickets mentioned in @output.json
Thanks!
Roland