Skip to main content
Glama

Update a bag

update_bag
Destructive

Change bag-level facts on one bag of a coffee: open, seal, freeze, thaw or finish it, correct its roast date, weight, grams left or price. Bag numbers come from the bags[] on list_beans (or current_bag_id). For the coffee itself (roaster, origin, roast level, rest window, notes), use update_bean.

Input Schema

NameRequiredDescriptionDefault
bag_idYesThis account's own bag number, from list_beans' bags[]. Never guess one.
fieldsYes
reasonNoOptional free-text note, appended to this bag's notes as an ordinary line. Omit it and nothing is written.

Output Schema

NameRequiredDescriptionDefault
statusYes
messageYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed6 schema fields changed
    • changedInput schema / properties / fields / properties / best_by_date / description
      Previous value: -"Calendar day in YYYY-MM-DD format — a day, not a timestamp"New value: +"Calendar day in YYYY-MM-DD format: a day, not a timestamp"
    • changedInput schema / properties / fields / properties / buy_date / description
      Previous value: -"Calendar day in YYYY-MM-DD format — a day, not a timestamp"New value: +"Calendar day in YYYY-MM-DD format: a day, not a timestamp"
    • changedInput schema / properties / fields / properties / frozen_at / description
      Previous value: -"Calendar day the bag went into the freezer, YYYY-MM-DD — a day, not a timestamp"New value: +"Calendar day the bag went into the freezer, YYYY-MM-DD: a day, not a timestamp"
    • changedInput schema / properties / fields / properties / opened_date / description
      Previous value: -"Calendar day in YYYY-MM-DD format — a day, not a timestamp"New value: +"Calendar day in YYYY-MM-DD format: a day, not a timestamp"
    • changedInput schema / properties / fields / properties / roast_date / description
      Previous value: -"Calendar day in YYYY-MM-DD format — a day, not a timestamp"New value: +"Calendar day in YYYY-MM-DD format: a day, not a timestamp"
    • changedInput schema / properties / fields / properties / unfrozen_at / description
      Previous value: -"Calendar day the bag came out, YYYY-MM-DD — a day, not a timestamp"New value: +"Calendar day the bag came out, YYYY-MM-DD: a day, not a timestamp"
  2. Added

TDQS

A4.2/5.0
Behavior3/5

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

Annotations already declare destructiveHint=true and idempotentHint=false, so the safety profile is covered elsewhere. The description does convey that this mutates bag status (open/seal/freeze/thaw/finish), which is useful context, but it says nothing about whether omitted fields are preserved, whether changes are reversible, or what the response confirms.

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?

Two dense sentences plus a single routing sentence, with the primary purpose front-loaded and the sibling disambiguation last. Every sentence carries distinct information.

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?

Output schema and annotations carry the return shape and safety profile, and the description covers purpose, identifier sourcing, and sibling routing. A mutation tool with a 19-field nested object would ideally state whether the fields object is a partial patch (unmentioned fields preserved) and confirm the destructive semantics, which is the main missing piece.

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 67% and rich field-level descriptions already explain grams_remaining and weight_adjustment_g. The description adds the mapping from plain-language fields (roast date, weight, grams left, price) to the fields object, but says nothing about ean, qr_code, storage, bag_notes, or the optional reason parameter.

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 (change), resource (bag-level facts on one bag of a coffee), and enumerates the concrete operations (open, seal, freeze, thaw, finish, correct roast date/weight/grams left/price). It explicitly distinguishes itself from the sibling update_bean, which handles coffee-level attributes.

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?

Tells the agent where bag identifiers come from (bags[] on list_beans or current_bag_id) and names the alternative tool (update_bean) for coffee-level edits. The only minor gap is that it does not spell out that state transitions happen by setting state = open/frozen/etc., but the operation verbs imply it.

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