Skip to main content
Glama
MarySuneela

Visa Design System MCP Server

by MarySuneela

search-guidelines

Find Visa design system guidelines by searching content, titles, or tags to access component specifications and usage resources.

Instructions

Search guidelines by content, title, or tags

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYesSearch query for guidelines

Implementation Reference

  • Core handler implementing the search logic for guidelines by filtering on title, content, category, and tags.
    /** * Search guidelines by query string */ @handleErrors async searchGuidelines(query: string): Promise<Guideline[]> { return this.circuitBreaker.execute(async () => { if (!query || typeof query !== 'string') { throw new ValidationError('Search query must be a non-empty string', [], { service: 'GuidelinesService', method: 'searchGuidelines', query }); } 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: 'searchGuidelines' }); } const searchTerm = query.toLowerCase(); return cachedData.guidelines.filter(guideline => { // Search in title if (guideline.title.toLowerCase().includes(searchTerm)) { return true; } // Search in content if (guideline.content.toLowerCase().includes(searchTerm)) { return true; } // Search in category if (guideline.category.toLowerCase().includes(searchTerm)) { return true; } // Search in tags if (guideline.tags.some(tag => tag.toLowerCase().includes(searchTerm) )) { return true; } return false; }); }, { service: 'GuidelinesService', method: 'searchGuidelines', query }); }
  • MCP server wrapper handler that validates input and calls GuidelinesService.searchGuidelines, formats response as MCP CallToolResult.
    /** * Handle search-guidelines tool call */ private async handleSearchGuidelines(args: Record<string, any>): Promise<CallToolResult> { const { query } = args; if (!query || typeof query !== 'string') { throw new McpError( ErrorCode.InvalidParams, 'Query parameter is required and must be a string' ); } const guidelines = await this.guidelinesService.searchGuidelines(query); return { content: [ { type: 'text', text: JSON.stringify({ guidelines, count: guidelines.length, query }, null, 2) } ] }; }
  • Schema definition for the search-guidelines tool, including input schema requiring a 'query' string.
    { name: 'search-guidelines', description: 'Search guidelines by content, title, or tags', inputSchema: { type: 'object', properties: { query: { type: 'string', description: 'Search query for guidelines' } }, required: ['query'] } }
  • Registration of the tool handler in the main tool dispatch switch statement.
    case 'search-guidelines': return await this.handleSearchGuidelines(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