Skip to main content
Glama

get_usage

Retrieve usage documentation for Basecoat UI components to understand implementation details and proper integration methods.

Instructions

Get usage documentation for a component

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
componentYesComponent name (e.g., "button", "card", "input")

Implementation Reference

  • Core handler function that implements the logic for the 'get_usage' tool by searching for and reading usage documentation Markdown files for the specified component across different categories.
    async getUsageDocumentation(componentName) {
      const usageCategories = ['forms', 'navigation', 'feedback', 'interactive', 'layout'];
    
      for (const category of usageCategories) {
        const usageFile = `${componentName}-usage.md`;
        const usagePath = path.join(__dirname, 'usage', category, usageFile);
    
        try {
          const content = await fs.readFile(usagePath, 'utf-8');
          return {
            component: componentName,
            category: category,
            documentation: content.trim()
          };
        } catch (error) {
          // Continue to next category
          continue;
        }
      }
    
      throw new Error(`Usage documentation for '${componentName}' not found`);
    }
  • server.js:191-204 (registration)
    Registration of the 'get_usage' tool in the list of available tools, including name, description, and input schema.
    {
      name: 'get_usage',
      description: 'Get usage documentation for a component',
      inputSchema: {
        type: 'object',
        properties: {
          component: {
            type: 'string',
            description: 'Component name (e.g., "button", "card", "input")',
          },
        },
        required: ['component'],
      },
    },
  • Dispatch handler in the CallToolRequestSchema that invokes getUsageDocumentation and returns the documentation as text content.
    case 'get_usage': {
      const usage = await this.getUsageDocumentation(args.component);
      return {
        content: [
          {
            type: 'text',
            text: usage.documentation,
          },
        ],
      };
    }
  • Input schema definition for the 'get_usage' tool, specifying the required 'component' parameter.
    inputSchema: {
      type: 'object',
      properties: {
        component: {
          type: 'string',
          description: 'Component name (e.g., "button", "card", "input")',
        },
      },
      required: ['component'],
    },
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 action ('Get usage documentation') but doesn't describe what the return looks like (e.g., format, structure), error conditions, or any constraints like rate limits or authentication needs, leaving significant gaps for a tool with no output schema.

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 wasted words. It's appropriately sized and front-loaded, making it easy to parse quickly.

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

Completeness2/5

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

Given the lack of annotations and output schema, the description is incomplete. It doesn't explain what 'usage documentation' entails (e.g., text, examples, links), how results are structured, or potential limitations, which is inadequate for a tool that retrieves information without structured output documentation.

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

Parameters3/5

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

The description adds minimal meaning beyond the input schema, which has 100% coverage and documents the single parameter 'component' with examples. The description implies the parameter is used to specify which component's documentation to retrieve, but doesn't provide additional context like valid component names or how to handle unknown components.

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 tool's purpose with a specific verb ('Get') and resource ('usage documentation for a component'), making it easy to understand what it does. However, it doesn't differentiate from sibling tools like 'get_component' or 'get_category', which likely retrieve different types of information about components.

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. With siblings like 'get_component' and 'list_components', it's unclear if this tool is for documentation retrieval specifically, and there's no mention of prerequisites or exclusions.

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/GustavoGomezPG/basecoat-mcp'

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