Skip to main content
Glama
MarySuneela

Visa Design System MCP Server

by MarySuneela

get-design-token-details

Retrieve detailed information about a specific design token from Visa's Design System, including its properties and usage, to ensure consistent and accurate design implementation.

Instructions

Get detailed information about a specific design token

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYesDesign token name

Implementation Reference

  • Core implementation of getToken method that performs the actual lookup and retrieval of design token details by name from cached data.
    * 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; }
  • MCP protocol handler for the 'get-design-token-details' tool that validates input and calls the DesignTokenService.
    /** * Handle get-design-token-details tool call */ 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) } ] }; }
  • Tool registration in getToolDefinitions() including name, description, and input schema.
    { 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'] } },
  • Input schema definition for the tool requiring a 'name' parameter.
    { 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'] } },

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