Skip to main content
Glama

evaluate_agent_run

Read-onlyIdempotent

When: an agent ran and you have what it did. Gives: trajectory (trace + assertions: order, must_call, must_not_call, max/min calls, no_error, recovery, no_injection in tool results, no_pii in the final answer; OpenAI, Anthropic, LangChain or ReAct traces) and tool calls (calls + tools: the arguments of each function call or tool_use, even a single one, checked against its declared definition in OpenAI, MCP or Anthropic form: name allowed, required arguments, types, enums, no extra argument). One gate per check, the worst on top; an unreadable trace is INCONCLUSIVE, never PASS. Deterministic, no model call. Does not prove: that the agent reached the right outcome for the user, nor anything about calls absent from what you pass.

Example tool call

This call uses example arguments supplied in the tool’s input schema.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "trace": [
        {
          "role": "user",
          "content": "Refund order 42"
        },
        {
          "role": "assistant",
          "content": [
            {
              "id": "t1",
              "name": "issue_refund",
              "type": "tool_use",
              "input": {
                "id": 42
              }
            }
          ]
        }
      ],
      "assertions": [
        {
          "tool": "issue_refund",
          "type": "must_not_call"
        }
      ]
    },
    "name": "evaluate_agent_run"
  }
}

Input Schema

NameRequiredDescriptionDefault
callsNoTool calls the agent made: {name, arguments} (or Anthropic {name, input}).
toolsNoThe tool definitions it was given (OpenAI parameters, MCP inputSchema or Anthropic input_schema).
traceNoMessages array, run tree, or a Thought/Action/Observation log.
assertionsNo[{type: "order", before, after} | {type: "must_call", tool} | …].

Output Schema

NameRequiredDescriptionDefault
gateNo
checksNo
verdictNo
next_stepsNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.6/5.0
Behavior5/5

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

Goes well beyond the readOnly/idempotent/non-destructive annotations by disclosing that the evaluation is deterministic with no model call, that it aggregates one gate per check with the worst verdict on top, and that an unreadable trace yields INCONCLUSIVE rather than PASS. The explicit statement of what it cannot prove is exactly the kind of behavioral context annotations cannot convey.

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 explicit 'When:' and 'Gives:' labels and closed with a 'Does not prove:' caveat, so an agent can skim the key facts first. The middle is a dense, heavily parenthesized enumeration that is informative but takes real effort to parse in one pass.

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?

For a multi-input evaluation tool, the description covers the trigger, the full set of checks, the verdict aggregation rule, failure semantics, determinism, and known limitations. With an output schema present it need not describe return values, and with annotations covering safety there are no significant gaps left for the agent to guess at.

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 the schema already documents all four parameters, but the description adds real meaning: it names the supported trace formats (OpenAI, Anthropic, LangChain, ReAct), enumerates the assertion types used in the `assertions` array, and clarifies that `calls` and `tools` are a paired input where each call's arguments are checked against its declared definition in OpenAI, MCP or Anthropic form.

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 ('an agent ran and you have what it did' → evaluate the run) and enumerates exactly what is produced: trajectory checks (order, must_call, must_not_call, call counts, no_error, recovery, injection, PII) and tool-call schema conformance. It also scopes itself away from output-quality evaluation by noting it does not prove the agent reached the right outcome, which separates it from an evaluate_llm_output-style sibling.

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?

The leading 'When:' clause gives an explicit trigger condition and the closing 'Does not prove:' clause gives a clear exclusion (outcome correctness, calls not passed in). No sibling tool is named as an alternative, so the agent must infer the boundary from the descriptions of other tools rather than being routed directly.

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.