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);
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It states the search functionality but doesn't describe what the search returns (e.g., list of results, pagination behavior), performance characteristics, or any limitations (e.g., rate limits, authentication needs). This is a significant gap for a search tool with zero annotation coverage.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that front-loads the core functionality ('Search guidelines') and adds specific detail ('by content, title, or tags') without unnecessary elaboration. Every word earns its place, making it appropriately concise for a straightforward search tool.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the lack of annotations and output schema, the description is incomplete. It doesn't explain what the tool returns (e.g., a list of guideline objects, search metadata), how results are structured, or any error conditions. For a search tool with no structured output documentation, this leaves critical gaps for an AI agent to understand the tool's behavior.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has 100% description coverage, with the single parameter 'query' documented as 'Search query for guidelines'. The description adds marginal value by specifying the searchable fields ('content, title, or tags'), but doesn't provide syntax examples, query format details, or behavioral context beyond what the schema already implies. Baseline 3 is appropriate given the high schema coverage.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('Search') and resource ('guidelines'), and specifies the searchable fields ('by content, title, or tags'), which distinguishes it from generic search tools. However, it doesn't explicitly differentiate from sibling tools like 'search-components' or 'search-design-tokens' beyond the resource type.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives like 'get-guidelines' or 'get-guideline-details'. It lacks context about prerequisites, typical use cases, or any explicit 'when-not-to-use' scenarios, leaving the agent to infer usage from the tool name alone.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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