Skip to main content
Glama

try_evaluator

Tests an Evaluation Function against a session to validate a draft evaluator or judge a replay, returning metrics, rationales, and error details.

Instructions

Tries Evaluator source on one Session and returns what it found. Persists nothing.

Use it to check a draft before showing it as ready, and to judge a replayed Session against its source. The source is an Evaluation Function: a Python function that reads one Session and reports named Metrics declared with @metrics. To try a saved Evaluator, read a version's python_code with get_evaluator and pass it. A try that judges with a model costs a model call per judged turn on the customer's provider.

test_case_id hands the Evaluation Function that Dataset test case's expected data, so a correctness Evaluator can be tried on any Session; leave it out to use the test case the Session replayed, if any.

outcome ERRORED means the code broke: read error_detail and fix it. metrics are the values per address with their rationales. trace_summary says which Session Tools the evaluator called. If status is RUNNING the wait ran out: poll get_evaluation_try. :param pipeline_name: Name of the pipeline the Session belongs to. :param python_code: The Evaluation Function's source. :param session_id: The Session to judge: a search_session_id, or a single-turn run's query_id. :param test_case_id: A Dataset test case whose expected data the Evaluation Function receives. :param wait_seconds: How long to wait for the result before handing back the id to poll. :returns: The try report, or an error message.

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": {
      "pipeline_name": "<pipeline_name>",
      "python_code": "<python_code>",
      "session_id": "<session_id>"
    },
    "name": "try_evaluator"
  }
}

Input Schema

NameRequiredDescriptionDefault
session_idYes
python_codeYes
test_case_idNo
wait_secondsNo
pipeline_nameYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.1.44
    • addedInput schema / properties / test_case_id
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "title": "Test Case Id"
      +}
  2. Addedv0.1.29

TDQS

A4.7/5.0
Behavior5/5

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

With no annotations at all, the description carries the full burden and does so: it discloses that nothing is persisted, that a model-judging try costs a model call per judged turn on the customer's provider, and what each outcome means (ERRORED → read error_detail; RUNNING → wait expired, poll get_evaluation_try). That is unusually rich cost, side-effect, and failure-mode disclosure for a mutation-adjacent tool.

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 and information-dense, but the prose paragraphs and the trailing :param:/:returns: block restate each other (test_case_id and session_id are explained twice), which is genuine duplication. Nothing is off-topic, but a tighter version would keep one form of the parameter documentation.

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?

No output schema and no annotations, yet the description explains the return shape (outcome, metrics per address with rationales, trace_summary, status) and the timeout/polling path. For a five-parameter execution tool with external cost implications, an agent has everything needed to call it and interpret the result.

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 description coverage is 0% (titles only), and the description compensates for every one of the five parameters: session_id is a search_session_id or a single-turn run's query_id, test_case_id supplies a test case's expected data and defaults to the replayed test case when omitted, wait_seconds is the wait budget before handing back an id to poll, plus pipeline_name and python_code. This adds meaning well beyond the bare titles.

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?

Opens with a specific verb+resource+scope: 'Tries Evaluator source on one Session and returns what it found. Persists nothing.' It clarifies that the input is an Evaluation Function (Python source, not a saved Evaluator id), which is exactly the distinction an agent needs versus run_evaluator / create_evaluator among the many siblings.

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?

Gives concrete when-to-use cases ('check a draft before showing it as ready', 'judge a replayed Session against its source') and routes to the right sibling workflows: get_evaluator to fetch a saved version's python_code, get_evaluation_try to poll on RUNNING. It does not explicitly state when to prefer run_evaluator instead, so the sibling differentiation is implied rather than spelled out.

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

Deploy Server

Other Tools