Skip to main content
Glama
MarySuneela

Visa Design System MCP Server

by MarySuneela

get-design-token-details

Retrieve detailed information about specific design tokens from Visa's Design System, including specifications and usage guidelines.

Instructions

Get detailed information about a specific design token

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYesDesign token name

Implementation Reference

  • MCP server handler for get-design-token-details tool: validates input arguments and calls DesignTokenService.getToken
    private async handleGetDesignTokenDetails(args: Record<string, any>): Promise<CallToolResult> {
      const { name } = args;
      
      if (!name || typeof name !== 'string') {
        throw new McpError(
          ErrorCode.InvalidParams,
          'Design token name is required and must be a string'
        );
      }
    
      const token = await this.designTokenService.getToken(name);
    
      return {
        content: [
          {
            type: 'text',
            text: JSON.stringify(token, null, 2)
          }
        ]
      };
    }
  • Core implementation of design token retrieval: performs case-insensitive search in cached data and returns token details or throws detailed error
     * Get a specific design token by name
     */
    async getToken(name: string): Promise<DesignToken> {
      if (!name || typeof name !== 'string') {
        throw this.createError('INVALID_NAME', 'Token name must be a non-empty string');
      }
    
      const cachedData = this.dataManager.getCachedData();
      
      if (!cachedData) {
        throw this.createError('NO_DATA', 'No design token data available');
      }
    
      const token = cachedData.designTokens.find(
        token => token.name.toLowerCase() === name.toLowerCase()
      );
    
      if (!token) {
        const availableTokens = cachedData.designTokens.map(token => token.name);
        throw this.createError('TOKEN_NOT_FOUND', `Design token "${name}" not found`, [
          `Available tokens: ${availableTokens.slice(0, 10).join(', ')}${availableTokens.length > 10 ? '...' : ''}`,
          'Check token name spelling',
          'Use search-tokens to find similar tokens'
        ]);
      }
    
      return token;
    }
  • Input schema and tool metadata definition used for registration and validation
    {
      name: 'get-design-token-details',
      description: 'Get detailed information about a specific design token',
      inputSchema: {
        type: 'object',
        properties: {
          name: {
            type: 'string',
            description: 'Design token name'
          }
        },
        required: ['name']
      }
    },
  • MCP server request handler for listing tools, which includes get-design-token-details via getToolDefinitions()
    this.server.setRequestHandler(ListToolsRequestSchema, async () => {
      return {
        tools: this.getToolDefinitions()
      };
    });
  • Switch case routing tool calls to specific handlers
    case 'get-design-token-details':
      return await this.handleGetDesignTokenDetails(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 of behavioral disclosure. It states it 'gets' information, implying a read-only operation, but doesn't cover aspects like authentication needs, rate limits, error handling, or what 'detailed information' entails (e.g., format, depth). For a tool with zero annotation coverage, this is a significant gap.

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 directly states the tool's purpose without unnecessary words. It's appropriately sized and front-loaded, with every part contributing to clarity.

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 complexity (a read operation with one parameter) and lack of annotations or output schema, the description is incomplete. It doesn't explain what 'detailed information' includes, potential response formats, or error cases, leaving gaps for effective tool use by an AI agent.

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 'name' parameter clearly documented as 'Design token name'. The description adds no additional meaning beyond this, such as examples or constraints, so it meets the baseline of 3 where the schema does the heavy lifting.

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 the resource 'detailed information about a specific design token', making the purpose understandable. However, it doesn't differentiate from sibling tools like 'get-design-tokens' (which likely lists tokens) or 'get-design-token-categories' (which might handle categories rather than individual tokens), missing explicit distinction.

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. With siblings like 'get-design-tokens' (likely for listing) and 'search-design-tokens' (likely for broader queries), there's no indication of context, prerequisites, or exclusions, leaving usage ambiguous.

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