Skip to main content
Glama

Plots.Confusion

plots.confusion
Idempotent

Confusion-matrix figure for one execution: heatmap with trial counts + per-class accuracy bars, rendered as a PNG the assistant can see. Use it right after execution.results to eyeball WHICH classes are confused, not just the accuracy number.

Input Schema

NameRequiredDescriptionDefault
saveNoAlso write the PNG to NIMBUS_EXPORT_DIR/plots/ and return its path.
matrixNo"eval" (held-out, default) or "train" (fit-set / cross-validation). CV and evaluation-plan runs often have no eval matrix — use "train".eval
execution_idYesRun to plot (from execution.run / execution.results).

Output Schema

NameRequiredDescriptionDefault
okYes
metaNoFigure sidecar. foundation.compare includes results/best/skipped (also as a JSON text content block).
titleNo
mimeTypeNo
savedPathNoSet when save=true.
sizeBytesNoSet when save=true.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedOutput schema / properties / meta / description
      Added value: +"Figure sidecar. foundation.compare includes results/best/skipped (also as a JSON text content block)."
  2. Changed1 schema field changed
    • changedInput schema / properties / matrix / description
      Previous value: -"\"eval\" (held-out, default) or \"train\" (fit-set sanity check)."New value: +"\"eval\" (held-out, default) or \"train\" (fit-set / cross-validation).\nCV and evaluation-plan runs often have no eval matrix — use \"train\"."
  3. Changed1 schema field changed
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "properties": {
      +    "meta": {
      +      "additionalProperties": true,
      +      "type": "object"
      +    },
      +    "mimeType": {
      +      "type": "string"
      +    },
      +    "ok": {
      +      "type": "boolean"
      +    },
      +    "savedPath": {
      +      "description": "Set when save=true.",
      +      "type": "string"
      +    },
      +    "sizeBytes": {
      +      "description": "Set when save=true.",
      +      "type": "integer"
      +    },
      +    "title": {
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    }
      +  },
      +  "required": [
      +    "ok"
      +  ],
      +  "type": "object"
      +}
  4. Added

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already cover the safety profile (idempotent, non-destructive, open-world). The description adds genuinely new behavioral context beyond them: the output is a PNG the assistant can visually inspect. It does not explain the readOnlyHint=false asymmetry or the on-disk write behavior (deferred to the schema), so it stops short of 5.

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?

Two sentences with zero waste; the purpose is front-loaded and the usage hint follows, each sentence pulling weight.

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?

With an output schema present, return-shape detail is unnecessary, and the description completes the picture with purpose, visual output, and sequencing. The only minor gap is the absence of any caveat about the matrix default or failure modes on CV runs, which the schema handles instead.

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

Parameters3/5

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

Schema description coverage is 100%, so the schema fully documents save, matrix, and execution_id. The description adds no parameter syntax or format detail beyond that, making the baseline 3 correct.

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?

Names a specific resource (confusion-matrix figure for one execution) and describes its concrete composition (heatmap with trial counts plus per-class accuracy bars). It is readily distinguishable from siblings like plots.dataset, plots.erp, and plots.leaderboard.

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 explicit workflow placement ('use it right after execution.results') and names the goal it serves ('eyeball WHICH classes are confused, not just the accuracy number'), routing the agent away from a bare accuracy read. No explicit when-not-to-use or named alternative is given, keeping it just below the top band.

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.