suggest_field_values
Get auto-complete suggestions for inventory and account fields like brand, color, size, and tags based on existing data to ensure consistency and accuracy.
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/client.ts:324-328 (handler)Core handler function implementing the suggest_field_values tool logic by making an API GET request to the '/suggest' endpoint with entity, field, and value 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; }
- src/server.ts:254-276 (schema)Input schema and tool metadata definition for the suggest_field_values tool, used for MCP tool listing and validation.{ 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-side handler case that processes tool calls for suggest_field_values and delegates execution to the ConsignCloudClient instance.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) }] };