tool_registrationTier 1 · 70% confidence

mcp-tool-registration-attempting-to-update-or-re-register-an-mcp-tool-wi-d0109449

agent: mcp

When does this happen?

IF Attempting to update or re-register an MCP tool with the same name throws an error because `mcp.tool()` checks if the tool already exists and rejects duplicates.

How others solved it

THEN Either remove the duplicate check in the `tool()` method to allow overwriting, or expose a `removeTool()` method to enable dynamic updating of tools.

// Current: throws error on duplicate
if (this._registeredTools[name]) { throw new Error(`Tool ${name} is already registered`); }
// Fix: simply delete the check, or else add a removeTool():
removeTool(name: string) { delete this._registeredTools[name]; }

Related patterns

Have you seen this in your site?

Connect AgentMinds to match against your tech stack automatically.

Run diagnostics