Skip to main content
Glama
getComponentDoc.ts1.32 kB
import { MCPTool } from "./index.js"; import { COMPONENTS_DB } from "../data/components.js"; export const getComponentDocTool: MCPTool = { name: "get_ntv_component_doc", description: "Gets comprehensive documentation for a specific NTV component including props, events, and usage patterns", inputSchema: { type: "object", properties: { component: { type: "string", description: "Component name (e.g., 'Button', 'Input', 'Card', 'Autocomplete')", }, }, required: ["component"], }, execute: async (args: Record<string, unknown>) => { const componentName = args.component as string; const component = COMPONENTS_DB.find( (c) => c.name.toLowerCase() === componentName.toLowerCase() ); if (!component) { throw new Error(`Component '${componentName}' not found`); } return { name: component.name, selector: component.selector, category: component.category, description: component.description, imports: `import { ${component.name} } from '@ntv-scaffolding/component-pantry';`, props: component.props, events: component.events || [], slots: component.slots || [], examples: component.examples || [], bestPractices: component.bestPractices || [], }; }, };

Implementation Reference

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/stephenlumban/component-mcp'

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