get-design-token-categories
Retrieve all available design token categories to access and organize Visa Design System resources for consistent product design and development.
Instructions
Get all available design token categories
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- Core handler implementation that fetches all design tokens, extracts unique categories using a Set, sorts them, and returns the list. This is the exact logic executed for the tool.async getTokenCategories(): Promise<string[]> { const tokens = await this.getTokens(); const categories = new Set(tokens.map(token => token.category)); return Array.from(categories).sort(); }
- src/mcp-server.ts:422-436 (handler)MCP server wrapper handler that calls the DesignTokenService.getTokenCategories() and formats the response as MCP CallToolResult with JSON content.private async handleGetDesignTokenCategories(args: Record<string, any>): Promise<CallToolResult> { const categories = await this.designTokenService.getTokenCategories(); return { content: [ { type: 'text', text: JSON.stringify({ categories, count: categories.length }, null, 2) } ] }; }
- src/mcp-server.ts:161-168 (registration)Tool registration in getToolDefinitions() including name, description, and empty input schema (no parameters required).{ name: 'get-design-token-categories', description: 'Get all available design token categories', inputSchema: { type: 'object', properties: {} } },
- src/mcp-server.ts:296-297 (handler)Switch case router in handleToolCall that directs the tool call to the specific handler method.case 'get-design-token-categories': return await this.handleGetDesignTokenCategories(args);
- src/mcp-server.ts:164-167 (schema)Input schema definition for the tool: empty object (no required parameters).inputSchema: { type: 'object', properties: {} }