Skip to main content
Glama
modellers

ConsignCloud MCP Server

by modellers

update_item

Modify inventory item details like price, quantity, description, and category to maintain accurate stock records in consignment retail operations.

Instructions

Update an existing inventory item

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesItem ID
titleNo
descriptionNo
tag_priceNoPrice in cents
categoryNo
splitNoSplit percentage (0-1)
quantityNo

Implementation Reference

  • src/server.ts:62-78 (registration)
    Registration of the 'update_item' tool, including name, description, and input schema definition.
    { name: 'update_item', description: 'Update an existing inventory item', inputSchema: { type: 'object', properties: { id: { type: 'string', description: 'Item ID' }, title: { type: 'string' }, description: { type: 'string' }, tag_price: { type: 'number', description: 'Price in cents' }, category: { type: 'string' }, split: { type: 'number', description: 'Split percentage (0-1)' }, quantity: { type: 'number' }, }, required: ['id'], }, },
  • MCP tool handler for 'update_item': extracts item ID and data from arguments, calls the client updateItem method, and formats the response as JSON text content.
    case 'update_item': const { id: itemId, ...itemData } = args as any; return { content: [{ type: 'text', text: JSON.stringify(await client.updateItem(itemId, itemData), null, 2) }] };
  • Client-side helper function that implements the actual API update: handles currency conversion, sends PATCH request to /items/{id}, and converts the response.
    async updateItem(id: string, 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.patch(`/items/${id}`, apiData); return this.convertItemResponse(response.data); }

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