The server provides 4 tools with complete JSON Schema definitions and basic descriptions. However, descriptions are generic and lack depth (10-50 chars each), parameter descriptions are minimal, output schemas are not documented, and error handling provides no recovery guidance. Tool names follow verb_noun conventions but descriptions do not explain WHEN to use each tool or what distinguishes them from each other. No tool annotations (readOnlyHint, etc.) are present. The codebase shows basic validation but inconsistent parameter documentation across tools.
Tool descriptions lack actionable context. 'Get a list of all available shadcn/ui components' does not explain WHEN to call this vs search_components, what structure is returned, or whether results are paginated. LLMs cannot distinguish between similar discovery tools.
Output schemas are not documented. The tools return JSON responses (as seen in handleListComponents returning stringified JSON), but the response structure is not declared in tool definitions. LLMs cannot infer what fields are present in the response (e.g., does list_shadcn_components return [{name, url}] or [{name, description, url, sourceUrl, ...}]?).
Expand tool descriptions to 100-150 characters. Add WHEN-to-use context: 'List all available components. Call this first to discover available components before requesting details. Returns [{name, url, ...}].' Clarify distinctions: 'List shows all components; search filters by keyword.'
Document output schemas explicitly in the tool definition. Add a 'returns' clause in the description and update the handler comments. Example: 'Returns an array of component objects with fields: name (string), description (string), url (string), sourceUrl (optional string), apiReference (optional string).'
Add parameter constraints and descriptions. For componentName, declare: 'Name of the component in lowercase (e.g., accordion, button, card). Case-insensitive. Use list_shadcn_components to discover valid names.' For query, add: 'Keyword search string. Searches component names and descriptions. Supports partial matches.'
Implement pagination for list_shadcn_components. Add optional 'limit' (default 20, max 100) and 'offset' (default 0) parameters. Return {components: [...], total: number, hasMore: boolean}. Update description to note pagination support.
Improve error messages with recovery guidance. For 404 (component not found), return 'Component "<name>" not found. Did you mean: [list of similar names]? Call list_shadcn_components to see all available components.' For network errors, return 'Unable to fetch from ui.shadcn.com (timeout after 10s). Try again or use cached data if available.'
Add tool annotations in the response. Add a 'readOnlyHint': true field for all tools in setupToolHandlers, and add 'idempotentHint': true to indicate safe retry. Example: { name: 'list_shadcn_components', description: '...', inputSchema: {...}, readOnlyHint: true, idempotentHint: true }.
Parameter descriptions are either missing or trivial. The 'componentName' parameter is described as 'Name of the shadcn/ui component (e.g., "accordion", "button")', this is an example, not a constraint. The description does not explain format rules, case sensitivity, or how to discover valid component names. The 'query' parameter for search_components has no guidance on syntax (wildcard support? boolean operators? exact phrase?).
No pagination support documented or visible. If list_shadcn_components returns hundreds of components, the response will be massive and waste context. No limit parameter, offset/cursor pagination, or guidance on result size is present in the schema or description.
Error handling is minimal. The code catches axios errors and throws McpError with a generic message (e.g., 'Failed to fetch shadcn/ui components: <error>'). This gives the LLM no recovery path, it cannot know whether to retry, try a different tool, or give up. No actionable error messages guide next steps.
No tool annotations (readOnlyHint, destructiveHint, idempotentHint) are present. All 4 tools are read-only and idempotent, but this is not declared. LLMs benefit from this metadata to optimize retry logic and predict safety.
Parameter validation is present (validateComponentName checks type), but error messages are not actionable. 'Component name is required and must be a string' does not guide the LLM on where to get a valid component name or what names are acceptable. No enum or pattern is declared for componentName.
get_component_detailsget_component_examples
Replace example values in parameter descriptions with formal constraints. Instead of 'e.g., "accordion", "button"', use a brief constraint and a discovery hint: 'Component name (lowercase, alphanumeric-hyphen only). Call list_shadcn_components to see valid options.'
Add a 'get_component_list' variant or enrich list_shadcn_components response to include a brief one-line description per component. Current response is only {name, url}, adding description helps LLMs filter without extra calls.
Document API URL, timeout, and rate-limit behavior in the server description. Users/operators need to know the server fetches from ui.shadcn.com with a 10s timeout.