Skip to main content
Glama

Evaluate Output

evaluate_output
Idempotent

Score agent outputs against deterministic rule bundles (completeness, relevance, safety, cost, custom) and get a verdict with rule-level evidence, uncertainty, and skipped rules.

Instructions

Score an agent output against the deterministic rule bundles: the ship verdict with its basis, every rule result with evidence and uncertainty, and what was not judged.

What it does. In-process, no network, no key. eval_type picks one bundle (completeness, relevance, safety, cost, custom) or all (the default): every bundle plus deployed and inline custom rules, with a per-bundle breakdown in categories. Inputs decide what can be judged: input is REQUIRED when eval_type="relevance" (keyword_overlap and topic_consistency compare the output against it and skip without it) and grounds the hallucination signals; tool_calls, or a trace_id whose stored tool_calls are reused, feed the trajectory rules; cost_usd and token_usage feed the cost rules; expected feeds only expected_coverage. A rule without its input SKIPS, is named, and never counts as a pass. custom_rules always fire. One row is stored, linked to trace_id when given.

When not to use it. To validate arbitrary JSON Schema (the json_schema custom type asserts an output's shape only). To screen inputs before they reach an agent: no_injection_patterns inspects the agent's OUTPUT text for injection-shaped content — attack phrasing and structural directives the output echoes or complies with — and never reads the input, so it is not an input firewall. For semantic judgment, evaluate_with_llm_judge and verify_citations need a key you supply.

Returns. JSON with id (the evaluation id, readable at iris://evaluations/{id}); trace_id (the linked trace, when named); verdict (state, passed, basis (which layer decided), by (the rules), risk); coverage (per question: judged, unjudged and why, or not_applicable; plus the inputs carried); provenance (Iris version, ruleset and config hashes, thresholds, corpus version, time); erased_at (set once the linked trace was deleted); eval_type (the bundle that ran); score (0..1 weighted quality over the rules that ran); passed (the ship verdict; false when nothing was judged); rule_results (per rule: verdict, message, kind, role, question, saw, evidence, uncertainty); suggestions (what to change); rules_evaluated (rules that judged); rules_skipped (rules that skipped); insufficient_data (true when no rule could judge); critical_failures (critical rules that failed and vetoed passed); critical_skipped (critical rules that could not judge; treat as unknown); categories (per-bundle verdicts for eval_type all); note (present when eval_type was omitted).

Errors. IRIS_UNKNOWN_TRACE when trace_id names no stored trace — checked first, nothing scored or written. IRIS_STORAGE_ERROR when the row cannot be written. Unknown arguments or keys are refused before the handler runs, naming the valid ones; a regex rule over its budget or with a broken config reports skipped, not an error. Every failure returns {"error":{"code","message","recovery":[]}} with isError true; follow recovery before retrying.

Siblings. log_trace — record the execution first; evaluate_with_llm_judge — semantic scoring on your key; verify_citations — citation grounding on your key; list_rules — the roster, needs and published accuracy.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
inputNoOriginal input for context (the ask + any source material the agent was given) — REQUIRED when eval_type="relevance" (keyword_overlap and topic_consistency compare the output against it and skip without it); also grounds the safety bundle's hallucination signals
outputYesThe output text to evaluate (the agent's response that gets scored against rules)
cost_usdNoCost in USD — consulted by the cost bundle (eval_type="cost" or "all") AND by any cost_threshold custom rule regardless of eval_type; omit it and such a rule skips rather than passes (a critical one is listed in critical_skipped)
expectedNoExpected output for comparison — consulted only by the completeness bundle's expected_coverage rule; NOT used by relevance (the relevance rules compare the output against `input`)
trace_idNoLink evaluation to a trace — surfaces this eval in the dashboard's trace drill-through and lets the tool reuse the trace's stored tool_calls. Must be the id of a stored trace (from log_trace / get_traces); an unknown id is rejected before anything is evaluated
eval_typeNoRule bundle to apply: completeness | relevance | safety | cost | custom | all — picks which built-in rules fire. "all" runs every bundle in one call and adds a per-category breakdown. Defaults to "all" when omitted — every bundle runs, safety included, and the response carries a note saying the default ran
tool_callsNoWhat the agent DID — the tool calls it made, in order, each { tool_name, input?, output?, latency_ms?, error? } exactly as log_trace records them. Read by the trajectory rules — the rules that judge what the agent DID rather than what it wrote. Omit it and those rules SKIP rather than pass — an evaluation with no trajectory data reports "not judged", never "clean". When trace_id names a stored trace and this argument is omitted, the tool_calls stored on that trace are loaded and used, so a caller who already logged them need not resend them
token_usageNoToken usage breakdown — only consulted by the cost bundle (eval_type="cost" or "all"; used for token-budget rules)
custom_rulesNoCustom evaluation rules, max 10 per call (deploy persistent rule sets via deploy_rule instead) — fires REGARDLESS of eval_type; pass eval_type="custom" if you want ONLY these. Each entry accepts exactly name, type, config, weight — an unknown key (e.g. a misspelled weight) is rejected

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesthe evaluation id, readable at iris://evaluations/{id}
noteNopresent when eval_type was omitted
scoreYes0..1 weighted quality over the rules that ran
passedYesthe ship verdict; false when nothing was judged
verdictNostate, passed, basis (which layer decided), by (the rules), risk
coverageNoper question: judged, unjudged and why, or not_applicable; plus the inputs carried
trace_idNothe linked trace, when named
erased_atNoset once the linked trace was deleted
eval_typeYesthe bundle that ran
categoriesNoper-bundle verdicts for eval_type all
provenanceNoIris version, ruleset and config hashes, thresholds, corpus version, time
suggestionsYeswhat to change
rule_resultsYesper rule: verdict, message, kind, role, question, saw, evidence, uncertainty
rules_skippedYesrules that skipped
rules_evaluatedYesrules that judged
critical_skippedNocritical rules that could not judge; treat as unknown
critical_failuresNocritical rules that failed and vetoed passed
insufficient_dataYestrue when no rule could judge

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. Changed2 schema fields changedv0.9.0
    • changedInput schema / properties / trace_id / description
      Previous value: -"Link evaluation to a trace — surfaces this eval in the dashboard's trace drill-through. Must be the id of a stored trace (from log_trace / get_traces); an unknown id is rejected before anything is evaluated"New value: +"Link evaluation to a trace — surfaces this eval in the dashboard's trace drill-through and lets the tool reuse the trace's stored tool_calls. Must be the id of a stored trace (from log_trace / get_traces); an unknown id is rejected before anything is evaluated"
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "$schema": "http://json-schema.org/draft-07/schema#",
      +  "additionalProperties": {},
      +  "properties": {
      +    "categories": {
      +      "additionalProperties": {
      +        "additionalProperties": {},
      +        "properties": {
      +          "critical_failures": {
      +            "items": {
      +              "type": "string"
      +            },
      +            "type": "array"
      +          },
      +          "critical_skipped": {
      +            "items": {
      +              "type": "string"
      +            },
      +            "type": "array"
      +          },
      +          "insufficient_data": {
      +            "type": "boolean"
      +          },
      +          "passed": {
      +            "type": [
      +              "boolean",
      +              "null"
      +            ]
      +          },
      +          "rules_evaluated": {
      +            "maximum": 9007199254740991,
      +            "minimum": -9007199254740991,
      +            "type": "integer"
      +          },
      +          "rules_skipped": {
      +            "maximum": 9007199254740991,
      +            "minimum": -9007199254740991,
      +            "type": "integer"
      +          },
      +          "score": {
      +            "type": [
      +              "number",
      +              "null"
      +            ]
      +          }
      +        },
      +        "required": [
      +          "score",
      +          "passed",
      +          "rules_evaluated",
      +          "rules_skipped",
      +          "insufficient_data"
      +        ],
      +        "type": "object"
      +      },
      +      "description": "per-bundle verdicts for eval_type all",
      +      "propertyNames": {
      +        "type": "string"
      +      },
      +      "type": "object"
      +    },
      +    "coverage": {
      +      "additionalProperties": {},
      +      "description": "per question: judged, unjudged and why, or not_applicable; plus the inputs carried",
      +      "properties": {
      +        "dormant": {
      +          "items": {
      +            "additionalProperties": {},
      +            "properties": {
      +              "name": {
      +                "type": "string"
      +              },
      +              "reason": {
      +                "type": "string"
      +              },
      +              "ruleId": {
      +                "type": "string"
      +              }
      +            },
      +            "required": [
      +              "ruleId",
      +              "name",
      +              "reason"
      +            ],
      +            "type": "object"
      +          },
      +          "type": "array"
      +        },
      +        "inputs": {
      +          "additionalProperties": {
      +            "type": "boolean"
      +          },
      +          "propertyNames": {
      +            "type": "string"
      +          },
      +          "type": "object"
      +        },
      +        "questions": {
      +          "items": {
      +            "additionalProperties": {},
      +            "properties": {
      +              "id": {
      +                "enum": [
      +                  "safe_output",
      +                  "grounded",
      +                  "complete",
      +                  "relevant",
      +                  "task_completed",
      +                  "tool_use_correct",
      +                  "within_budget"
      +                ],
      +                "type": "string"
      +              },
      +              "status": {
      +                "enum": [
      +                  "judged",
      +                  "unjudged",
      +                  "not_applicable"
      +                ],
      +                "type": "string"
      +              },
      +              "why": {
      +                "type": "string"
      +              }
      +            },
      +            "required": [
      +              "id",
      +              "status"
      +            ],
      +            "type": "object"
      +          },
      +          "type": "array"
      +        }
      +      },
      +      "required": [
      +        "inputs",
      +        "questions"
      +      ],
      +      "type": "object"
      +    },
      +    "critical_failures": {
      +      "description": "critical rules that failed and vetoed passed",
      +      "items": {
      +        "type": "string"
      +      },
      +      "type": "array"
      +    },
      +    "critical_skipped": {
      +      "description": "critical rules that could not judge; treat as unknown",
      +      "items": {
      +        "type": "string"
      +      },
      +      "type": "array"
      +    },
      +    "erased_at": {
      +      "description": "set once the linked trace was deleted",
      +      "type": "string"
      +    },
      +    "eval_type": {
      +      "description": "the bundle that ran",
      +      "enum": [
      +        "completeness",
      +        "relevance",
      +        "safety",
      +        "cost",
      +        "custom",
      +        "all"
      +      ],
      +      "type": "string"
      +    },
      +    "id": {
      +      "description": "the evaluation id, readable at iris://evaluations/{id}",
      +      "type": "string"
      +    },
      +    "insufficient_data": {
      +      "description": "true when no rule could judge",
      +      "type": "boolean"
      +    },
      +    "note": {
      +      "description": "present when eval_type was omitted",
      +      "type": "string"
      +    },
      +    "passed": {
      +      "description": "the ship verdict; false when nothing was judged",
      +      "type": "boolean"
      +    },
      +    "provenance": {
      +      "additionalProperties": {},
      +      "description": "Iris version, ruleset and config hashes, thresholds, corpus version, time",
      +      "properties": {
      +        "configHash": {
      +          "type": "string"
      +        },
      +        "corpusVersion": {
      +          "type": "string"
      +        },
      +        "irisVersion": {
      +          "type": "string"
      +        },
      +        "judgedAt": {
      +          "type": "string"
      +        },
      +        "rulesetHash": {
      +          "type": "string"
      +        },
      +        "thresholds": {
      +          "additionalProperties": {},
      +          "properties": {
      +            "default": {
      +              "type": "number"
      +            },
      +            "perRule": {
      +              "additionalProperties": {},
      +              "propertyNames": {
      +                "type": "string"
      +              },
      +              "type": "object"
      +            }
      +          },
      +          "required": [
      +            "default"
      +          ],
      +          "type": "object"
      +        }
      +      },
      +      "required": [
      +        "irisVersion",
      +        "rulesetHash",
      +        "configHash",
      +        "thresholds",
      +        "corpusVersion",
      +        "judgedAt"
      +      ],
      +      "type": "object"
      +    },
      +    "rule_results": {
      +      "description": "per rule: verdict, message, kind, role, question, saw, evidence, uncertainty",
      +      "items": {
      +        "additionalProperties": {},
      +        "properties": {
      +          "budgetExceeded": {
      +            "type": "boolean"
      +          },
      +          "category": {
      +            "enum": [
      +              "completeness",
      +              "relevance",
      +              "safety",
      +              "cost",
      +              "custom"
      +            ],
      +            "type": "string"
      +          },
      +          "classes": {
      +            "items": {
      +              "type": "string"
      +            },
      +            "type": "array"
      +          },
      +          "configInvalid": {
      +            "type": "boolean"
      +          },
      +          "critical": {
      +            "type": "boolean"
      +          },
      +          "criticalSource": {
      +            "enum": [
      +              "default",
      +              "config"
      +            ],
      +            "type": "string"
      +          },
      +          "evidence": {
      +            "items": {
      +              "oneOf": [
      +                {
      +                  "additionalProperties": {},
      +                  "properties": {
      +                    "end": {
      +                      "maximum": 9007199254740991,
      +                      "minimum": 0,
      +                      "type": "integer"
      +                    },
      +                    "label": {
      +                      "type": "string"
      +                    },
      +                    "source": {
      +                      "type": "string"
      +                    },
      +                    "start": {
      +                      "maximum": 9007199254740991,
      +                      "minimum": 0,
      +                      "type": "integer"
      +                    },
      +                    "type": {
      +                      "const": "span",
      +                      "type": "string"
      +                    }
      +                  },
      +                  "required": [
      +                    "type",
      +                    "source",
      +                    "start",
      +                    "end",
      +                    "label"
      +                  ],
      +                  "type": "object"
      +                },
      +                {
      +                  "additionalProperties": {},
      +                  "properties": {
      +                    "count": {
      +                      "maximum": 9007199254740991,
      +                      "minimum": 0,
      +                      "type": "integer"
      +                    },
      +                    "name": {
      +                      "type": "string"
      +                    },
      +                    "type": {
      +                      "const": "pattern",
      +                      "type": "string"
      +                    }
      +                  },
      +                  "required": [
      +                    "type",
      +                    "name",
      +                    "count"
      +                  ],
      +                  "type": "object"
      +                },
      +                {
      +                  "additionalProperties": {},
      +                  "properties": {
      +                    "index": {
      +                      "maximum": 9007199254740991,
      +                      "minimum": 0,
      +                      "type": "integer"
      +                    },
      +                    "label": {
      +                      "type": "string"
      +                    },
      +                    "toolName": {
      +                      "type": "string"
      +                    },
      +                    "type": {
      +                      "const": "toolCall",
      +                      "type": "string"
      +                    }
      +                  },
      +                  "required": [
      +                    "type",
      +                    "index",
      +                    "toolName",
      +                    "label"
      +                  ],
      +                  "type": "object"
      +                },
      +                {
      +                  "additionalProperties": {},
      +                  "properties": {
      +                    "status": {
      +                      "enum": [
      +                        "resolved",
      +                        "dead",
      +                        "unverifiable",
      +                        "supported",
      +                        "unsupported"
      +                      ],
      +                      "type": "string"
      +                    },
      +                    "type": {
      +                      "const": "citation",
      +                      "type": "string"
      +                    },
      +                    "url": {
      +                      "type": "string"
      +                    }
      +                  },
      +                  "required": [
      +                    "type",
      +                    "url",
      +                    "status"
      +                  ],
      +                  "type": "object"
      +                },
      +                {
      +                  "additionalProperties": {},
      +                  "properties": {
      +                    "stat": {
      +                      "type": "string"
      +                    },
      +                    "threshold": {
      +                      "type": "number"
      +                    },
      +                    "thresholdSource": {
      +                      "enum": [
      +                        "default",
      +                        "config",
      +                        "call",
      +                        "rule"
      +                      ],
      +                      "type": "string"
      +                    },
      +                    "type": {
      +                      "const": "count",
      +                      "type": "string"
      +                    },
      +                    "unit": {
      +                      "type": "string"
      +                    },
      +                    "value": {
      +                      "type": "number"
      +                    }
      +                  },
      +                  "required": [
      +                    "type",
      +                    "stat",
      +                    "unit",
      +                    "value"
      +                  ],
      +                  "type": "object"
      +                }
      +              ]
      +            },
      +            "type": "array"
      +          },
      +          "kind": {
      +            "enum": [
      +              "measurement",
      +              "detection",
      +              "inference",
      +              "judgment",
      +              "policy",
      +              "verification"
      +            ],
      +            "type": "string"
      +          },
      +          "message": {
      +            "type": "string"
      +          },
      +          "passed": {
      +            "type": "boolean"
      +          },
      +          "question": {
      +            "enum": [
      +              "safe_output",
      +              "grounded",
      +              "complete",
      +              "relevant",
      +              "task_completed",
      +              "tool_use_correct",
      +              "within_budget"
      +            ],
      +            "type": "string"
      +          },
      +          "role": {
      +            "enum": [
      +              "gate",
      +              "veto",
      +              "risk",
      +              "advisory",
      +              "term"
      +            ],
      +            "type": "string"
      +          },
      +          "ruleId": {
      +            "type": "string"
      +          },
      +          "ruleName": {
      +            "type": "string"
      +          },
      +          "ruleVersion": {
      +            "maximum": 9007199254740991,
      +            "minimum": -9007199254740991,
      +            "type": "integer"
      +          },
      +          "saw": {
      +            "items": {
      +              "enum": [
      +                "output",
      +                "input",
      +                "expected",
      +                "tool_calls",
      +                "tool_outputs",
      +                "tools_catalogue",
      +                "cost",
      +                "tokens",
      +                "citations"
      +              ],
      +              "type": "string"
      +            },
      +            "type": "array"
      +          },
      +          "score": {
      +            "type": "number"
      +          },
      +          "skipClass": {
      +            "enum": [
      +              "not_applicable",
      +              "defeated",
      +              "config_invalid"
      +            ],
      +            "type": "string"
      +          },
      +          "skipReason": {
      +            "type": "string"
      +          },
      +          "skipped": {
      +            "type": "boolean"
      +          },
      +          "uncertainty": {
      +            "oneOf": [
      +              {
      +                "additionalProperties": {},
      +                "properties": {
      +                  "basis": {
      +                    "const": "published_accuracy",
      +                    "type": "string"
      +                  },
      +                  "corpus": {
      +                    "additionalProperties": {},
      +                    "properties": {
      +                      "fn": {
      +                        "maximum": 9007199254740991,
      +                        "minimum": -9007199254740991,
      +                        "type": "integer"
      +                      },
      +                      "fp": {
      +                        "maximum": 9007199254740991,
      +                        "minimum": -9007199254740991,
      +                        "type": "integer"
      +                      },
      +                      "labelling": {
      +                        "enum": [
      +                          "same-model",
      +                          "human-verified"
      +                        ],
      +                        "type": "string"
      +                      },
      +                      "n": {
      +                        "maximum": 9007199254740991,
      +                        "minimum": -9007199254740991,
      +                        "type": "integer"
      +                      },
      +                      "release": {
      +                        "type": "string"
      +                      },
      +                      "tn": {
      +                        "maximum": 9007199254740991,
      +                        "minimum": -9007199254740991,
      +                        "type": "integer"
      +                      },
      +                      "tp": {
      +                        "maximum": 9007199254740991,
      +                        "minimum": -9007199254740991,
      +                        "type": "integer"
      +                      },
      +                      "version": {
      +                        "type": "string"
      +                      }
      +                    },
      +                    "required": [
      +                      "n",
      +                      "tp",
      +                      "fp",
      +                      "fn",
      +                      "tn",
      +                      "version",
      +                      "release",
      +                      "labelling"
      +                    ],
      +                    "type": "object"
      +                  },
      +                  "fired": {
      +                    "type": "boolean"
      +                  },
      +                  "missRate": {
      +                    "additionalProperties": {},
      +                    "properties": {
      +                      "hi": {
      +                        "type": "number"
      +                      },
      +                      "lo": {
      +                        "type": "number"
      +                      },
      +                      "point": {
      +                        "type": "number"
      +                      }
      +                    },
      +                    "required": [
      +                      "point",
      +                      "lo",
      +                      "hi"
      +                    ],
      +                    "type": "object"
      +                  },
      +                  "ppv": {
      +                    "additionalProperties": {},
      +                    "properties": {
      +                      "hi": {
      +                        "type": "number"
      +                      },
      +                      "lo": {
      +                        "type": "number"
      +                      },
      +                      "point": {
      +                        "type": "number"
      +                      }
      +                    },
      +                    "required": [
      +                      "point",
      +                      "lo",
      +                      "hi"
      +                    ],
      +                    "type": "object"
      +                  },
      +                  "prior": {
      +                    "additionalProperties": {},
      +                    "properties": {
      +                      "pi": {
      +                        "type": "number"
      +                      },
      +                      "source": {
      +                        "enum": [
      +                          "default",
      +                          "config",
      +                          "estimated"
      +                        ],
      +                        "type": "string"
      +                      }
      +                    },
      +                    "required": [
      +                      "pi",
      +                      "source"
      +                    ],
      +                    "type": "object"
      +                  }
      +                },
      +                "required": [
      +                  "basis",
      +                  "fired",
      +                  "prior",
      +                  "corpus"
      +                ],
      +                "type": "object"
      +              },
      +              {
      +                "additionalProperties": {},
      +                "properties": {
      +                  "basis": {
      +                    "const": "definition",
      +                    "type": "string"
      +                  },
      +                  "conformance": {
      +                    "additionalProperties": {},
      +                    "properties": {
      +                      "matched": {
      +                        "maximum": 9007199254740991,
      +                        "minimum": -9007199254740991,
      +                        "type": "integer"
      +                      },
      +                      "n": {
      +                        "maximum": 9007199254740991,
      +                        "minimum": -9007199254740991,
      +                        "type": "integer"
      +                      }
      +                    },
      +                    "required": [
      +                      "n",
      +                      "matched"
      +                    ],
      +                    "type": "object"
      +                  }
      +                },
      +                "required": [
      +                  "basis",
      +                  "conformance"
      +                ],
      +                "type": "object"
      +              },
      +              {
      +                "additionalProperties": {},
      +                "properties": {
      +                  "basis": {
      +                    "const": "self_consistency",
      +                    "type": "string"
      +                  },
      +                  "samples": {
      +                    "maximum": 9007199254740991,
      +                    "minimum": -9007199254740991,
      +                    "type": "integer"
      +                  },
      +                  "scoreSd": {
      +                    "type": "number"
      +                  },
      +                  "voteFraction": {
      +                    "type": "number"
      +                  }
      +                },
      +                "required": [
      +                  "basis",
      +                  "samples",
      +                  "voteFraction",
      +                  "scoreSd"
      +                ],
      +                "type": "object"
      +              },
      +              {
      +                "additionalProperties": {},
      +                "properties": {
      +                  "basis": {
      +                    "const": "local_labels",
      +                    "type": "string"
      +                  },
      +                  "n": {
      +                    "maximum": 9007199254740991,
      +                    "minimum": -9007199254740991,
      +                    "type": "integer"
      +                  },
      +                  "precision": {
      +                    "additionalProperties": {},
      +                    "properties": {
      +                      "hi": {
      +                        "type": "number"
      +                      },
      +                      "lo": {
      +                        "type": "number"
      +                      },
      +                      "point": {
      +                        "type": "number"
      +                      }
      +                    },
      +                    "required": [
      +                      "point",
      +                      "lo",
      +                      "hi"
      +                    ],
      +                    "type": "object"
      +                  }
      +                },
      +                "required": [
      +                  "basis",
      +                  "precision",
      +                  "n"
      +                ],
      +                "type": "object"
      +              },
      +              {
      +                "additionalProperties": {},
      +                "properties": {
      +                  "basis": {
      +                    "const": "policy",
      +                    "type": "string"
      +                  }
      +                },
      +                "required": [
      +                  "basis"
      +                ],
      +                "type": "object"
      +              },
      +              {
      +                "additionalProperties": {},
      +                "properties": {
      +                  "basis": {
      +                    "const": "unmeasured",
      +                    "type": "string"
      +                  },
      +                  "why": {
      +                    "type": "string"
      +                  }
      +                },
      +                "required": [
      +                  "basis",
      +                  "why"
      +                ],
      +                "type": "object"
      +              }
      +            ]
      +          },
      +          "value": {
      +            "additionalProperties": {},
      +            "properties": {
      +              "stat": {
      +                "type": "string"
      +              },
      +              "unit": {
      +                "type": "string"
      +              },
      +              "value": {
      +                "type": "number"
      +              }
      +            },
      +            "required": [
      +              "stat",
      +              "unit",
      +              "value"
      +            ],
      +            "type": "object"
      +          }
      +        },
      +        "required": [
      +          "ruleName",
      +          "passed",
      +          "score",
      +          "message"
      +        ],
      +        "type": "object"
      +      },
      +      "type": "array"
      +    },
      +    "rules_evaluated": {
      +      "description": "rules that judged",
      +      "maximum": 9007199254740991,
      +      "minimum": -9007199254740991,
      +      "type": "integer"
      +    },
      +    "rules_skipped": {
      +      "description": "rules that skipped",
      +      "maximum": 9007199254740991,
      +      "minimum": -9007199254740991,
      +      "type": "integer"
      +    },
      +    "score": {
      +      "description": "0..1 weighted quality over the rules that ran",
      +      "type": "number"
      +    },
      +    "suggestions": {
      +      "description": "what to change",
      +      "items": {
      +        "type": "string"
      +      },
      +      "type": "array"
      +    },
      +    "trace_id": {
      +      "description": "the linked trace, when named",
      +      "type": "string"
      +    },
      +    "verdict": {
      +      "additionalProperties": {},
      +      "description": "state, passed, basis (which layer decided), by (the rules), risk",
      +      "properties": {
      +        "basis": {
      +          "enum": [
      +            "policy_gate",
      +            "detector_veto",
      +            "critical_unknown",
      +            "required_evidence_missing",
      +            "risk_over_loss",
      +            "score_below_threshold",
      +            "clean",
      +            "no_rules"
      +          ],
      +          "type": "string"
      +        },
      +        "by": {
      +          "items": {
      +            "type": "string"
      +          },
      +          "type": "array"
      +        },
      +        "confidence": {
      +          "enum": [
      +            "decisive",
      +            "marginal"
      +          ],
      +          "type": "string"
      +        },
      +        "passed": {
      +          "type": "boolean"
      +        },
      +        "risk": {
      +          "anyOf": [
      +            {
      +              "additionalProperties": {},
      +              "properties": {
      +                "hi": {
      +                  "type": "number"
      +                },
      +                "lo": {
      +                  "type": "number"
      +                },
      +                "pBad": {
      +                  "type": "number"
      +                }
      +              },
      +              "required": [
      +                "pBad",
      +                "lo",
      +                "hi"
      +              ],
      +              "type": "object"
      +            },
      +            {
      +              "type": "null"
      +            }
      +          ]
      +        },
      +        "state": {
      +          "enum": [
      +            "pass",
      +            "fail",
      +            "unknown"
      +          ],
      +          "type": "string"
      +        }
      +      },
      +      "required": [
      +        "state",
      +        "passed",
      +        "basis",
      +        "by",
      +        "risk"
      +      ],
      +      "type": "object"
      +    }
      +  },
      +  "required": [
      +    "id",
      +    "eval_type",
      +    "score",
      +    "passed",
      +    "rule_results",
      +    "suggestions",
      +    "rules_evaluated",
      +    "rules_skipped",
      +    "insufficient_data"
      +  ],
      +  "type": "object"
      +}
  2. Changed19 schema fields changedv0.8.0
    • addedInput schema / additionalProperties
      Added value: +false
    • changedInput schema / properties / cost_usd / description
      Previous value: -"Cost in USD — only consulted when eval_type=\"cost\" (compared against cost_threshold rules)"New value: +"Cost in USD — consulted by the cost bundle (eval_type=\"cost\" or \"all\") AND by any cost_threshold custom rule regardless of eval_type; omit it and such a rule skips rather than passes (a critical one is listed in critical_skipped)"
    • changedInput schema / properties / custom_rules / description
      Previous value: -"Custom evaluation rules — fires REGARDLESS of eval_type; pass eval_type=\"custom\" if you want ONLY these"New value: +"Custom evaluation rules, max 10 per call (deploy persistent rule sets via deploy_rule instead) — fires REGARDLESS of eval_type; pass eval_type=\"custom\" if you want ONLY these. Each entry accepts exactly name, type, config, weight — an unknown key (e.g. a misspelled weight) is rejected"
    • addedInput schema / properties / custom_rules / items / additionalProperties
      Added value: +false
    • addedInput schema / properties / custom_rules / items / properties / config / description
      Added value: +"Check configuration; keys depend on type (pattern, min_length, keywords, max_cost, …)"
    • addedInput schema / properties / custom_rules / items / properties / name / description
      Added value: +"Rule name as it will appear in rule_results"
    • addedInput schema / properties / custom_rules / items / properties / name / minLength
      Added value: +1
    • addedInput schema / properties / custom_rules / items / properties / type / description
      Added value: +"Check type — decides which config keys the rule reads"
    • addedInput schema / properties / custom_rules / items / properties / weight / description
      Added value: +"Weight in the weighted score (default 1; must be > 0)"
    • addedInput schema / properties / custom_rules / items / properties / weight / exclusiveMinimum
      Added value: +0
    • addedInput schema / properties / custom_rules / maxItems
      Added value: +10
    • removedInput schema / properties / eval_type / default
      Removed value: -"completeness"
    • changedInput schema / properties / eval_type / description
      Previous value: -"Rule bundle to apply: completeness | relevance | safety | cost | custom — picks which built-in rules fire"New value: +"Rule bundle to apply: completeness | relevance | safety | cost | custom | all — picks which built-in rules fire. \"all\" runs every bundle in one call and adds a per-category breakdown. Defaults to \"all\" when omitted — every bundle runs, safety included, and the response carries a note saying the default ran"
    • changedInput schema / properties / eval_type / enum
      Previous value: -[
      -  "completeness",
      -  "relevance",
      -  "safety",
      -  "cost",
      -  "custom"
      -]New value: +[
      +  "completeness",
      +  "relevance",
      +  "safety",
      +  "cost",
      +  "custom",
      +  "all"
      +]
    • changedInput schema / properties / expected / description
      Previous value: -"Expected output for comparison — REQUIRED when eval_type=\"relevance\" (used as keyword-overlap target)"New value: +"Expected output for comparison — consulted only by the completeness bundle's expected_coverage rule; NOT used by relevance (the relevance rules compare the output against `input`)"
    • changedInput schema / properties / input / description
      Previous value: -"Original input for context — improves relevance scoring (keyword overlap vs input)"New value: +"Original input for context (the ask + any source material the agent was given) — REQUIRED when eval_type=\"relevance\" (keyword_overlap and topic_consistency compare the output against it and skip without it); also grounds the safety bundle's hallucination signals"
    • changedInput schema / properties / token_usage / description
      Previous value: -"Token usage breakdown — only consulted when eval_type=\"cost\" (used for token-budget rules)"New value: +"Token usage breakdown — only consulted by the cost bundle (eval_type=\"cost\" or \"all\"; used for token-budget rules)"
    • addedInput schema / properties / tool_calls
      Added value: +{
      +  "description": "What the agent DID — the tool calls it made, in order, each { tool_name, input?, output?, latency_ms?, error? } exactly as log_trace records them. Read by the trajectory rules — the rules that judge what the agent DID rather than what it wrote. Omit it and those rules SKIP rather than pass — an evaluation with no trajectory data reports \"not judged\", never \"clean\". When trace_id names a stored trace and this argument is omitted, the tool_calls stored on that trace are loaded and used, so a caller who already logged them need not resend them",
      +  "items": {
      +    "additionalProperties": false,
      +    "properties": {
      +      "error": {
      +        "type": "string"
      +      },
      +      "input": {},
      +      "latency_ms": {
      +        "type": "number"
      +      },
      +      "output": {},
      +      "tool_name": {
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "tool_name"
      +    ],
      +    "type": "object"
      +  },
      +  "type": "array"
      +}
    • changedInput schema / properties / trace_id / description
      Previous value: -"Link evaluation to a trace — surfaces this eval in the dashboard's trace drill-through"New value: +"Link evaluation to a trace — surfaces this eval in the dashboard's trace drill-through. Must be the id of a stored trace (from log_trace / get_traces); an unknown id is rejected before anything is evaluated"
  3. Changed4 schema fields changedv0.4.6
    • removedInput schema / additionalProperties
      Removed value: -false
    • removedInput schema / properties / custom_rules / items / additionalProperties
      Removed value: -false
    • addedInput schema / properties / custom_rules / items / properties / config / propertyNames
      Added value: +{
      +  "type": "string"
      +}
    • removedInput schema / properties / token_usage / additionalProperties
      Removed value: -false
  4. Changed8 schema fields changedv0.1.10
    • changedInput schema / properties / cost_usd / description
      Previous value: -"Cost for cost evaluation"New value: +"Cost in USD — only consulted when eval_type=\"cost\" (compared against cost_threshold rules)"
    • changedInput schema / properties / custom_rules / description
      Previous value: -"Custom evaluation rules"New value: +"Custom evaluation rules — fires REGARDLESS of eval_type; pass eval_type=\"custom\" if you want ONLY these"
    • changedInput schema / properties / eval_type / description
      Previous value: -"Type of evaluation"New value: +"Rule bundle to apply: completeness | relevance | safety | cost | custom — picks which built-in rules fire"
    • changedInput schema / properties / expected / description
      Previous value: -"Expected output for comparison"New value: +"Expected output for comparison — REQUIRED when eval_type=\"relevance\" (used as keyword-overlap target)"
    • changedInput schema / properties / input / description
      Previous value: -"Original input for context"New value: +"Original input for context — improves relevance scoring (keyword overlap vs input)"
    • changedInput schema / properties / output / description
      Previous value: -"The output text to evaluate"New value: +"The output text to evaluate (the agent's response that gets scored against rules)"
    • changedInput schema / properties / token_usage / description
      Previous value: -"Token usage for cost evaluation"New value: +"Token usage breakdown — only consulted when eval_type=\"cost\" (used for token-budget rules)"
    • changedInput schema / properties / trace_id / description
      Previous value: -"Link evaluation to a trace"New value: +"Link evaluation to a trace — surfaces this eval in the dashboard's trace drill-through"
  5. Addedv0.1.8
  6. Removedv0.1.7
  7. First observed

TDQS

A5/5.0
Behavior5/5

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

The description heavily exceeds the annotations' coverage: it states 'In-process, no network, no key', says 'One row is stored, linked to trace_id when given', describes skip semantics for missing inputs, and enumerates error codes (IRIS_UNKNOWN_TRACE, IRIS_STORAGE_ERROR) with recovery guidance. It does not contradict annotations such as idempotentHint or destructiveHint.

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

Conciseness5/5

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

The description is long but tightly sectioned with clear headings: What it does / When not to use it / Returns / Errors / Siblings. The core purpose is front-loaded, and each section carries non-redundant information needed for a 9-parameter tool with a rich output schema. No filler or tautology is present.

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?

Despite already having an output schema, the description still summarizes all key return fields, error conditions, default behavior, and skip conditions, making the tool's full contract explicit. It also names siblings and distinguishes their scope, so nothing essential for correct invocation is missing.

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 already 100%, but the description adds critical behavior beyond the schema: input is 'REQUIRED when eval_type="relevance"', cost_usd is read by the cost bundle and any cost_threshold custom rule, expected 'feeds only expected_coverage', and tool_calls 'SKIP rather than pass' if omitted. custom_rules 'always fire' regardless of eval_type. This goes far beyond the standalone parameter descriptions.

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?

The description opens with 'Score an agent output against the deterministic rule bundles' — a specific verb, object, and judgment mechanism. It further distinguishes itself from siblings by naming them in the Siblings section ('evaluate_with_llm_judge — semantic scoring on your key; verify_citations — citation grounding'). An agent can quickly tell this is the deterministic rule-based evaluator.

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?

There is an explicit 'When not to use it' section that names three alternative cases — JSON Schema validation, input screening, and semantic judgment — and points to the correct sibling for each. It also explains eval_type bundle selection, the default ('Defaults to "all"'), and when to use custom_rules alone with eval_type='custom'.

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

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/iris-eval/mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server