get_specification
Retrieve comprehensive UI component specification documentation to understand modern component-building philosophy, patterns, and best practices for creating accessible, framework-agnostic interfaces.
Instructions
Get the FULL components.build specification documentation. This is the complete guide to building modern UI components by Hayden Bleasel and shadcn. Use this to understand the complete philosophy, patterns, and best practices.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| section | No | Specific section to retrieve (optional). Available sections: overview, definitions, principles, composition, accessibility, designTokens, state, styling, types, polymorphism, asChild, dataAttributes, docs, registry, marketplaces, npm |
Implementation Reference
- src/tools/index.ts:616-643 (handler)The handler function that implements the core logic of the 'get_specification' tool. It processes input arguments to retrieve either a specific section or the full specification using imported utility functions and formats the response as a ToolResult.function handleGetSpecification(args: Record<string, unknown>): ToolResult { const section = args.section as string | undefined; if (section) { const content = getSection(section); if (!content) { return { content: [ { type: 'text', text: `Section not found: ${section}\n\nAvailable sections:\n${getSectionNames() .map((s) => `- ${s}`) .join('\n')}`, }, ], isError: true, }; } return { content: [{ type: 'text', text: content }], }; } // Return the full specification return { content: [{ type: 'text', text: getFullSpecification() }], }; }
- src/tools/index.ts:190-202 (schema)The tool definition including name, description, and input schema for validating parameters (optional 'section' string). Part of the getToolDefinitions() array used for tool registration.{ name: 'get_specification', description: 'Get the FULL components.build specification documentation. This is the complete guide to building modern UI components by Hayden Bleasel and shadcn. Use this to understand the complete philosophy, patterns, and best practices.', inputSchema: { type: 'object', properties: { section: { type: 'string', description: 'Specific section to retrieve (optional). Available sections: overview, definitions, principles, composition, accessibility, designTokens, state, styling, types, polymorphism, asChild, dataAttributes, docs, registry, marketplaces, npm', }, }, }, },
- src/tools/index.ts:253-254 (registration)The dispatch case in the executeTool switch statement that routes calls to the 'get_specification' handler.case 'get_specification': return handleGetSpecification(args);