Skip to main content
Glama

plot_from_result

Read-only

Render a fitted result's diagnostic plot—event study, RD plot, synth gap, balance, or ROC—as a PNG, with optional restyling edits while data stays locked.

Instructions

Render a fitted result's diagnostic plot (event study, rdplot, synth gap, balance, ROC) as a PNG image block. Optional edits restyle it with the data locked.

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": {
      "result_id": "<result_id>"
    },
    "name": "plot_from_result"
  }
}

Input Schema

NameRequiredDescriptionDefault
kindNoOverride the auto-detected plot kind. Common values: 'event_study', 'rdplot', 'synth_gap', 'love_plot', 'coef_plot'.
editsNosp.interactive actions; reply adds code.
detailNoPayload depth; agent is the fullest.agent
data_idNoData handle (d_...) from load_data; replaces data_path.
figsizeNoWidth, height in inches (default [8,5]).
data_csvNoSmall inline table as CSV text.
as_handleNoCache the fit and return its result_id.
data_pathNoAbsolute path of a data file on the server.
result_idYesHandle to a fitted result.
data_recordsNoSmall inline table as row objects.
max_output_bytesNoResult byte budget (default 262144; 0 = none).

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.9/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true and openWorldHint=false, so the safety profile is covered. The description adds real context beyond that: it discloses the return form ('as a PNG image block') and clarifies that edits only restyle the rendering while the underlying data stays locked, which explains why an interactive 'edits' parameter still does not mutate data.

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, zero filler, and the core action plus output format are front-loaded before the qualifier about edits. Nothing is repeated from the name or title.

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 11 parameters, an output schema, and annotations present, the structured fields carry most of the load; the description covers purpose, output medium, and the edit-locking behavior. It stops short of explaining fallback behavior when kind auto-detection fails or how as_handle/caching interacts with rendering, which would complete the picture for such a wide schema.

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 description coverage is 100%, so the baseline is 3, and the description earns the bump by giving meaning the schema does not: it frames 'edits' as restyling with data locked, whereas the schema's own text ('sp.interactive actions; reply adds code') is opaque. It does not, however, explain how 'kind' auto-detection behaves when overridden.

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?

States a specific verb ('Render') and resource ('a fitted result's diagnostic plot') and enumerates the supported plot kinds (event study, rdplot, synth gap, balance, ROC), so an agent knows exactly what comes back. It does not name a sibling for contrast, but the render-a-PNG purpose is distinguishable from the *_from_result analysis tools by the verb alone.

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?

Usage is implied by 'a fitted result's diagnostic plot', which tells the agent this operates on an already-fitted result rather than raw data. There is no explicit when-to-use versus alternatives (e.g., brief_result or audit_result) and no stated preconditions, so the agent must infer the trigger condition from the required result_id.

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