Skip to main content
Glama
watchdealer-pavel

WatchBase MCP Server

list_watches

Retrieve watches by brand and family with optional date filtering to access comprehensive watch metadata from the WatchBase 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 for the 'list_watches' tool: validates arguments, sets API endpoint to '/watches' and constructs query parameters for brand_id (required), family_id (optional), and updated_since (optional). The actual API call is made after the switch statement.
    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;
  • Input schema definition for the 'list_watches' tool, defining parameters and validation rules.
    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'],
    },
  • src/index.ts:140-164 (registration)
    Tool registration object for 'list_watches' in the tools list provided to clients via list_tools.
    {
      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'],
      },
    },
  • Type guard helper function to validate 'list_watches' tool arguments at runtime, matching the input schema.
    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
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries full burden for behavioral disclosure. It states the retrieval action but doesn't mention pagination, rate limits, authentication needs, error conditions, or what happens when no matches are found. For a list operation with 3 parameters, this leaves significant behavioral gaps.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that front-loads the core purpose and includes all key filtering options. There's zero waste or redundancy, making it easy for an agent to parse quickly.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a list retrieval tool with 3 parameters and no annotations or output schema, the description is incomplete. It doesn't address behavioral aspects like pagination, sorting, response format, or error handling. While the purpose is clear, the lack of context about how the tool behaves in practice leaves significant gaps for an agent.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so parameters are well-documented in the schema. The description adds marginal value by clarifying that filtering is by 'Brand and/or Family' and 'optionally filtered by update date', but doesn't provide additional semantics beyond what the schema already specifies. Baseline 3 is appropriate when schema does the heavy lifting.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb ('Retrieve') and resource ('list of watches') with specific filtering criteria ('for a particular Brand and/or Family, optionally filtered by update date'). It distinguishes from siblings like 'get_watch_details' (single watch) and 'list_brands/families' (different resources), but doesn't explicitly contrast with 'search' or 'search_refnr' which might overlap in functionality.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives like 'search' or 'search_refnr'. It mentions optional filtering by update date, but doesn't clarify use cases, prerequisites, or exclusions. The agent must infer usage from the name and parameters alone.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other 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