Skip to main content
Glama
watchdealer-pavel

WatchBase MCP Server

list_families

Retrieve all watch families for a specific brand to explore collections and models within the WatchBase database.

Instructions

Retrieve a list of all families for a given brand.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
brand_idYesBrandID of the brand

Implementation Reference

  • Handler logic for the 'list_families' tool: validates input arguments, sets the API endpoint to '/families' and maps 'brand_id' to 'brand-id' parameter.
    case 'list_families': if (!isListFamiliesArgs(args)) throw new McpError(ErrorCode.InvalidParams, 'Invalid arguments for list_families'); apiPath = 'families'; apiParams = { 'brand-id': args.brand_id }; // API uses hyphen break;
  • src/index.ts:127-139 (registration)
    Registration of the 'list_families' tool in the tools array, including name, description, and input schema definition.
    name: 'list_families', description: 'Retrieve a list of all families for a given brand.', inputSchema: { type: 'object', properties: { brand_id: { oneOf: [{ type: 'string' }, { type: 'number' }], description: 'BrandID of the brand', }, }, required: ['brand_id'], }, },
  • Type guard function for validating 'list_families' tool arguments (schema validation helper).
    const isListFamiliesArgs = (args: any): args is { brand_id: string | number } => typeof args === 'object' && args !== null && (typeof args.brand_id === 'string' || typeof args.brand_id === 'number');
  • Shared API execution and response formatting logic used by all tools, including 'list_families'.
    const response = await this.axiosInstance.get(apiPath, { params: apiParams }); // Return successful response return { content: [ { type: 'text', // Corrected type to 'text' text: JSON.stringify(response.data, null, 2), // JSON content is in the text field }, ], };

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