Skip to main content
Glama
stephenlumban

NTV Scaffolding MCP Server

get_ntv_component_props

Retrieve detailed input properties and configuration options for Angular components to understand component capabilities and usage requirements.

Instructions

Get detailed information about a component's input properties and configuration options

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
componentYesComponent name (e.g., 'Button', 'Input')
propNameNoOptional: Get details for a specific property

Implementation Reference

  • The execute function implementing the tool's core logic: retrieves the component from COMPONENTS_DB by name, optionally filters by propName, and returns property details or all properties with configInterface.
    execute: async (args: Record<string, unknown>) => {
      const componentName = args.component as string;
      const propName = args.propName as string | undefined;
    
      const component = COMPONENTS_DB.find(
        (c) => c.name.toLowerCase() === componentName.toLowerCase()
      );
    
      if (!component) {
        throw new Error(`Component '${componentName}' not found`);
      }
    
      if (propName) {
        const prop = component.props.find(
          (p) => p.name.toLowerCase() === propName.toLowerCase()
        );
        if (!prop) {
          throw new Error(
            `Property '${propName}' not found on component '${componentName}'`
          );
        }
        return { component: componentName, property: prop };
      }
    
      return {
        component: componentName,
        properties: component.props,
        configInterface: component.configInterface || null,
      };
    },
  • Input schema defining the expected arguments: required 'component' string and optional 'propName' string.
    inputSchema: {
      type: "object",
      properties: {
        component: {
          type: "string",
          description: "Component name (e.g., 'Button', 'Input')",
        },
        propName: {
          type: "string",
          description: "Optional: Get details for a specific property",
        },
      },
      required: ["component"],
    },
  • Registers the tool (imported as getComponentPropsToolDefinition from getComponentProps.js) in the central componentTools array used for MCP tool exposure.
    export const componentTools: MCPTool[] = [
      generateComponentTool,
      getComponentDocTool,
      listComponentsTool,
      generateComponentUsageTool,
      getComponentPropsToolDefinition,
      generateTemplateCodeTool,
      getComponentExamplesTool,
      getComponentUsagePatternTool,
    ];
  • Defines and exports the complete MCPTool object for 'get_ntv_component_props', including name, description, schema, and handler.
    export const getComponentPropsToolDefinition: MCPTool = {
      name: "get_ntv_component_props",
      description:
        "Get detailed information about a component's input properties and configuration options",
      inputSchema: {
        type: "object",
        properties: {
          component: {
            type: "string",
            description: "Component name (e.g., 'Button', 'Input')",
          },
          propName: {
            type: "string",
            description: "Optional: Get details for a specific property",
          },
        },
        required: ["component"],
      },
      execute: async (args: Record<string, unknown>) => {
        const componentName = args.component as string;
        const propName = args.propName as string | undefined;
    
        const component = COMPONENTS_DB.find(
          (c) => c.name.toLowerCase() === componentName.toLowerCase()
        );
    
        if (!component) {
          throw new Error(`Component '${componentName}' not found`);
        }
    
        if (propName) {
          const prop = component.props.find(
            (p) => p.name.toLowerCase() === propName.toLowerCase()
          );
          if (!prop) {
            throw new Error(
              `Property '${propName}' not found on component '${componentName}'`
            );
          }
          return { component: componentName, property: prop };
        }
    
        return {
          component: componentName,
          properties: component.props,
          configInterface: component.configInterface || null,
        };
      },
    };

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