Skip to main content
Glama
MarySuneela

Visa Design System MCP Server

by MarySuneela

get-component-examples

Retrieve code examples for Visa Design System components to implement UI elements correctly and consistently.

Instructions

Get code examples for a specific component

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYesComponent name

Implementation Reference

  • Tool registration definition including name, description, and input schema for get-component-examples
    { name: 'get-component-examples', description: 'Get code examples for a specific component', inputSchema: { type: 'object', properties: { name: { type: 'string', description: 'Component name' } }, required: ['name'] } },
  • MCP protocol handler for get-component-examples tool: validates input, delegates to ComponentService, formats JSON response as CallToolResult
    /** * Handle get-component-examples tool call */ private async handleGetComponentExamples(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 examples = await this.componentService.getComponentExamples(name); return { content: [ { type: 'text', text: JSON.stringify({ component: name, examples, count: examples.length }, null, 2) } ] }; }
  • Helper method in ComponentService that retrieves examples for a given component from cached data
    * Get component examples and code snippets */ async getComponentExamples(name: string): Promise<ComponentExample[]> { const component = await this.getComponent(name); return component.examples; }

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