Skip to main content
Glama
modellers

ConsignCloud MCP Server

by modellers

create_item

Add new inventory items to ConsignCloud with title, price, category, and inventory type for consignment, buy-outright, or retail operations.

Instructions

Create a new inventory item

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
titleYesItem title
descriptionNoItem description
tag_priceYesPrice in cents
categoryNoCategory ID
accountNoAccount ID (vendor/consignor)
inventory_typeNoType of inventory
splitNoSplit percentage (0-1)
quantityNoQuantity
locationNoLocation ID

Implementation Reference

  • Core implementation of createItem: converts price/cost to API cents format and performs POST request to /items endpoint, then converts response back to store currency.
    async createItem(data: Partial<Item>): Promise<Item> { // Convert user input to API cents const apiData = { ...data, tag_price: data.tag_price ? this.convertToApiCents(data.tag_price) : undefined, cost: data.cost ? this.convertToApiCents(data.cost) : undefined, }; const response = await this.client.post('/items', apiData); return this.convertItemResponse(response.data); }
  • src/server.ts:39-61 (registration)
    Tool registration in MCP server including name, description, and input schema validation.
    { name: 'create_item', description: 'Create a new inventory item', inputSchema: { type: 'object', properties: { title: { type: 'string', description: 'Item title' }, description: { type: 'string', description: 'Item description' }, tag_price: { type: 'number', description: 'Price in cents' }, category: { type: 'string', description: 'Category ID' }, account: { type: 'string', description: 'Account ID (vendor/consignor)' }, inventory_type: { type: 'string', enum: ['consignment', 'buy_outright', 'retail'], description: 'Type of inventory' }, split: { type: 'number', description: 'Split percentage (0-1)' }, quantity: { type: 'number', description: 'Quantity' }, location: { type: 'string', description: 'Location ID' }, }, required: ['title', 'tag_price'], }, },
  • MCP server dispatch handler for 'create_item' tool call, invoking client.createItem.
    case 'create_item': return { content: [{ type: 'text', text: JSON.stringify(await client.createItem(args as any), null, 2) }] };
  • TypeScript interface defining the Item type used in createItem parameters and return type.
    export interface Item { id: string; title: string; description: string | null; tag_price: number; // converted to store currency (e.g., ISK, USD) cost?: number; // converted to store currency category: string | null; account: string | null; inventory_type: 'consignment' | 'buy_outright' | 'retail'; split: number; // 0-1 quantity: number; status: string; location: string | null; batch: string | null; created: string; sold: string | null; custom_fields?: any[]; }
  • Helper function to convert store currency amounts to API cents format, used in createItem.
    private convertToApiCents(amount: number | null | undefined): number { if (amount == null) return 0; // Convert to API cents (1000 ISK = 100000 cents, 10.00 USD = 1000 cents) return Math.round(amount * 100); }

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/modellers/mcp-consigncloud'

If you have feedback or need assistance with the MCP directory API, please join our Discord server