Skip to main content
Glama
watchdealer-pavel

WatchBase MCP Server

search_refnr

Find watches in the WatchBase database by entering a reference number, supporting partial matches for flexible searching.

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 input arguments, sets API path to 'search/refnr', and query parameter to the provided '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;
  • src/index.ts:109-120 (registration)
    Tool registration entry defining the name, description, and input schema for 'search_refnr'. This is part of the tools array returned by ListToolsRequestSchema handler.
    { 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'], }, },
  • Type guard (schema validation) for input arguments of 'search_refnr' tool, ensuring args is an object with a string 'q' property.
    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