get_component_details
Retrieve detailed specifications for game components using catalog identities or part UUIDs to support tabletop game manufacturing decisions.
Instructions
Get detailed information about a component type by catalog identity (e.g., 'BridgeDeck') or a game part by UUID.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| part_id | Yes | The component identity from the catalog (e.g., 'BridgeDeck') or a game part UUID. |
Implementation Reference
- src/tools/components.ts:60-87 (handler)The handler function that executes the "get_component_details" tool. It retrieves product info from the client catalog or fetches individual part details.
export function handleGetComponentDetails(client: TgcClient) { return async (args: { part_id: string }): Promise<CallToolResult> => { // Try catalog lookup first (by identity) const products = await client.getProducts(); const product = products.find((p) => p.identity === args.part_id); if (product) { return { content: [ { type: "text", text: JSON.stringify(product, null, 2), }, ], }; } // Fall back to /part/{id} for game part instances (UUIDs) const part = await client.getPart(args.part_id); return { content: [ { type: "text", text: JSON.stringify(part, null, 2), }, ], }; }; } - src/schemas/tool-inputs.ts:137-144 (schema)Input schema definition for the "get_component_details" tool.
export const getComponentDetailsInput = { part_id: safeId.describe( "The component identity from the catalog (e.g., 'BridgeDeck') or a game part UUID.", ), }; // Tool 14: delete_game — permanently delete a game project export const deleteGameInput = { - src/index.ts:147-153 (registration)Registration of the "get_component_details" tool in the main index file.
server.registerTool("get_component_details", { description: "Get detailed information about a component type by catalog identity (e.g., 'BridgeDeck') or a game part by UUID.", inputSchema: schemas.getComponentDetailsInput, annotations: { readOnlyHint: true }, }, withErrorHandling(handleGetComponentDetails(client)));