Skip to main content
Glama

Plot Confusion Matrix

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.

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": {
      "execution_id": "<execution_id>"
    },
    "name": "plots.confusion"
  }
}

Input Schema

NameRequiredDescriptionDefault
saveNoLocal/stdio: also write the PNG to NIMBUS_EXPORT_DIR/plots/ and return its path. Ignored on the hosted gateway (the image is returned inline).
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
    • changedInput schema / properties / save / description
      Previous value: -"Also write the PNG to NIMBUS_EXPORT_DIR/plots/ and return its path."New value: +"Local/stdio: also write the PNG to NIMBUS_EXPORT_DIR/plots/ and return\nits path. Ignored on the hosted gateway (the image is returned inline)."
  2. 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)."
  3. 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\"."
  4. 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"
      +}
  5. Added

TDQS

A4.7/5.0
Behavior5/5

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

The description defines the actual output behavior—a rendered PNG showing heatmap, counts, and bars—which adds significant context beyond the standard annotations and tells the agent what visual result to expect.

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 definition is concise and highly efficient, immediately defining the core function and following it up with a practical instruction for immediate tool adoption.

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?

Given the tool's purpose is to provide visual feedback for debugging, the description is perfectly complete by explaining the visual utility and the required execution workflow.

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?

Since schema description coverage is 100%, the description provides no additional semantic meaning for the parameters beyond the information already provided in the input schema.

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 clearly defines the output (confusion matrix figure/heatmap) and what it visualizes (trial counts + per-class accuracy bars), distinguishing it as a specific visualization tool.

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?

It provides highly specific usage guidance by telling the user exactly when to call it: 'right after execution.results,' and explains the specific value proposition ('eyeboll WHICH classes are confused').

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.