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

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

No annotations are provided, so the description carries the full burden. It states it 'gets' information, implying a read-only operation, but doesn't disclose behavioral traits such as error handling (e.g., what happens if the ID is invalid), rate limits, authentication needs, or the format/scope of the returned details. This leaves significant gaps for an agent to use it effectively.

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, clear sentence with zero wasted words. It's front-loaded with the core purpose and appropriately sized for a simple 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 no annotations and no output schema, the description is incomplete. It doesn't explain what 'detailed information' includes (e.g., content, metadata, examples), error cases, or how it relates to sibling tools. For a tool with one parameter but unknown output behavior, more context is needed for effective use.

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 'id' parameter documented as 'Guideline ID'. The description adds no additional meaning beyond this, as it only mentions 'a specific guideline' without elaborating on the ID format or source. With high schema coverage, the baseline is 3.

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 verb ('Get') and resource ('detailed information about a specific guideline'), making the purpose understandable. It distinguishes from siblings like 'get-guidelines' (list) and 'search-guidelines' (search), but doesn't explicitly mention how it differs from them beyond being for a 'specific' guideline.

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

Usage Guidelines3/5

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

The description implies usage when you need details for a 'specific guideline' (identified by ID), which suggests using this after identifying a guideline via 'get-guidelines' or 'search-guidelines'. However, it doesn't explicitly state when to use this vs. alternatives or any prerequisites like needing the ID first.

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