Skip to main content
Glama

Add Line Item

add_line_item

Add a line item to a booking (e.g. 'extra half hour', travel). The amount (price x quantity) is added to the booking total.

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": {
      "id": "<id>",
      "description": "<description>",
      "price": "<price>"
    },
    "name": "add_line_item"
  }
}

Input Schema

NameRequiredDescriptionDefault
idYesThe record's numeric id, from the matching list/get/search tool.
priceYesAn amount in US dollars, e.g. 250 or 250.00.
quantityNo
descriptionYesA free-text description.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changed
    • addedInput schema / properties / description / description
      Added value: +"A free-text description."
    • addedInput schema / properties / id / description
      Added value: +"The record's numeric id, from the matching list/get/search tool."
    • addedInput schema / properties / price / description
      Added value: +"An amount in US dollars, e.g. 250 or 250.00."
  2. First observed

TDQS

A3.8/5.0
Behavior4/5

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

Annotations only declare that this is a non-destructive, non-idempotent write; the description goes further by disclosing the derived computation ('amount (price x quantity)') and the side effect that this amount is added to the booking total, which is real behavioral context an agent could not infer from the schema. It still omits whether the booking's stored total is recalculated synchronously, whether retries would duplicate the charge (relevant given idempotentHint=false), and any permission requirements.

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 short sentences, zero filler, with the primary action front-loaded before the pricing side effect. Every sentence carries information the agent needs.

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 simple four-parameter creation tool with annotations covering the safety profile and no output schema, the description covers the essential purpose and the pricing side effect. The remaining gap is minor but notable: nothing says what the call returns (e.g. the new line item's id) or how an absent quantity is handled.

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 75%, and the description adds genuine meaning for two fields: it clarifies that price is multiplied by quantity to produce the amount, and it illustrates the free-text description field. However, quantity has no schema description and no default is stated anywhere, and the description does not say what happens when quantity is omitted, so the undocumented parameter remains ambiguous.

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 gives a specific verb and resource ('Add a line item to a booking') and illustrates the resource with concrete examples ('extra half hour', travel), so the agent knows exactly what is created. It does not name its immediate siblings add/remove/update_line_item, but the verb 'add' combined with the title is unambiguous enough to distinguish it from remove_line_item and update_line_item.

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?

Usage is implied by 'add a line item to a booking', but there is no explicit statement of when to add a line item versus when to use update_line_item or when to create a fresh booking, and no prerequisites are given (e.g. that the booking must already exist or be in a mutable state). An agent must infer the conditions from the sibling names alone.

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