Skip to main content
Glama

stata_graph

Export the current or named Stata graph to stata_output/figures for inline display, saving a PNG and optional PDF for LaTeX.

Instructions

Export the current (or named) Stata graph to stata_output/figures and display it.

Draw the graph first with stata_run/stata_do (e.g. coefplot, twoway, event-study plots). Saves .png (shown inline) and, if pdf=True, .pdf for LaTeX.

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": {
      "filename": "<filename>"
    },
    "name": "stata_graph"
  }
}

Input Schema

NameRequiredDescriptionDefault
pdfNo
widthNo
filenameYes
graph_nameNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.9/5.0
Behavior3/5

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

With no annotations, the description carries the burden, and it does disclose the real behavioral traits: it writes files to stata_output/figures, the PNG is shown inline, and a PDF is additionally produced only when pdf=True. Gaps remain on the properties the annotations would normally cover — whether existing files are overwritten, whether the call requires an active session/graph, and what happens if no graph exists. That is meaningful context but not a complete behavioral profile for a file-writing tool.

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 main action, destination, and inline-display behavior are front-loaded in the first sentence; prerequisites and output naming follow. The parenthetical command examples are useful rather than filler, though the trailing newline-separated fragments are slightly less tight than a single structured sentence.

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?

For a four-parameter tool with no annotations and no output schema, the description covers purpose, prerequisite workflow, output paths, and the conditional PDF well enough for correct invocation. Missing are width semantics and overwrite/error behavior, which are the remaining holes an agent would care about before writing files.

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 has to supply parameter meaning. It does for three of four: filename maps to '<filename>.png'/'.pdf', pdf controls the extra PDF output, and graph_name is implied by 'current (or named) graph'. Width is never mentioned, leaving one parameter with no semantics from either source, so it only partially compensates for the coverage gap.

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?

States a specific verb and resource ('Export the current (or named) Stata graph') plus a concrete destination ('stata_output/figures') and a side effect ('display it'). It also explicitly points at stata_run/stata_do as the tools that produce graphs, so an agent can distinguish this from the plotting/execution siblings without opening a schema.

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 clear prerequisite ordering: draw the graph first with stata_run/stata_do, then call this. It even lists graph-producing commands (coefplot, twoway, event-study plots) as examples. It stops short of stating when not to use it (e.g. no graph in memory) or what happens on error, but the usage context is unambiguous.

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