Skip to main content
Glama

upsert_item

Idempotent

Create or fully replace an item and its products, option groups, and options in a merchant’s iFood catalog through an idempotent update.

Instructions

Create or fully replace an item with its products/optionGroups/options (idempotent).

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "merchant_id": "<merchant_id>",
      "item": "<item>"
    },
    "name": "upsert_item"
  }
}

Input Schema

NameRequiredDescriptionDefault
itemYesThe item object (extra iFood fields allowed).
optionsNoOption definitions (iFood shape).
productsNoProduct definitions (iFood shape).
merchant_idYesMerchant ID
optionGroupsNoOption-group definitions (iFood shape).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.1.0

TDQS

A3.5/5.0
Behavior3/5

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

The annotations already declare readOnlyHint=false, destructiveHint=false and idempotentHint=true, so the repeated "(idempotent)" adds no new information. The valuable addition is "fully replace", which tells the agent that nested collections not included in the payload will not survive — an omission-based data-loss risk that destructiveHint=false alone does not convey. It stops short of stating permissions, validation failures, or what the response contains, and there is a mild tension with the non-destructive annotation that goes unaddressed.

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?

A single front-loaded sentence names the action, the resource, the nested payload, and the key semantic property. No filler or redundant restatement of the name.

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

Completeness3/5

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

For a 5-parameter tool with nested objects and no output schema, the description covers what must be sent (item plus nested collections) and the replace semantics, which is the essential contract. It omits what the call returns, error/validation behavior, and any permission prerequisites — acceptable gaps for a catalog write, but not a complete picture.

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 the item object and the products/optionGroups/options arrays. The description only enumerates those same nested collections without adding shape detail, merge rules, or constraints (e.g. whether nested ids must be pre-existing). Baseline 3 is appropriate.

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

Purpose4/5

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

The description uses a precise verb pair ("Create or fully replace") plus a named resource (item) and its nested collections (products/optionGroups/options), so an agent knows this is a whole-object write, not a field patch. It does not name the partial-update siblings (update_item_price, update_item_status), leaving that distinction implicit, but the verb is specific enough to avoid ambiguity.

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

Usage Guidelines3/5

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

The parenthetical "(idempotent)" and "fully replace" imply that this is the safe-repeat option for building or overwriting an entire item, which indirectly signals when to prefer it over single-field updates. However, no explicit when-to-use or when-not-to-use guidance and no named alternative is given, so the agent must infer the boundary with update_item_price/update_item_status.

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