Skip to main content
Glama

get_component_docs

Access complete documentation for any Modus Web Component, including attributes, events, and usage examples. Get help with component usage and design guidelines directly in your IDE.

Instructions

Get the complete documentation for a specific Modus Web Component including attributes, events, and usage examples.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
componentYesThe component name (e.g., "button", "card", "modal")

Implementation Reference

  • Tool registration/schema definition for 'get_component_docs' - declares the tool name, description, and input schema requiring a 'component' string parameter.
      name: "get_component_docs",
      description:
        "Get the complete documentation for a specific Modus Web Component including attributes, events, and usage examples.",
      inputSchema: {
        type: "object",
        properties: {
          component: {
            type: "string",
            description:
              'The component name (e.g., "button", "card", "modal")',
          },
        },
        required: ["component"],
      },
    },
  • src/index.ts:307-310 (registration)
    Tool dispatch/routing: the CallToolRequestSchema handler maps 'get_component_docs' to the getComponentDocs method.
    case "get_component_docs":
      return await this.getComponentDocs(
        (args?.component as string) || ""
      );
  • Handler implementation: getComponentDocs() looks up a component doc by name, normalizes it (removes 'modus-wc-' prefix, lowercases), searches the loaded docs array, and returns the markdown content or an error with available components.
    private async getComponentDocs(component: string): Promise<any> {
      const normalizedComponent = component
        .toLowerCase()
        .replace("modus-wc-", "");
      const doc = this.docs.find(
        (d) => d.component.toLowerCase() === normalizedComponent
      );
    
      if (!doc) {
        const availableComponents = this.docs.map((d) => d.component).join(", ");
        return {
          content: [
            {
              type: "text",
              text: `Component "${component}" not found.\n\nAvailable components: ${availableComponents}`,
            },
          ],
        };
      }
    
      return {
        content: [
          {
            type: "text",
            text: doc.content,
          },
        ],
      };
    }
Behavior2/5

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

With no annotations, the description must fully disclose behavior. It states the tool returns 'complete documentation' but does not specify the return format (plain text, markdown, etc.), any authentication needs, or limitations (e.g., if documentation is fetched from an external source). The read-only nature is implied but not explicit.

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

Conciseness4/5

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

The description is a single, clear sentence that is front-loaded with the action and outcome. It could be slightly more concise but remains efficient and free of unnecessary words.

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 simple parameter and no output schema, the description adequately conveys the tool's purpose but lacks details on the nature of the returned documentation (e.g., whether it includes styling guidelines, accessibility info). It is minimally complete for a retrieval tool.

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 input schema covers the single parameter 'component' with examples, achieving 100% schema description coverage. The tool description adds minimal additional meaning beyond referencing 'specific Modus Web Component', so baseline score is appropriate.

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

Purpose5/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: retrieving complete documentation for a specific Modus Web Component, listing included elements (attributes, events, usage examples). This distinguishes it from sibling tools like list_all_components (which lists all components) and search_components (which searches).

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

Usage Guidelines3/5

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

The description implies use when needing documentation for a specific component, but does not explicitly state when to prefer this over siblings (e.g., use list_all_components to browse, or search_components to find components). No when-not-to-use or alternative guidance is provided.

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/julianoczkowski/mcp-modus'

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