Skip to main content
Glama
MarySuneela

Visa Design System MCP Server

by MarySuneela

get-component-details

Retrieve detailed specifications and usage guidelines for Visa Design System components to ensure proper implementation and consistency.

Instructions

Get detailed information about a specific component

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYesComponent name

Implementation Reference

  • The MCP handler function for the 'get-component-details' tool. Validates input and delegates to ComponentService.getComponent(), returning JSON stringified result.
    private async handleGetComponentDetails(args: Record<string, any>): Promise<CallToolResult> {
      const { name } = args;
      
      if (!name || typeof name !== 'string') {
        throw new McpError(
          ErrorCode.InvalidParams,
          'Component name is required and must be a string'
        );
      }
    
      const component = await this.componentService.getComponent(name);
    
      return {
        content: [
          {
            type: 'text',
            text: JSON.stringify(component, null, 2)
          }
        ]
      };
    }
  • Tool registration definition returned by listTools, including name, description, and input schema.
    {
      name: 'get-component-details',
      description: 'Get detailed information about a specific component',
      inputSchema: {
        type: 'object',
        properties: {
          name: {
            type: 'string',
            description: 'Component name'
          }
        },
        required: ['name']
      }
    },
  • Core helper method that retrieves the specific component from cached data by name, with comprehensive error handling and suggestions.
    async getComponent(name: string): Promise<Component> {
      if (!name || typeof name !== 'string') {
        throw this.createError('INVALID_NAME', 'Component name must be a non-empty string');
      }
    
      const cachedData = this.dataManager.getCachedData();
      
      if (!cachedData) {
        throw this.createError('NO_DATA', 'No component data available');
      }
    
      const component = cachedData.components.find(
        comp => comp.name.toLowerCase() === name.toLowerCase()
      );
    
      if (!component) {
        const availableComponents = cachedData.components.map(comp => comp.name);
        throw this.createError('COMPONENT_NOT_FOUND', `Component "${name}" not found`, [
          `Available components: ${availableComponents.join(', ')}`,
          'Check component name spelling'
        ]);
      }
    
      return component;
    }
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states this is a read operation ('Get'), but doesn't mention any behavioral traits like authentication requirements, rate limits, error handling, or what 'detailed information' includes (e.g., metadata, dependencies, usage). For a tool with no annotations, this leaves significant gaps in understanding how it behaves.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, clear sentence with zero wasted words. It's appropriately sized for a simple tool and front-loaded with the core purpose, making it efficient and easy to parse.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's low complexity (one parameter, no output schema, no annotations), the description is minimally adequate. It covers the basic purpose but lacks context about usage relative to siblings, behavioral details, or output expectations. For a simple read tool, this is borderline viable but has clear gaps in completeness.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has 100% description coverage, with the single parameter 'name' documented as 'Component name' in the schema. The description adds no additional meaning beyond this, such as format examples (e.g., case sensitivity) or context about what constitutes a valid component name. With high schema coverage, the baseline score of 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb ('Get') and resource ('detailed information about a specific component'), making the purpose understandable. However, it doesn't distinguish this tool from similar siblings like 'get-components' (which likely lists multiple components) or 'get-component-examples' (which might provide usage examples), missing full sibling differentiation.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. With siblings like 'get-components' (likely for listing), 'search-components' (likely for filtering), and 'get-component-examples' (likely for examples), there's no indication of when this detailed view is appropriate versus other component-related tools.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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/MarySuneela/mcp-vpds'

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