get_ink_details
Retrieve comprehensive details about a specific fountain pen ink using its unique identifier to access color information and specifications.
Instructions
Get complete information about a specific ink
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ink_id | Yes | The unique identifier for the ink |
Implementation Reference
- src/index.ts:403-429 (handler)The primary handler function implementing the get_ink_details tool logic. It looks up the ink by ID in the loaded inkColors and metadata arrays, generates a detailed result using createSearchResult, computes hex color, family, and description, and returns a formatted MCPTextResponse.private getInkDetails(inkId: string): MCPTextResponse { const inkColor = this.inkColors.find((ink) => ink.ink_id === inkId); const metadata = this.getInkMetadata(inkId); if (!inkColor) { throw new Error(`Ink not found: ${inkId}`); } const result = createSearchResult(inkColor, metadata); return { content: [ { type: 'text', text: JSON.stringify( { ink_details: result, hex_color: rgbToHex(inkColor.rgb), // Now actually RGB! color_family: getColorFamily(inkColor.rgb), color_description: getColorDescription(inkColor.rgb), }, null, 2, ), }, ], } satisfies MCPTextResponse;
- src/index.ts:178-191 (registration)Tool registration entry in the ListToolsRequestSchema handler, defining the tool name, description, and input schema for get_ink_details.{ name: 'get_ink_details', description: 'Get complete information about a specific ink', inputSchema: { type: 'object', properties: { ink_id: { type: 'string', description: 'The unique identifier for the ink', }, }, required: ['ink_id'], }, },
- src/index.ts:181-190 (schema)Input schema definition for the get_ink_details tool, specifying the required 'ink_id' string parameter.inputSchema: { type: 'object', properties: { ink_id: { type: 'string', description: 'The unique identifier for the ink', }, }, required: ['ink_id'], },
- src/index.ts:283-284 (handler)Dispatch handler in the CallToolRequestSchema switch statement that routes calls to get_ink_details to the private getInkDetails method.case 'get_ink_details': return this.getInkDetails(args.ink_id as string);
- src/index.ts:127-129 (helper)Helper method used by getInkDetails to retrieve search metadata for the ink by ID.private getInkMetadata(inkId: string): InkSearchData | undefined { return this.inkSearchData.find((item) => item.ink_id === inkId); }