Skip to main content
Glama

get_component_docs

Retrieve complete documentation for Modus Web Components including attributes, events, and usage examples to understand component implementation and design guidelines.

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 main handler function for the get_component_docs tool. It normalizes the component name, searches the loaded docs array for a matching component, and returns the full documentation content or a list of available components if not found.
    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, }, ], }; }
  • Tool schema definition including name, description, and input schema for the get_component_docs tool, registered in the ListToolsRequestHandler.
    { 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 CallToolRequestHandler switch statement that routes calls to the getComponentDocs handler.
    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