Skip to main content
Glama

get_batch_mail

Read-onlyIdempotent

A batch with its status (draft → paid → generating → submitted → in_progress → completed | partially_completed | failed; cancelled), recipient summary, pricing (credits_charged, refunded_cents), field_kit, tracking (QR pieces scanned and confirmed), links and the first 50 pieces, each with its qr (code, link, your ref, scans, first_scanned_at, confirmed_at, expires_at; sandbox verify pieces also carry short_code). Poll it after confirm; batch.submitted / batch.completed also arrive on the agent's webhook. Every piece: page with offset and limit, or ask for the pieces scanned, confirmed (verify: the address verified) or not_scanned with qr; REST: GET /v1/batch-mail/{id}/pieces.

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": {
      "batch_id": "<batch_id>"
    },
    "name": "get_batch_mail"
  }
}

Input Schema

NameRequiredDescriptionDefault
qrNoOnly the pieces whose QR code was scanned, confirmed (verify: the address verified) or not scanned yet. Batches with QR codes only.
limitNoPieces per page, default 50.
offsetNoPieces to skip, default 0.
batch_idYesThe batch's id (UUID).

Output Schema

NameRequiredDescriptionDefault
resultYesbatch, pieces (in mailing order; the first 50 unless qr, limit or offset say otherwise) and pagination.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / batch_id / description
      Previous value: -"The batch's id (UUID) from create_batch_mail or list_batch_mail."New value: +"The batch's id (UUID)."
  2. Changed4 schema fields changed
    • addedInput schema / properties / limit
      Added value: +{
      +  "description": "Pieces per page, default 50.",
      +  "maximum": 100,
      +  "minimum": 1,
      +  "type": "integer"
      +}
    • addedInput schema / properties / offset
      Added value: +{
      +  "description": "Pieces to skip, default 0.",
      +  "maximum": 10000,
      +  "minimum": 0,
      +  "type": "integer"
      +}
    • addedInput schema / properties / qr
      Added value: +{
      +  "description": "Only the pieces whose QR code was scanned, confirmed (verify: the address verified) or not scanned yet. Batches with QR codes only.",
      +  "enum": [
      +    "scanned",
      +    "confirmed",
      +    "not_scanned"
      +  ],
      +  "type": "string"
      +}
    • changedOutput schema / properties / result / description
      Previous value: -"batch and pieces (first 50 in mailing order)."New value: +"batch, pieces (in mailing order; the first 50 unless qr, limit or offset say otherwise) and pagination."
  3. Added

TDQS

A3.6/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent, closed-world and non-destructive, so the bar is lower — yet the description adds real behavior: the full status state machine (draft → paid → generating → submitted → in_progress → completed/partially_completed/failed; cancelled) and the fact that only the first 50 pieces are returned by default. It doesn't mention what happens for an unknown or unauthorized batch_id, which is the main remaining gap.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness2/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The entire description is one run-on sentence built from semicolons and nested parentheticals, so nothing is front-loaded and the reader must parse a field dump to find the purpose. It also spends most of its length enumerating return fields that the output schema already defines, which is redundant against the structured data.

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?

Because an output schema exists, the long field enumeration is not required, and the genuinely necessary content (state machine, default piece cap of 50, webhook alternative, REST equivalent) is all present. The missing piece is failure behavior — no note on what an invalid or unknown batch_id returns, nor any mention of auth/permission requirements for fetching a batch.

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% and the schema already documents batch_id, limit (default 50, max 100), offset, and the qr enum including the 'verify: the address verified' clarification. The description merely restates the qr filter meanings and pagination ('page with offset and limit') in prose, adding no syntax or semantics beyond the structured field descriptions — baseline 3.

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 makes clear this returns a single batch record with its status, recipient summary, pricing, tracking, links and pieces — an agent can distinguish it from list_batch_mail or get_batch_mail_proof from the content alone. It loses a point because it never states a verb ('Get/Retrieve') and never explicitly contrasts itself with its closest sibling, so the distinction is inferred rather than declared.

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?

'Poll it after confirm' gives an explicit trigger, and 'batch.submitted / batch.completed also arrive on the agent's webhook' names the alternative channel for the same information. There is no explicit when-not guidance (e.g., use list_batch_mail for enumeration, or don't poll in a tight loop), but the usage context is concrete.

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.