Skip to main content
Glama

batch_judge

Run judge evaluations at scale across item lists with bounded concurrency, returning per-item scores, summary stats, and error counts; optionally write JSONL results for resume.

Instructions

Run judge evaluations at scale on a list of items.

Processes items with bounded concurrency using a shared pool of diverse judges. Returns per-item scores, summary statistics (mean, stdev, min, max per dimension), and error counts.

Each item in the list should have a "prompt" key with the evaluation prompt, and an optional "metadata" key for tracking (e.g. language, entry ID).

When results_file is set, each scored item is appended as a JSON line immediately after scoring. On interruption, the file contains all completed items. On resume (same results_file), already-scored indices are skipped automatically.

Args: items: List of {"prompt": "...", "metadata": {...}} dicts rubric: List of scoring dimensions (e.g. ["accuracy", "naturalness"]) scale: Rating scale as "min-max" (default "1-5") judge_count: Judges per item (default 3) min_tier: Minimum quality tier for judge selection (default "A") free_only: If true, only use free models as judges output_format: How judges format scores — "csv" (default) or "json" concurrency: Max items evaluated in parallel (default 5) max_tokens: Max response tokens per judge (default 256) temperature: Sampling temperature (default 0.0) results_file: Path to JSONL file for incremental writes and resume support exclude_providers: Skip these hosts (the producer) exclude_model_ids: Skip these model ids

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": {
      "items": "<items>",
      "rubric": "<rubric>"
    },
    "name": "batch_judge"
  }
}

Input Schema

NameRequiredDescriptionDefault
itemsYes
scaleNo1-5
rubricYes
min_tierNoA
free_onlyNo
max_tokensNo
concurrencyNo
judge_countNo
temperatureNo
results_fileNo
output_formatNocsv
exclude_model_idsNo
exclude_providersNo

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changedv0.15.1
    • addedInput schema / additionalProperties
      Added value: +false
    • addedInput schema / properties / exclude_model_ids
      Added value: +{
      +  "anyOf": [
      +    {
      +      "items": {
      +        "type": "string"
      +      },
      +      "type": "array"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "title": "Exclude Model Ids"
      +}
    • addedInput schema / properties / exclude_providers
      Added value: +{
      +  "anyOf": [
      +    {
      +      "items": {
      +        "type": "string"
      +      },
      +      "type": "array"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "title": "Exclude Providers"
      +}
  2. First observedv0.7.0

TDQS

A4/5.0
Behavior4/5

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

With no annotations, the description carries the full behavioral burden and does substantial work: bounded concurrency via a shared judge pool, per-item scores plus summary statistics and error counts, and precise incremental-write/resume semantics (JSONL appended per item, already-scored indices skipped on reuse of the same file). It omits cost, auth, and failure/partial-error handling, which keeps it short of a 5.

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 purpose and return shape, then a scannable Args block where each entry carries information. Slight bloat in the multi-line wrapping and the ambiguous 'exclude_providers' gloss, but no sentence is pure filler.

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 13-parameter batch tool, the definition covers inputs, defaults, output content, and file/resume lifecycle, and an output schema exists so return details need not be spelled out. Remaining gaps are operational rather than structural: failure modes per item and what an error count implies for results.

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

Parameters5/5

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

Schema coverage is 0% with 13 params, so the description must compensate and it largely does, documenting the required items shape ({"prompt", "metadata"}), the rubric format, scale as "min-max", judgement of min_tier, free_only, output_format csv/json, concurrency, max_tokens, temperature, and both exclusion filters. Meaning is added well beyond bare titles, though 'min_tier' does not enumerate available tiers and 'exclude_providers' is oddly phrased as 'skip these hosts (the producer)'.

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?

States a specific verb+resource+scope: judge evaluations at scale on a list of items, with a shared pool of diverse judges. It implicitly distinguishes itself from the single-item 'judge' sibling via 'at scale on a list of items', but never names or contrasts an alternative explicitly.

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 'at scale on a list of items' and the results_file/resume narrative gives a clear picture of the long-running batch workflow. However, there is no explicit when-to-use-this-vs-judge guidance and no exclusions or prerequisites (cost, rate limits, credentials) stated.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.