create_account
Create a new vendor or consignor account in ConsignCloud to manage inventory, sales, and business operations through the MCP server.
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:466-467 (handler)MCP tool handler for 'create_account' that executes client.createAccount with tool arguments and returns JSON-stringified result.case 'create_account': return { content: [{ type: 'text', text: JSON.stringify(await client.createAccount(args as any), null, 2) }] };
- src/server.ts:159-177 (registration)Registration of the 'create_account' tool in createTools() array, including description and input schema definition.{ 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/types.ts:35-48 (schema)TypeScript interface for Account used in createAccount parameters and response.export interface Account { id: string; number: string; first_name: string | null; last_name: string | null; company: string | null; email: string | null; phone_number: string | null; balance: number; // converted to store currency default_split: number; default_inventory_type: 'consignment' | 'buy_outright' | 'retail'; is_vendor: boolean; created: string; }
- src/client.ts:208-216 (helper)Core helper function in ConsignCloudClient that handles the API POST to create a new account, including currency conversion and response processing.async 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); }