Skip to main content
Glama

Merge two pantry rows

merge_pantry_foods
DestructiveIdempotent

Merge two pantry rows the household says are the same food. The first stops being its own row and reads as the second, which keeps its name. The food keys are the ones get_inventory gives. The household can split them again in the app.

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": {
      "fromFoodKey": "<fromFoodKey>",
      "toFoodKey": "<toFoodKey>"
    },
    "name": "merge_pantry_foods"
  }
}

Input Schema

NameRequiredDescriptionDefault
toFoodKeyYesCanonical lowercase key of the row that survives and gives the merged row its name, e.g. 'pasta'.
fromFoodKeyYesCanonical lowercase key of the row that stops being its own, e.g. 'fusilli'.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already flag destructiveHint=true and idempotentHint=true, yet the description adds real value: it says which row disappears, which row's name survives, and that the household can undo the merge in the app. It stops short of saying what happens to quantities, observations, or shopping items attached to the absorbed row, which is the key remaining risk for a destructive merge.

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?

Four short sentences, each carrying distinct information: the action, the direction/survivor rule, key provenance, and reversibility. Front-loaded with no filler.

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 a two-parameter, no-output-schema tool with rich annotations, this covers action, direction, key source, and reversibility. The only gap is the fate of data attached to the absorbed row, which an agent might reasonably want before invoking a destructive merge.

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 coverage is 100%, so both keys are already documented with examples ('pasta', 'fusilli'). The description contributes one extra fact — that the keys are the ones get_inventory returns — which is useful provenance but not much beyond the schema baseline.

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 ("merge two pantry rows") plus the domain condition ("the household says are the same food"). The second sentence resolves the direction ambiguity, so an agent knows exactly what the operation does 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 Guidelines4/5

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

Gives a clear triggering condition: use it when the household asserts two rows are the same food. No siblings compete for this job, but the description never states when NOT to merge (e.g. differing units or brands), so it falls short of explicit exclusions.

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