get_watch_details
Retrieve comprehensive metadata for a specific watch by its ID using structured access to WatchBase's database, including details on brands, models, and technical specifications.
Instructions
Retrieve the full details for a particular watch by its ID.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | ID of the watch |
Implementation Reference
- src/index.ts:228-232 (handler)Specific handler case for the 'get_watch_details' tool within the CallToolRequestSchema request handler. Validates input arguments using isGetWatchDetailsArgs, sets the API endpoint path to 'watch' and parameters to the watch ID, then relies on the shared axios GET request logic below to fetch and return the data.case 'get_watch_details': if (!isGetWatchDetailsArgs(args)) throw new McpError(ErrorCode.InvalidParams, 'Invalid arguments for get_watch_details'); apiPath = 'watch'; apiParams = { id: args.id }; break;
- src/index.ts:47-50 (schema)Type guard function that validates the input arguments for the 'get_watch_details' tool, ensuring 'id' is a string or number.const isGetWatchDetailsArgs = (args: any): args is { id: string | number } => typeof args === 'object' && args !== null && (typeof args.id === 'string' || typeof args.id === 'number');
- src/index.ts:168-181 (registration)Tool registration object defining the name, description, and input schema for 'get_watch_details', provided to the ListToolsRequestSchema handler.{ name: 'get_watch_details', description: 'Retrieve the full details for a particular watch by its ID.', inputSchema: { type: 'object', properties: { id: { oneOf: [{ type: 'string' }, { type: 'number' }], description: 'ID of the watch', }, }, required: ['id'], }, },