search_suggest
Find accounts and inventory items in ConsignCloud by searching titles, descriptions, names, emails, or SKUs with full-text search to retrieve complete entity details.
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/client.ts:314-322 (handler)Core handler function that executes the search_suggest tool logic by making an HTTP GET request to the ConsignCloud API's /search endpoint with the query and optional entity types.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; }
- src/server.ts:241-252 (schema)Input schema defining the parameters for the search_suggest tool: required 'query' string and optional 'types' array.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/server.ts:238-253 (registration)Registers the search_suggest tool in the MCP tools list returned by createTools(), including name, description, and 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/server.ts:487-489 (handler)MCP server dispatch handler for search_suggest tool calls, extracting arguments and delegating to ConsignCloudClient.search().case 'search_suggest': const { query, types } = args as any; return { content: [{ type: 'text', text: JSON.stringify(await client.search(query, types), null, 2) }] };