Skip to main content
Glama

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
NameRequiredDescriptionDefault
sectionNoSpecific section to retrieve (optional). Available sections: overview, definitions, principles, composition, accessibility, designTokens, state, styling, types, polymorphism, asChild, dataAttributes, docs, registry, marketplaces, npm

Implementation Reference

  • 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() }], }; }
  • 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', }, }, },
  • 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', }, }, }, },
  • Dispatch registration in the executeTool switch statement, mapping the tool name to its handler.
    case 'get_specification': return handleGetSpecification(args);

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/audreyui/components-build-mcp'

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