create_account
Create a new vendor or consignor account in ConsignCloud to manage inventory, sales, and business operations. Specify contact details, default split, and inventory type.
Instructions
Create a new vendor/consignor account
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| first_name | No | ||
| last_name | No | ||
| company | No | ||
| No | |||
| phone_number | No | ||
| default_split | No | Default split (0-1) | |
| default_inventory_type | No |
Implementation Reference
- src/server.ts:159-177 (registration)Tool registration in createTools() array, including name, description, and input schema for 'create_account'{ name: 'create_account', description: 'Create a new vendor/consignor account', inputSchema: { type: 'object', properties: { first_name: { type: 'string' }, last_name: { type: 'string' }, company: { type: 'string' }, email: { type: 'string' }, phone_number: { type: 'string' }, default_split: { type: 'number', description: 'Default split (0-1)' }, default_inventory_type: { type: 'string', enum: ['consignment', 'buy_outright', 'retail'] }, }, }, },
- src/server.ts:466-467 (handler)MCP server tool handler for 'create_account': calls client.createAccount and returns JSON stringified responsecase 'create_account': return { content: [{ type: 'text', text: JSON.stringify(await client.createAccount(args as any), null, 2) }] };
- src/client.ts:208-216 (helper)Core implementation of createAccount in ConsignCloudClient: POST to /accounts API, handles currency conversion via convertToApiCents, converts response with convertAccountResponseasync createAccount(data: Partial<Account>): Promise<Account> { // Convert user input to API cents const apiData = { ...data, balance: data.balance ? this.convertToApiCents(data.balance) : undefined, }; const response = await this.client.post('/accounts', apiData); return this.convertAccountResponse(response.data); }