create_batch
Create a new batch of items for inventory management in consignment operations by specifying account ID and description.
Instructions
Create a new batch of items
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| description | No | ||
| account | No | Account ID |
Implementation Reference
- src/client.ts:248-250 (handler)Primary handler function that implements the create_batch tool logic by making a POST request to the '/batches' API endpoint using axios.async createBatch(data: Partial<Batch>): Promise<Batch> { const response = await this.client.post('/batches', data); return response.data;
- src/server.ts:502-503 (handler)MCP server-side handler for the 'create_batch' tool call, which delegates to the client.createBatch method and formats the response as MCP content.case 'create_batch': return { content: [{ type: 'text', text: JSON.stringify(await client.createBatch(args as any), null, 2) }] };
- src/server.ts:303-313 (registration)Registration of the 'create_batch' tool in the createTools() function, including name, description, and input schema.{ name: 'create_batch', description: 'Create a new batch of items', inputSchema: { type: 'object', properties: { description: { type: 'string' }, account: { type: 'string', description: 'Account ID' }, }, }, },
- src/types.ts:50-58 (schema)TypeScript interface definition for Batch, used as input/output type for createBatch (Partial<Batch> input, Batch output). Defines the structure of batch data.export interface Batch { id: string; created: string; status: 'submitted' | 'draft'; platform_editing_on: 'portal' | 'consigncloud'; number: string; description: string | null; account: string | null; }