Skip to main content
Glama
MarySuneela

Visa Design System MCP Server

by MarySuneela

get-guideline-details

Retrieve detailed design guidelines from Visa's Product Design System to ensure consistent implementation of components and tokens.

Instructions

Get detailed information about a specific guideline

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesGuideline ID

Implementation Reference

  • Core handler function that executes the tool logic: validates ID, retrieves from cache, handles errors, returns the Guideline object.
    async getGuideline(id: string): Promise<Guideline> { return this.circuitBreaker.execute(async () => { if (!id || typeof id !== 'string') { throw new ValidationError('Guideline ID must be a non-empty string', [], { service: 'GuidelinesService', method: 'getGuideline', id }); } const cachedData = this.dataManager.getCachedData(); if (!cachedData) { throw new DataError('No guidelines data available', [ 'Ensure data files are loaded', 'Check data directory configuration' ], { service: 'GuidelinesService', method: 'getGuideline' }); } const guideline = cachedData.guidelines.find( guide => guide.id.toLowerCase() === id.toLowerCase() ); if (!guideline) { const availableGuidelines = cachedData.guidelines.map(guide => guide.id); throw new NotFoundError('Guideline', id, [ `Available guidelines: ${availableGuidelines.join(', ')}`, 'Check guideline ID spelling' ], { service: 'GuidelinesService', method: 'getGuideline' }); } return guideline; }, { service: 'GuidelinesService', method: 'getGuideline', id }); }
  • MCP protocol handler that validates arguments, calls the guidelines service, and formats the response as CallToolResult.
    private async handleGetGuidelineDetails(args: Record<string, any>): Promise<CallToolResult> { const { id } = args; if (!id || typeof id !== 'string') { throw new McpError( ErrorCode.InvalidParams, 'Guideline ID is required and must be a string' ); } const guideline = await this.guidelinesService.getGuideline(id); return { content: [ { type: 'text', text: JSON.stringify(guideline, null, 2) } ] }; }
  • Type definition for the Guideline object returned by the tool.
    export interface Guideline { id: string; title: string; category: string; content: string; tags: string[]; lastUpdated: Date; relatedComponents?: string[]; relatedTokens?: string[]; }
  • Tool registration including name, description, and input schema in the getToolDefinitions() method.
    name: 'get-guideline-details', description: 'Get detailed information about a specific guideline', inputSchema: { type: 'object', properties: { id: { type: 'string', description: 'Guideline ID' } }, required: ['id'] } },
  • Dispatch case in handleToolCall switch statement that routes to the specific handler.
    case 'get-guideline-details': return await this.handleGetGuidelineDetails(args);

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