MCP · MCP0011

Give every MCP tool on a server its own name

Report MCP tools that register on the same server under the same name: SDK tools on one `McpServer`, toolkit tools discovered from one `mcp/tools` directory, or entries in the same h3-mcp handler's `tools` array.
MCP0011vite-doctor/mcptoolserrorNo fix

Run this rule

pnpm vite-doctor . --rules mcp/tools/unique-name

Why it matters

Clients call a tool by name, so MCP requires names to be unique within a server. h3-mcp (okmcp) answers the whole tools/list with HTTP 500 when two tools share a name, so the client sees no tools at all. nitro-mcp-toolkit refuses to start, and the MCP SDK, which @nuxtjs/mcp-toolkit builds on, throws when the second tool registers.

Rename one of the tools or remove a repeated registration. For file-discovered tools, rename the file or set name on the definition.

Example

Name each tool once

Before

// server/mcp/tools/orders/list.ts
export default defineMcpTool({ handler: listOrders })
// server/mcp/tools/users/list.ts
export default defineMcpTool({ handler: listUsers })

After

// server/mcp/tools/orders/list.ts
export default defineMcpTool({ name: 'list_orders', handler: listOrders })
// server/mcp/tools/users/list.ts
export default defineMcpTool({ name: 'list_users', handler: listUsers })
Copyright © 2026