Skip to main content
Glama
MarySuneela

Visa Design System MCP Server

by MarySuneela

get-components

Retrieve Visa Design System components with optional filters by category or name to access specifications and usage guidelines.

Instructions

Get all components with optional filtering

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
categoryNoFilter components by category
nameNoFilter components by name (partial match)

Implementation Reference

  • Core implementation of get-components: fetches components from cached data manager and applies filters by category, name, props, or variants.
    async getComponents(options?: ComponentSearchOptions): Promise<Component[]> {
      const cachedData = this.dataManager.getCachedData();
      
      if (!cachedData) {
        throw this.createError('NO_DATA', 'No component data available', [
          'Ensure data files are loaded',
          'Check data directory configuration'
        ]);
      }
    
      let components = cachedData.components;
    
      // Apply filters if provided
      if (options) {
        components = this.filterComponents(components, options);
      }
    
      return components;
    }
  • MCP protocol handler for 'get-components' tool: delegates to ComponentService.getComponents and formats result as MCP CallToolResult with JSON content.
    private async handleGetComponents(args: Record<string, any>): Promise<CallToolResult> {
      const components = await this.componentService.getComponents(args);
    
      return {
        content: [
          {
            type: 'text',
            text: JSON.stringify({
              components,
              count: components.length,
              filters: args
            }, null, 2)
          }
        ]
      };
    }
  • Input schema and metadata definition for the 'get-components' tool, defining optional category and name filters.
      name: 'get-components',
      description: 'Get all components with optional filtering',
      inputSchema: {
        type: 'object',
        properties: {
          category: {
            type: 'string',
            description: 'Filter components by category'
          },
          name: {
            type: 'string',
            description: 'Filter components by name (partial match)'
          }
        }
      }
    },
  • Registration of 'get-components' handler in the MCP tool call router (switch statement).
    case 'get-components':
      return await this.handleGetComponents(args);
  • TypeScript interface defining filter options used by getComponents handler (category, name, hasProps, hasVariants).
    export interface ComponentSearchOptions {
      category?: string;
      name?: string;
      hasProps?: string[];
      hasVariants?: string[];
    }
Behavior2/5

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

With no annotations provided, the description carries full burden for behavioral disclosure. It states 'Get all components' but doesn't describe return format, pagination, rate limits, permissions needed, or what 'all' entails (e.g., completeness, ordering). This leaves significant gaps for a read operation with potential data volume concerns.

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

Conciseness4/5

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

The description is a single, efficient sentence that gets straight to the point with no wasted words. It's appropriately sized for a simple tool, though it could be more front-loaded with critical distinctions from siblings.

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

Completeness2/5

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

For a tool with no annotations, no output schema, and multiple sibling tools, the description is incomplete. It doesn't address key contextual questions: how this differs from 'search-components', what 'all components' returns, or behavioral aspects like response format. The 100% schema coverage helps parameters but doesn't compensate for other gaps.

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?

Schema description coverage is 100%, so the schema already documents both parameters ('category' and 'name') with clear descriptions. The description adds minimal value by mentioning 'optional filtering' but doesn't provide additional context like filter combinations, default behavior without filters, or how filtering interacts with 'all components'.

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

Purpose3/5

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

The description 'Get all components with optional filtering' states a clear verb ('Get') and resource ('components'), but it's vague about scope and doesn't differentiate from siblings like 'search-components' or 'get-component-details'. It specifies 'all components' but doesn't clarify if this means all available components or has other limitations.

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 like 'search-components' or 'get-component-details'. It mentions 'optional filtering' but doesn't explain when filtering is appropriate or what distinguishes this tool from other component-related tools in the sibling list.

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