Skip to main content
Glama
watchdealer-pavel

WatchBase MCP Server

search_refnr

Query the WatchBase database by reference number to retrieve detailed watch metadata, supporting partial matches for flexible searches.

Instructions

Search the database by reference number (allows partial matches).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
qYesSearch keywords (reference number)

Implementation Reference

  • Handler logic for the 'search_refnr' tool. Validates the input arguments using the isSearchArgs type guard, sets the API endpoint to 'search/refnr', and passes the query parameter 'q'.
    case 'search_refnr': if (!isSearchArgs(args)) throw new McpError(ErrorCode.InvalidParams, 'Invalid arguments for search_refnr'); apiPath = 'search/refnr'; apiParams = { q: args.q }; break;
  • Input schema definition for the 'search_refnr' tool, specifying a required 'q' string parameter for the reference number search query.
    inputSchema: { type: 'object', properties: { q: { type: 'string', description: 'Search keywords (reference number)' }, }, required: ['q'], },
  • src/index.ts:112-123 (registration)
    Tool registration object for 'search_refnr' including name, description, and input schema, added to the tools list served via ListToolsRequestSchema.
    { name: 'search_refnr', description: 'Search the database by reference number (allows partial matches).', inputSchema: { type: 'object', properties: { q: { type: 'string', description: 'Search keywords (reference number)' }, }, required: ['q'], }, },
  • Shared type guard helper function used to validate arguments for both 'search' and 'search_refnr' tools, ensuring 'q' is a string.
    const isSearchArgs = (args: any): args is { q: string } => typeof args === 'object' && args !== null && typeof args.q === 'string';

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