Skip to main content
Glama

get_component_docs

Retrieve complete documentation for Modus Web Components including attributes, events, and usage examples to implement components correctly in your projects.

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

  • The handler function that executes the tool logic: normalizes the component name, finds the corresponding documentation in the loaded docs array, and returns it as MCP content or an error message listing 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, }, ], }; }
  • Input schema defining the required 'component' parameter as a string.
    inputSchema: { type: "object", properties: { component: { type: "string", description: 'The component name (e.g., "button", "card", "modal")', }, }, required: ["component"], },
  • src/index.ts:181-196 (registration)
    Tool registration in the ListToolsRequestSchema response, including name, description, and input schema.
    { 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)
    Dispatch case in the CallToolRequestSchema handler that invokes the getComponentDocs method with the provided arguments.
    case "get_component_docs": return await this.getComponentDocs( (args?.component as string) || "" );

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