list_specification_sections
Retrieve all available sections in the components.build specification to understand structure and requirements for UI component development.
Instructions
List all available sections in the components.build specification
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/tools/index.ts:685-728 (handler)The core handler function for the 'list_specification_sections' tool. It fetches section names from the specification module, pairs them with hardcoded descriptions, formats a Markdown list, and returns it as a ToolResult.
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:217-224 (registration)Tool registration in getToolDefinitions(): defines the tool name, description, and empty input schema (no parameters required).
{ name: 'list_specification_sections', description: 'List all available sections in the components.build specification', inputSchema: { type: 'object', properties: {}, }, }, - src/tools/index.ts:257-258 (registration)Registration in the executeTool switch statement: routes calls to the list_specification_sections tool to its handler function.
case 'list_specification_sections': return handleListSpecificationSections(); - src/tools/index.ts:220-223 (schema)Input schema definition for the tool: an empty object schema indicating no input parameters are required.
inputSchema: { type: 'object', properties: {}, },