Skip to main content
Glama

cv_show_predictions

Runs inference or visualization code on the GPU runtime and displays the saved prediction image inline. Use it to inspect model outputs such as boxes, masks, Grad-CAM, or batch grids.

Instructions

Run inference/visualization code on the runtime and show the saved image inline.

inference_code runs on the runtime and should save its visualization (predictions, bounding boxes, masks, Grad-CAM, a batch grid…) to the path in the injected variable OUT. Example last line: plt.savefig(OUT) or cv2.imwrite(OUT, canvas).

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": {
      "inference_code": "<inference_code>"
    },
    "name": "cv_show_predictions"
  }
}

Input Schema

NameRequiredDescriptionDefault
outNopreds.png
inference_codeYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.4.0

TDQS

A3.5/5.0
Behavior3/5

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

No annotations are supplied, so the description carries the full disclosure burden. It does valuable work by explaining that the code executes on the remote runtime and that `OUT` is an injected path the code must write to, but it is silent on side effects, error behavior, and runtime/permission prerequisites for arbitrary code execution.

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?

The description is front-loaded: the first sentence states the action and the visible outcome, followed by the essential save-path contract and two concrete code examples. It is tight with only minor redundancy between the prose and the examples.

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 no output schema, the description correctly specifies the return as an inline image, and it documents the critical OUT mechanism for a two-parameter tool. Missing are failure modes and the requirement that a runtime already be connected, which matter for a code-execution tool.

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 0%, so the description must compensate. It thoroughly explains `inference_code` and the injected `OUT` variable, but it never states how `out` (default 'preds.png') relates to `OUT`, leaving the relationship between the second parameter and the shown image implicit.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description uses a specific verb and resource: it runs inference/visualization code on the runtime and renders the saved image inline. It clearly signals that this tool executes code and displays the result, though it never differentiates itself from siblings such as fetch_image or cv_training_curves.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The intended use (visualize predictions, boxes, masks, Grad-CAM, batch grids) is implied, and the OUT-save contract makes the workflow clear. However, there is no explicit statement of when to prefer this over alternatives, no prerequisite that a runtime is connected, and no exclusions.

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