suggest_field_values
Provides auto-complete suggestions for inventory and account fields based on existing data to ensure consistent data entry and reduce errors.
Instructions
Get auto-complete suggestions for a specific field (brand, color, size, tags, etc.) based on existing data.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| entity | Yes | Entity type: items or accounts | |
| field | Yes | Field name: For items: brand, color, size, description, tags, or custom field slug. For accounts: tags | |
| value | Yes | Partial value to match (e.g., "vin" to find "Vintage Heritage") |
Implementation Reference
- src/server.ts:255-276 (registration)Tool registration including name, description, and input schema definition.name: 'suggest_field_values', description: 'Get auto-complete suggestions for a specific field (brand, color, size, tags, etc.) based on existing data.', inputSchema: { type: 'object', properties: { entity: { type: 'string', enum: ['items', 'accounts'], description: 'Entity type: items or accounts' }, field: { type: 'string', description: 'Field name: For items: brand, color, size, description, tags, or custom field slug. For accounts: tags' }, value: { type: 'string', description: 'Partial value to match (e.g., "vin" to find "Vintage Heritage")' } }, required: ['entity', 'field', 'value'], }, },
- src/server.ts:491-493 (handler)MCP server handler for suggest_field_values tool. Extracts parameters and delegates execution to the ConsignCloudClient.case 'suggest_field_values': const { entity, field, value } = args as any; return { content: [{ type: 'text', text: JSON.stringify(await client.suggestFieldValues(entity, field, value), null, 2) }] };
- src/client.ts:324-328 (helper)Client-side helper method that implements the core logic by querying the backend /suggest endpoint with the provided parameters.async suggestFieldValues(entity: 'items' | 'accounts', field: string, value: string): Promise<any> { const params = { entity, field, value }; const response = await this.client.get('/suggest', { params }); return response.data; }