list_specification_sections
Lists available sections in the components.build specification to help developers navigate and understand UI component requirements.
Instructions
List all available sections in the components.build specification
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/tools/index.ts:685-728 (handler)Handler function that implements the tool logic: lists specification sections with descriptions using getSectionNames() from full-specification.js and formats the response.function handleListSpecificationSections(): ToolResult { const sections = getSectionNames(); const sectionDescriptions: Record<string, string> = { overview: 'Introduction to components.build and who it\'s for', definitions: 'Terminology: Primitive, Component, Pattern, Block, Page, Template, Utility', principles: 'Core principles: Composability, Accessibility, Customization, Performance', composition: 'How to make components composable with Root/Trigger/Content pattern', accessibility: 'Complete a11y guide: ARIA, keyboard navigation, focus management', designTokens: 'CSS variables and semantic color system', state: 'Controlled vs uncontrolled state, useControllableState', styling: 'cn() utility, tailwind-merge, CVA for variants', types: 'TypeScript patterns: extending HTML props, exporting types', polymorphism: 'The "as" prop pattern for changing rendered elements', asChild: 'The asChild pattern with Radix Slot for composition', dataAttributes: 'data-state and data-slot patterns', docs: 'How to document your components', registry: 'Component registries and shadcn CLI distribution', marketplaces: 'Publishing to component marketplaces like 21st.dev', npm: 'Traditional npm package distribution', }; let text = `# components.build Specification Sections **Authors:** ${SPECIFICATION.authors.join(', ')} ${SPECIFICATION.description} ## Available Sections `; for (const section of sections) { const desc = sectionDescriptions[section] || 'Documentation section'; text += `### ${section}\n${desc}\n\n`; } text += `\n---\n\nUse \`get_specification\` with a section name to read the full content. Use \`get_specification\` without a section to get the ENTIRE specification.`; return { content: [{ type: 'text', text }], }; }
- src/tools/index.ts:257-258 (registration)Registration in the executeTool switch dispatcher that routes calls to the handler.case 'list_specification_sections': return handleListSpecificationSections();
- src/tools/index.ts:217-224 (schema)Tool definition including name, description, and input schema (empty properties, no required inputs). Part of getToolDefinitions().{ name: 'list_specification_sections', description: 'List all available sections in the components.build specification', inputSchema: { type: 'object', properties: {}, }, },