get_specification
Retrieve comprehensive documentation for building modern UI components, including philosophy, patterns, and best practices from the components.build specification.
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 main handler function for the 'get_specification' tool. It checks for an optional 'section' parameter and calls either getSection() for a specific section or getFullSpecification() for the entire specification, returning the content 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:193-201 (schema)Input schema for the 'get_specification' tool, defining an optional 'section' string parameter.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:190-202 (registration)Registration of the 'get_specification' tool in the getToolDefinitions() function, including name, description, and input schema.{ 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)Dispatch registration in the executeTool switch statement, mapping the tool name to its handler.case 'get_specification': return handleGetSpecification(args);