Skip to main content
Glama
watchdealer-pavel

WatchBase MCP Server

search

Find watches in the WatchBase database by entering brand, family, model names, or reference numbers. This tool helps users locate specific watch information using targeted search queries.

Instructions

Search the database by brand name, family name, watch name and reference number (whole words).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
qYesSearch keywords

Implementation Reference

  • The handler function for the 'search' tool within the CallToolRequestSchema request handler. It validates the input arguments using the isSearchArgs type guard and sets the apiPath and apiParams for the subsequent API call to 'search' endpoint.
    case 'search': if (!isSearchArgs(args)) throw new McpError(ErrorCode.InvalidParams, 'Invalid arguments for search'); apiPath = 'search'; apiParams = { q: args.q }; break;
  • src/index.ts:97-108 (registration)
    Registers the 'search' tool in the tools array used by the ListToolsRequestSchema handler.
    { name: 'search', description: 'Search the database by brand name, family name, watch name and reference number (whole words).', inputSchema: { type: 'object', properties: { q: { type: 'string', description: 'Search keywords' }, }, required: ['q'], }, },
  • Input schema definition for the 'search' tool, specifying the required 'q' string parameter.
    inputSchema: { type: 'object', properties: { q: { type: 'string', description: 'Search keywords' }, }, required: ['q'], },
  • Type guard helper function used to validate arguments for the 'search' tool (shared with 'search_refnr').
    const isSearchArgs = (args: any): args is { q: string } => typeof args === 'object' && args !== null && typeof args.q === 'string';

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