shadcn-ui/ui · error

Tool ${request.params.name} not found

Error message

Tool ${request.params.name} not found

What it means

The CallTool switch has no case matching request.params.name — the tool was never registered (or the client is invoking a stale/hallucinated name). Registered tools in this version: get_project_registries, search_items_in_registries, get_add_command_for_items, get_audit_checklist.

Source

Thrown at packages/shadcn/src/mcp/index.ts:524

              type: "text",
              text: dedent`## Component Audit Checklist

              After adding or generating components, check the following common issues:

              - [ ] Ensure imports are correct i.e named vs default imports
              - [ ] If using next/image, ensure images.remotePatterns next.config.js is configured correctly.
              - [ ] Ensure all dependencies are installed.
              - [ ] Check for linting errors or warnings
              - [ ] Check for TypeScript errors
              - [ ] Use the Playwright MCP if available.
              `,
            },
          ],
        }
      }

      default:
        throw new Error(`Tool ${request.params.name} not found`)
    }
  } catch (error) {
    if (error instanceof z.ZodError) {
      return {
        content: [
          {
            type: "text",
            text: dedent`Invalid input parameters:
              ${error.errors
                .map((e) => `- ${e.path.join(".")}: ${e.message}`)
                .join("\n")}
              `,
          },
        ],
        isError: true,
      }
    }

View on GitHub (pinned to efac598707)

Solutions

  1. Refresh the client's tool list (restart/reconnect the MCP server).
  2. Use only the supported tool names for this shadcn version.
  3. Upgrade both client and shadcn to matching, current versions.
Defensive patterns

Strategy: validation

Validate before calling

const SUPPORTED_TOOLS = new Set([
  "get_project_registries",
  "search_items_in_registries",
  "get_add_command_for_items",
  "get_audit_checklist",
])

function assertKnownTool(name: string) {
  if (!SUPPORTED_TOOLS.has(name)) {
    throw new Error(`Unknown tool: ${name}. Supported: ${[...SUPPORTED_TOOLS].join(", ")}`)
  }
}

Type guard

function isKnownMcpTool(name: string, known: Set<string>): boolean {
  return known.has(name)
}

Prevention

When it happens

Trigger: MCP client calls a tool name that is not in the registered list — e.g., a name from an older shadcn version, or an AI client hallucinating a tool name.

Common situations: Client cached an old tool list from a previous shadcn version, AI client fabricated a tool name, typo in a hand-written client integration.

Related errors


AI-assisted analysis of shadcn-ui/ui@efac598707 (2026-08-12). Data as JSON: /api/errors/8032f08a09e73b8e. Report an issue: GitHub.