search_suggest
Find accounts and items in ConsignCloud using full-text search across titles, descriptions, names, emails, and SKUs to retrieve detailed entity information.
Instructions
Search across accounts and items using full-text search. Returns matching entities with their full details.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes | Search query (searches titles, descriptions, names, emails, SKUs, etc.) | |
| types | No | Entity types to search. Options: "items", "accounts". Leave empty to search both. |
Implementation Reference
- src/server.ts:487-489 (handler)Handler for the search_suggest MCP tool. Extracts parameters and calls client.search, returning JSON-formatted results.case 'search_suggest': const { query, types } = args as any; return { content: [{ type: 'text', text: JSON.stringify(await client.search(query, types), null, 2) }] };
- src/server.ts:238-253 (registration)Registers the search_suggest tool in createTools() with name, description, and input schema.{ name: 'search_suggest', description: 'Search across accounts and items using full-text search. Returns matching entities with their full details.', inputSchema: { type: 'object', properties: { query: { type: 'string', description: 'Search query (searches titles, descriptions, names, emails, SKUs, etc.)' }, types: { type: 'array', items: { type: 'string', enum: ['items', 'accounts'] }, description: 'Entity types to search. Options: "items", "accounts". Leave empty to search both.' }, }, required: ['query'], }, },
- src/client.ts:314-322 (helper)Helper method in ConsignCloudClient that performs the actual search by calling the API /search endpoint with query and optional types (mapped to entities).async search(query: string, entities?: string[]): Promise<any> { const params: any = { query }; if (entities && entities.length > 0) { // ConsignCloud expects entities[] as array parameter params.entities = entities; } const response = await this.client.get('/search', { params }); return response.data; }