Skip to main content
Glama
MarySuneela

Visa Design System MCP Server

by MarySuneela

get-guideline-details

Retrieve comprehensive details for a specific design guideline by providing its ID using the Visa Design System MCP Server. Access essential information for consistent design implementation.

Instructions

Get detailed information about a specific guideline

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesGuideline ID

Implementation Reference

  • MCP tool handler for get-guideline-details. Validates the guideline ID input, fetches the guideline details from the guidelinesService, and returns the result as a JSON-formatted text content block.
    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) } ] }; }
  • Tool registration in the getTools() method, including name, description, and input schema definition.
    { name: 'get-guideline-details', description: 'Get detailed information about a specific guideline', inputSchema: { type: 'object', properties: { id: { type: 'string', description: 'Guideline ID' } }, required: ['id'] } },
  • Input schema definition for the get-guideline-details tool, specifying the required 'id' parameter.
    inputSchema: { type: 'object', properties: { id: { type: 'string', description: 'Guideline ID' } }, required: ['id'] }
  • Core helper function in GuidelinesService that retrieves a specific guideline by ID from cached data, including validation, error handling, and case-insensitive lookup.
    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 }); }

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