Skip to main content
Glama
MarySuneela

Visa Design System MCP Server

by MarySuneela

get-components

Retrieve components from Visa Design System with options to filter by category or name, streamlining access to design resources for development.

Instructions

Get all components with optional filtering

Input Schema

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

Implementation Reference

  • MCP tool handler function that executes get-components logic by delegating to ComponentService and formatting the JSON response.
    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) } ] }; }
  • Schema definition for the get-components tool, including input parameters for filtering by category and name.
    { 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 the tool handler in the main tool call switch statement.
    case 'get-components': return await this.handleGetComponents(args);
  • Core helper function that retrieves components from the data manager cache and applies optional filters.
    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; }

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