Skip to main content
Glama
stephenlumban

NTV Scaffolding MCP Server

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
NameRequiredDescriptionDefault
componentYesComponent name (e.g., 'Button', 'Input', 'Card', 'Autocomplete')

Implementation Reference

  • 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 || [],
      };
    },
  • 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"],
    },
  • 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,
    ];

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