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

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