Skip to main content
Glama
watchdealer-pavel

WatchBase MCP Server

list_watches

Retrieve a filtered list of watches by Brand and/or Family, optionally limited by update date, using structured queries from WatchBase's comprehensive watch database.

Instructions

Retrieve a list of watches for a particular Brand and/or Family, optionally filtered by update date.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
brand_idYesBrandID of the brand
family_idNoOptional: FamilyID of the family
updated_sinceNoOptional: Limit results to watches updated after this date (YYYY-MM-DD)

Implementation Reference

  • Handler logic for the 'list_watches' tool: validates input using isListWatchesArgs, sets API endpoint to 'watches', and constructs query parameters including brand_id, optional family_id, and updated_since.
    case 'list_watches': if (!isListWatchesArgs(args)) throw new McpError(ErrorCode.InvalidParams, 'Invalid arguments for list_watches'); apiPath = 'watches'; apiParams = { 'brand-id': args.brand_id }; // API uses hyphen if (args.family_id !== undefined) { apiParams['family-id'] = args.family_id; // API uses hyphen } if (args.updated_since !== undefined) { apiParams['updated-since'] = args.updated_since; // API uses hyphen } break;
  • Type guard function for validating arguments to the 'list_watches' tool, checking types for brand_id (required), family_id (optional), and updated_since (optional YYYY-MM-DD string).
    const isListWatchesArgs = ( args: any ): args is { brand_id: string | number; family_id?: string | number; updated_since?: string; } => typeof args === 'object' && args !== null && (typeof args.brand_id === 'string' || typeof args.brand_id === 'number') && (args.family_id === undefined || typeof args.family_id === 'string' || typeof args.family_id === 'number') && (args.updated_since === undefined || (typeof args.updated_since === 'string' && /^\d{4}-\d{2}-\d{2}$/.test(args.updated_since))); // Basic YYYY-MM-DD check
  • src/index.ts:143-167 (registration)
    Tool registration entry for 'list_watches', including name, description, and detailed inputSchema defining parameters and requirements.
    { name: 'list_watches', description: 'Retrieve a list of watches for a particular Brand and/or Family, optionally filtered by update date.', inputSchema: { type: 'object', properties: { brand_id: { oneOf: [{ type: 'string' }, { type: 'number' }], description: 'BrandID of the brand', }, family_id: { oneOf: [{ type: 'string' }, { type: 'number' }], description: 'Optional: FamilyID of the family', }, updated_since: { type: 'string', format: 'date', // Indicates YYYY-MM-DD format description: 'Optional: Limit results to watches updated after this date (YYYY-MM-DD)', }, }, required: ['brand_id'], }, },
  • Input schema definition for the 'list_watches' tool, specifying object properties, types, and required fields.
    inputSchema: { type: 'object', properties: { brand_id: { oneOf: [{ type: 'string' }, { type: 'number' }], description: 'BrandID of the brand', }, family_id: { oneOf: [{ type: 'string' }, { type: 'number' }], description: 'Optional: FamilyID of the family', }, updated_since: { type: 'string', format: 'date', // Indicates YYYY-MM-DD format description: 'Optional: Limit results to watches updated after this date (YYYY-MM-DD)', }, }, required: ['brand_id'], },

Other Tools

Related Tools

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/watchdealer-pavel/watchbase-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server