Skip to main content
Glama
stata-copilot

stata-copilot

by Parado-D

Profile the dataset in memory

stata_profile_data

Profiles the loaded Stata dataset—listing source, observations, variables, types, formats, labels and missing-value counts—or loads a dataset first by name or path.

Instructions

Describe the data the session is holding: source file, observations, variables, and for each variable its type, display format, variable label and number of missing values. Optionally load a dataset first (Stata sysuse name or a file path).

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "stata_profile_data"
  }
}

Input Schema

NameRequiredDescriptionDefault
cwdNoWorking directory (needed when the .dta path is relative).
datasetNoOptional: a `sysuse` dataset name (e.g. "auto") or an absolute .dta path to load first.
timeoutNoSeconds (default 120).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.5.1

TDQS

A3.8/5.0
Behavior3/5

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

With no annotations, the description carries the full burden. It discloses the returned content in detail, which is valuable since there is no output schema, but it omits that supplying `dataset` replaces whatever data is currently in memory (Stata's use/sysuse behavior) and does not state the failure mode when the session holds no dataset.

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, front-loaded with the core action and followed by the optional pre-step. The field enumeration is long but earns its place because there is no output schema to carry that information.

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 three-optional-parameter inspection tool with no annotations and no output schema, the description covers the return shape well enough to call it correctly. The remaining gap is behavioral: it does not say whether loading a dataset overwrites the current one or what output looks like for a very wide dataset.

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 coverage is 100%, including the relative-path requirement for `cwd` and the 120s default for `timeout`, so the schema already does the heavy lifting. The description only restates the `dataset` semantics (sysuse name or .dta path) and says nothing about `cwd` or `timeout`, so it adds no meaning beyond the 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 names a specific verb-and-resource pair ('describe the data the session is holding') and enumerates exactly what is reported: source file, observations, variables, and per-variable type, format, label, and missing count. This is clearly distinct from siblings like stata_results or stata_status, which do not read the dataset structure.

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 only implied: profiling the in-memory dataset, with an optional pre-load step via a sysuse name or .dta path. There is no statement of when to prefer this over stata_status, stata_results, or stata_history, and no guidance on what happens if no dataset is loaded.

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