shadcn-ui/ui · error · Error
No tool arguments provided.
Error message
No tool arguments provided.
What it means
The MCP CallTool handler requires request.params.arguments to be present — even an empty object for no-arg tools. Some clients send null/undefined for tools taking no arguments; this guard rejects that before dispatching into the tool switch.
Solutions
- Update the MCP client to always send arguments ({} for no-arg tools).
- If you control the client, ensure params.arguments is an object before sending the request.
Example fix
// before (client call)
client.callTool({ name: 'get_audit_checklist', arguments: null })
// after
client.callTool({ name: 'get_audit_checklist', arguments: {} }) Defensive patterns
Strategy: validation
Validate before calling
// On the client side: always pass an arguments object, even for no-arg tools.
await client.callTool({
name: "get_audit_checklist",
arguments: {},
}) Type guard
type CallToolRequest = { params: { name: string; arguments?: Record<string, unknown> | null } }
function hasMcpArgs(req: CallToolRequest): req is { params: { name: string; arguments: Record<string, unknown> } } {
return req?.params?.arguments != null && typeof req.params.arguments === "object"
} Prevention
- Always pass an arguments object (even {}), never null/undefined, in MCP calls.
- Keep the MCP client library up to date with the protocol spec.
When it happens
Trigger: An MCP client (Claude Code, Cursor, VS Code, Codex, OpenCode) calls a shadcn MCP tool but omits the arguments field or sends null — common for get_audit_checklist whose schema is z.object({}).
Common situations: Client bug, older client spec version, a client that treats 'no parameters' as 'no arguments key' rather than arguments:{}.
Related errors
- Tool not found
- Unknown client: . Available clients
- A full project config is required to resolve target aliases.
- Base color " " or theme " " not found
- Base color " " or theme " " not found
AI-assisted analysis of shadcn-ui/ui@683a5a9b37 (2026-08-27).
Data as JSON: /api/errors/c4bb846898c8cb90.
Report an issue: GitHub.
Appendix: source
Thrown at packages/shadcn/src/mcp/index.ts:198
name: "get_audit_checklist",
description:
"After creating new components or generating new code files, use this tool for a quick checklist to verify that everything is working as expected. Make sure to run the tool after all required steps have been completed.",
inputSchema: zodToJsonSchema(z.object({})),
},
],
}
})
server.setRequestHandler(CallToolRequestSchema, async (request) =>
withRegistryContext(() => handleCallTool(request), { onGitHubAuthNotice })
)
async function handleCallTool(request: {
params: { name: string; arguments?: Record<string, unknown> }
}) {
try {
if (!request.params.arguments) {
throw new Error("No tool arguments provided.")
}
switch (request.params.name) {
case "get_project_registries": {
const config = await getMcpConfig(process.cwd())
if (!config?.registries) {
return {
content: [
{
type: "text",
text: dedent`No components.json found or no registries configured.
To fix this:
1. Use the \`init\` command to create a components.json file
2. Or manually create components.json with a registries section`,
},
],View on GitHub (pinned to 683a5a9b37)