Skip to main content
Glama

Register a bag

register_bag

Register another bag of a coffee that is already in list_beans: the same roaster's product, bought again. It keeps the coffee's recipes, notes and history; only the purchase facts (roast date, weight, price, state) are new. Does not change the active coffee. Returns a bag_id: bag numbers are their own series, separate from bean numbers. For a coffee that is not in list_beans yet, call register_coffee instead.

Input Schema

NameRequiredDescriptionDefault
eanNo
costNo
stateNoDefaults to sealed; the first log_shot against it opens it
bean_idYesThis account's own coffee number, from list_beans. Never guess one.
qr_codeNo
storageNo
buy_dateNoCalendar day in YYYY-MM-DD format: a day, not a timestamp
currencyNo
bag_notesNoNotes about THIS bag (a batch note, where it was bought). The coffee's own description lives on the coffee, in notes.
product_idNoSet by the apps. Leave out.
roast_dateYesCalendar day in YYYY-MM-DD format: a day, not a timestamp
opened_dateNoCalendar day in YYYY-MM-DD format: a day, not a timestamp
bag_weight_gNoBag weight in grams
best_by_dateNoCalendar day in YYYY-MM-DD format: a day, not a timestamp
lot_revision_idNoSet by the apps. Leave out.
catalog_coffee_idNoSet by the apps. Leave out.

Output Schema

NameRequiredDescriptionDefault
bag_idYes
statusYes
bean_idYes
messageYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed7 schema fields changed
    • changedInput schema / 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 / 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"
    • addedInput schema / properties / catalog_coffee_id
      Added value: +{
      +  "description": "Set by the apps. Leave out.",
      +  "type": "string"
      +}
    • addedInput schema / properties / lot_revision_id
      Added value: +{
      +  "description": "Set by the apps. Leave out.",
      +  "type": "string"
      +}
    • changedInput schema / 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"
    • addedInput schema / properties / product_id
      Added value: +{
      +  "description": "Set by the apps. Leave out.",
      +  "type": "string"
      +}
    • changedInput schema / 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"
  2. Added

TDQS

A4.5/5.0
Behavior4/5

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

Annotations declare a non-readonly, non-idempotent, non-destructive create, and the description adds real behavioral context beyond that: what is inherited (recipes, notes, history) versus what is new (roast date, weight, price, state), plus the bag_id return and that bag numbers are a separate series from bean numbers. It stops short of covering failure modes or duplicate handling, but the inheritance/no-active-change details are the valuable part.

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, front-loaded with the core action before the inheritance rule, the return-value caveat, and the alternative. Nothing repeats the name or the schema, and every sentence carries information an agent needs.

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 create tool with annotations and an output schema, the description covers the essential gap areas: which entity is being extended, what is conserved, the id semantics of the return, and the sibling to use instead. Remaining detail (formats, defaults, optional fields) is delegated correctly to the 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 coverage is 69% and the schema already documents the dates, state default, bag_notes scoping and product_id guidance, so the baseline is a 3. The description does add a useful partition by naming the 'purchase facts (roast date, weight, price, state)' that are new per bag, but it leaves the remaining undocumented fields (ean, cost, storage, currency) untouched.

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 ('Register another bag of a coffee that is already in list_beans') and pins the scope to a repeat purchase of the same roaster's product. It explicitly distinguishes itself from register_coffee, so an agent can choose without opening either 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?

Gives both the when ('coffee already in list_beans... bought again') and the when-not with a named alternative ('For a coffee that is not in list_beans yet, call register_coffee instead'). It also rules out a side effect an agent might assume ('Does not change the active coffee').

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