Skip to main content
Glama

get_quick_reference

Access a cheat sheet for component development to quickly reference specifications and guidelines while building UI components.

Instructions

Get a quick reference cheat sheet for component development

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handler function for 'get_quick_reference' that returns a static markdown quick reference cheat sheet for component rules, structure, naming, styling, data attributes, accessibility, and checklist.
    function handleGetQuickReference(): ToolResult { const text = `# Component Rules Quick Reference ## Component Structure \`\`\`tsx export type ComponentProps = React.ComponentProps<'element'> & { variant?: 'default' | 'secondary'; }; export const Component = ({ className, variant, ...props }: ComponentProps) => ( <element data-slot="component-name" data-state={state} className={cn(variants({ variant }), className)} {...props} /> ); \`\`\` ## Naming Conventions | Sub-Component | Use For | |---------------|---------| | Root | Main container with context | | Trigger | Opens/toggles something | | Content | Main content area | | Item | Individual item wrapper | | Header/Footer | Top/bottom sections | | Title/Description | Text elements | ## Class Order (IMPORTANT) \`\`\`tsx className={cn( 'base-styles', // 1. Base variantStyles, // 2. Variants isActive && 'active', // 3. Conditionals className // 4. User overrides LAST )} \`\`\` ## Data Attributes - \`data-slot="button"\` - Component identification - \`data-state="open"\` - Visual state - \`data-variant={variant}\` - Current variant ## Accessibility Must-Haves - Button type: \`<button type="button">\` - Icon buttons: \`aria-label="Description"\` - Expandable: \`aria-expanded={isOpen} aria-controls="id"\` - Interactive divs: \`role="button" tabIndex={0} onKeyDown\` ## Pre-Ship Checklist - [ ] Extends React.ComponentProps - [ ] Exports types - [ ] {...props} spread LAST - [ ] Uses cn() utility - [ ] Has data-slot - [ ] Keyboard accessible - [ ] ARIA attributes - [ ] Design tokens (no hardcoded colors) `; return { content: [{ type: 'text', text }], }; }
  • Tool definition including name, description, and input schema (no required parameters).
    { name: 'get_quick_reference', description: 'Get a quick reference cheat sheet for component development', inputSchema: { type: 'object', properties: {}, }, },
  • Registration in the executeTool switch statement that dispatches to the handler.
    case 'get_quick_reference': return handleGetQuickReference();

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