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
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"component": "<component>"
},
"name": "get_ntv_component_props"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| component | Yes | Component name (e.g., 'Button', 'Input') | |
| propName | No | Optional: Get details for a specific property |
Implementation Reference
- src/tools/getComponentProps.ts:22-51 (handler)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, }; }, - src/tools/getComponentProps.ts:8-21 (schema)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"], }, - src/tools/index.ts:17-26 (registration)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, ]; - src/tools/getComponentProps.ts:4-52 (registration)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, }; }, };