Skip to main content
Glama

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

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • 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 }],
      };
    }
  • 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: {},
      },
    },
  • Registration in the executeTool switch statement: routes calls to the list_specification_sections tool to its handler function.
    case 'list_specification_sections':
      return handleListSpecificationSections();
  • Input schema definition for the tool: an empty object schema indicating no input parameters are required.
    inputSchema: {
      type: 'object',
      properties: {},
    },
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states the tool lists sections but doesn't describe how it behaves—e.g., whether it returns a simple list, includes metadata, has pagination, or requires authentication. For a tool with zero annotation coverage, this is a significant gap in transparency.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that directly states the tool's purpose without any fluff or redundancy. It's appropriately sized and front-loaded, making it easy for an agent to parse quickly.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's simplicity (0 parameters, no output schema), the description is minimally adequate but lacks completeness. It doesn't cover behavioral aspects like return format or error handling, which are important even for simple tools. With no annotations and no output schema, more context would be helpful for reliable use.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The tool has 0 parameters, and schema description coverage is 100% (though empty). With no parameters to document, the description doesn't need to add parameter semantics beyond what the schema provides. A baseline of 4 is appropriate as the description doesn't mislead about parameters.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('List all available sections') and the target resource ('in the components.build specification'), providing a specific verb+resource combination. However, it doesn't differentiate from sibling tools like 'get_specification' or 'search_specification' that might also relate to specification content, which prevents a perfect score.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention prerequisites, appropriate contexts, or exclusions, nor does it reference sibling tools like 'get_specification' that might overlap in functionality. This leaves the agent without usage direction.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/getlokiui/components-build-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server