Skip to main content
Glama

update_inventory_item

Idempotent

Patch an existing inventory item. Only provided fields change.

Authenticated. Required OAuth scope: `inventory:write`. Caller must
own the item (404 otherwise — we don't leak existence).

Idempotent: calling twice with the same input yields the same final
state. For lifecycle convenience, see `mark_for_sale` and
`mark_sold` which set the right combination of fields atomically.

Args:
    item_id: ID of the inventory row to update. Get from
        `get_my_inventory` or `add_inventory_item`'s return value.
    (every other param matches `add_inventory_item`; omit any field
    you don't want changed.)
    api_key: Optional API key (`pk_*`, generate at /account).
        Used when there is no OAuth token, and also when the OAuth
        token lacks the required scope — an explicitly passed key
        overrides an ambient token that is scoped too narrowly.
        An invalid or revoked token still fails regardless.

Returns:
    The updated inventory row, or ``{"error": ...}`` on auth /
    not-found / validation failure.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameNo
notesNo
statusNo
api_keyNo
item_idYes
projectNo
quantityNo
conditionNo
product_idNo
external_idNo
asking_priceNo
purchased_atNo
external_linkNo
asking_currencyNo
acquisition_priceNo
acquisition_currencyNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • removedInput schema / properties / contact
      Removed value: -{
      -  "anyOf": [
      -    {
      -      "type": "string"
      -    },
      -    {
      -      "type": "null"
      -    }
      -  ],
      -  "default": null,
      -  "title": "Contact"
      -}
  2. Changed1 schema field changed
    • addedInput schema / properties / contact
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "title": "Contact"
      +}
  3. Changed1 schema field changed
    • addedInput schema / properties / external_id
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "title": "External Id"
      +}
  4. Added

TDQS

A4.9/5.0
Behavior5/5

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

Beyond the annotations (idempotentHint, readOnlyHint false), it discloses the required OAuth scope, owner-only access with 404 to avoid leaking existence, idempotency, API key override precedence, and the error return format. This is substantial added behavioral context.

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?

The description is well-organized: purpose first, then auth, idempotency, alternatives, arguments, and return value. Every sentence adds important detail; no filler.

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

Completeness5/5

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

For a 16-parameter tool with no output schema, the description covers auth, ownership, idempotency, patch behavior, alternative tools, and return shape. It gives an agent sufficient context to invoke the tool correctly, including failure modes.

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

Parameters4/5

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

It explains item_id (where to get it) and api_key (when to use, precedence over OAuth) in detail, and clarifies the crucial patch rule: omit any field to leave it unchanged. The remaining 14 params are deferred to add_inventory_item, which is a useful cross-reference but leaves their semantics to another tool.

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?

The description opens with 'Patch an existing inventory item. Only provided fields change,' which uses a specific verb, resource, and clear partial-update semantics. It distinguishes itself from siblings like add_inventory_item and the lifecycle helpers mark_for_sale/mark_sold.

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?

It explicitly directs users to mark_for_sale and mark_sold for lifecycle changes, says when this tool is appropriate for arbitrary field updates, and clarifies auth/ownership requirements. This is clear contextual guidance with named alternatives.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources