Skip to main content
Glama

List batches

list_batches
Read-onlyIdempotent

Lists the workspace's batches, newest first, one page at a time, with each batch's ID, name, status, and total, completed, failed, and processing job counts; total counts every match, so it also answers how many batches exist. search matches part of a batch name, ignoring case, and templateId keeps one template's batches. For one known batch ID, get_batch returns the same counts, and job details are in get_batch_jobs. Needs batches:read.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "list_batches"
  }
}

Input Schema

NameRequiredDescriptionDefault
pageNoPage number, starting at 1
limitNoResults per page (default 10); values above 20 are capped at 20
searchNoText matched against batch names
templateIdNoOnly batches with jobs for this template

Output Schema

NameRequiredDescriptionDefault
pageYes
itemsYes
limitYesPage size actually applied
totalYesCount of all matches across every page

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changed
    • removedInput schema / properties / templateId / format
      Removed value: -"uuid"
    • addedInput schema / properties / templateId / minLength
      Added value: +1
    • removedInput schema / properties / templateId / pattern
      Removed value: -"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"
  2. Changed13 schema fields changed
    • removedInput schema / additionalProperties
      Removed value: -false
    • addedInput schema / properties / limit / maximum
      Added value: +9007199254740991
    • addedInput schema / properties / page / maximum
      Added value: +9007199254740991
    • addedInput schema / properties / templateId / pattern
      Added value: +"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"
    • addedOutput schema / properties / items / items / properties / cancelledRows / maximum
      Added value: +9007199254740991
    • addedOutput schema / properties / items / items / properties / completedRows / maximum
      Added value: +9007199254740991
    • addedOutput schema / properties / items / items / properties / failedRows / maximum
      Added value: +9007199254740991
    • addedOutput schema / properties / items / items / properties / id / pattern
      Added value: +"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"
    • addedOutput schema / properties / items / items / properties / processingRows / maximum
      Added value: +9007199254740991
    • addedOutput schema / properties / items / items / properties / totalRows / maximum
      Added value: +9007199254740991
    • addedOutput schema / properties / limit / maximum
      Added value: +9007199254740991
    • addedOutput schema / properties / page / maximum
      Added value: +9007199254740991
    • addedOutput schema / properties / total / maximum
      Added value: +9007199254740991
  3. First observed

TDQS

A4.6/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent, non-destructive, closed-world, so the safety profile is covered. The description adds genuinely new behavior: newest-first ordering, page-at-a-time paging, the required 'batches:read' permission, and the meaning of the total field. It does not restate annotation facts.

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

Conciseness4/5

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

Front-loaded with the core action and return shape, then filters, then alternatives and permission. Dense and mostly efficient, though the first sentence is a long, semicolon-chained run-on that takes a second pass to parse.

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?

An output schema exists so return values needn't be spelled out, yet the description still summarizes them; permission requirements, ordering, pagination, filter semantics, and sibling routing are all present. Nothing an agent needs to call this correctly is missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so baseline is 3, but the description adds real meaning: 'search' is a case-insensitive partial name match (schema only says 'Text matched against batch names') and templateId is described in terms of keeping one template's batches. Page/limit semantics are left to the schema, which is fine given its coverage.

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 (lists the workspace's batches) plus ordering ('newest first'), pagination, and exactly which fields each row carries (ID, name, status, total/completed/failed/processing counts). It is immediately distinguishable from get_batch and get_batch_jobs, which are explicitly named.

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?

Explicitly routes the agent: 'For one known batch ID, get_batch returns the same counts, and job details are in get_batch_jobs.' It also explains what the two filters do and notes that total counts every match, so the tool can answer a counting question.

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