Skip to main content
Glama
bigl34

inFlow Inventory MCP Server

by bigl34

upsert_sales_order

Create or update a sales order: partial updates preserve unmentioned fields and lines, merge item patches, delete listed lines; omit id to create. Legacy high-risk write; prefer set_sales_order.

Instructions

[LEGACY IMMEDIATE WRITE — HIGH RISK: BYPASSES INFLOW_ENABLE_SAFE_WRITES] Use set_sales_order instead. Create a new sales order or update an existing one. When id is provided, performs a partial update: unmentioned header fields and line items are preserved, item patches are merged into existing lines by id (or unambiguous productId), and lines listed in deleteLineIds are removed. Without id, creates a new order from the provided fields.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idNoSales order ID (required for updates)
itemsNoOrder line items. For updates, each item patches an existing line when it has a matching `id` (salesOrderLineId) or unambiguous `productId`; items without a match are appended as new lines. Unmentioned existing lines are preserved.
remarksNoOrder remarks/notes
orderDateNoOrder date (ISO format)
timestampNoTimestamp for concurrency control
customerIdNoCustomer ID (required for creates; preserved from the existing order on updates)
locationIdNoLocation/warehouse ID
orderNumberNoOrder number
currencyCodeNoCurrency code (e.g., USD)
customFieldsNoCustom field values
requiredDateNoRequired/ship date (ISO format)
deleteLineIdsNosalesOrderLineId values to remove from the order during an update.
billingAddressNoBilling address
paymentTermsIdNoPayment terms ID
taxingSchemeIdNoTaxing scheme ID
nonCustomerCostNoNon-customer cost. Accepts a plain number (e.g. 12.34) or the API money object { value: "12.34000", isPercent: false }. Normalised to the money object before sending, because the Cloud API rejects a bare number with HTTP 422.
pricingSchemeIdNoPricing scheme ID
shippingAddressNoShipping address

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.4.0-alpha.2

TDQS

A4.4/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the behavioral burden and does well: it flags a HIGH RISK legacy immediate write that bypasses INFLOW_ENABLE_SAFE_WRITES, and spells out preservation/merge/delete semantics for updates. It stops short of permissions, concurrency (beyond the schema's `timestamp`), or error behavior, so it is not exhaustive.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loads the warning and the preferred alternative, then describes update vs create semantics. Dense but every clause (bypass risk, replacement tool, preservation rules) earns its place.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For an 18-parameter mutation tool with no annotations and no output schema, the description covers the critical decisions: which tool to use, and how update semantics treat existing fields and lines. Residual gaps on auth and return behavior are minor and partly mitigated by the rich schema.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema already documents id, items, deleteLineIds, customerId and the rest. The description restates the create-vs-update trigger and merge rules rather than adding syntax or format detail beyond the schema, matching the baseline for full coverage.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource (create/update a sales order) and explicitly routes the agent to the sibling `set_sales_order`. The id-present vs id-absent split lets an agent distinguish create from update without opening the schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly names the preferred alternative ('Use set_sales_order instead') and conditions usage on whether `id` is supplied. When-to-use and when-not-to-use are both stated, not inferred.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Deploy Server

Other Tools