Skip to main content
Glama
modellers

ConsignCloud MCP Server

by modellers

create_item

Add new inventory items to ConsignCloud by specifying title, price, category, and inventory type for consignment 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 handler function that implements the logic to create a new inventory item by converting currency values to API format (cents), making a POST request to the ConsignCloud /items endpoint, and converting the 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)
    Registration of the 'create_item' tool in the tools array returned by createTools(), including name, description, and detailed input schema.
    {
      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 request handler dispatch case for 'create_item' tool call, which invokes the client.createItem method and returns JSON response.
    case 'create_item':
      return { content: [{ type: 'text', text: JSON.stringify(await client.createItem(args as any), null, 2) }] };
  • TypeScript interface definition for Item, used as the basis for create_item input (Partial<Item>) and output.
    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[];
    }

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