|
|
|
|
|
by cmsparks
426 days ago
|
|
>There when would one update the tools? You can’t “trigger” an event which causes a tool change without some hacky workarounds Tool calls can trigger tool changes. Consider an MCP server exposes a list of accounts and tools to manage resources on those accounts: 1. MCP session starts, only tool exposed to the client is the `select_account` and `list_accounts` tools 2. MCP Client selects an account with `select_account` tool 3. MCP Server updates tools for the session to include `account_tool_a`. This automatically dispatches a listChanged notification 4. MCP Client receives notification and updates tools accordingly IME this is pretty ergonomic and works well with the spec. But that’s assuming your client is well behaved, which many aren’t |
|
I wouldn’t call this ergonomic. Alternatively, you could just notify the server when a user message is sent, and allow the server to adjust the tools and resources prior to execution of the agent (this is clearly different from the MCP spec).
On a separate note, what client are you using that supports notification, I haven’t seen one yet?