get_ntv_component_doc
Retrieve detailed documentation for NTV components including props, events, and usage patterns to understand component functionality and implementation requirements.
Instructions
Gets comprehensive documentation for a specific NTV component including props, events, and usage patterns
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| component | Yes | Component name (e.g., 'Button', 'Input', 'Card', 'Autocomplete') |
Implementation Reference
- src/tools/getComponentDoc.ts:19-41 (handler)The main handler function that executes the tool: retrieves the component documentation from the COMPONENTS_DB based on the provided component name, formats it, and returns props, events, slots, examples, and best practices.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 || [], }; },
- src/tools/getComponentDoc.ts:8-18 (schema)Input schema specifying the required 'component' parameter as a string.inputSchema: { type: "object", properties: { component: { type: "string", description: "Component name (e.g., 'Button', 'Input', 'Card', 'Autocomplete')", }, }, required: ["component"], },
- src/tools/index.ts:17-26 (registration)The tool is registered by being included in the exported componentTools array in index.ts (imported at line 2). This array collects all MCP tools.export const componentTools: MCPTool[] = [ generateComponentTool, getComponentDocTool, listComponentsTool, generateComponentUsageTool, getComponentPropsToolDefinition, generateTemplateCodeTool, getComponentExamplesTool, getComponentUsagePatternTool, ];