Skip to main content
Glama
stata-copilot

stata-copilot

by Parado-D

Read a background job log

stata_job_log

Return the tail of a running Stata background job log to check progress, counts, current tables, or long steps without waiting for the job to finish.

Instructions

Return the tail of the log a background job is writing (Stata batch writes .log next to the do-file). Use it to see progress —counts, the current table, a long imputation step —while the job is still running.

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": {
      "jobId": "<jobId>"
    },
    "name": "stata_job_log"
  }
}

Input Schema

NameRequiredDescriptionDefault
cwdNoDirectory the job was submitted in (default: the server working directory).
tailNoCharacters from the end (default 8000).
jobIdYesJob id from stata_job_submit.

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 at all, the description carries the full behavioral burden. It does add useful context — that this is a bounded tail read of a file Stata writes beside the do-file, and that it is intended for in-flight jobs — but says nothing about behavior when the log does not yet exist, when the job has already completed, or whether the call blocks.

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 tight sentences, front-loaded with the return value and followed by the motivating use case. Every clause adds information; nothing is redundant.

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 simple three-parameter read tool with no output schema, the description supplies enough: what is returned, where it comes from, and when to reach for it. The remaining gap is edge-case behavior (missing log, finished job) which an agent would likely want spelled out.

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 100%, so jobId, tail, and cwd are already documented in the schema, which sets the baseline at 3. The description adds only indirect meaning: noting the log lives next to the do-file hints at how cwd resolves the read, but it does not explain tail truncation semantics or jobId sourcing beyond what the schema states.

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 names a specific verb and resource ('Return the tail of the log a background job is writing') and even identifies the concrete artifact ('Stata batch writes <do-file>.log next to the do-file'), so an agent knows exactly what comes back. It implicitly separates itself from status/results siblings by emphasizing raw log tail rather than parsed output, but never names those siblings explicitly.

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?

'Use it to see progress — counts, the current table, a long imputation step — while the job is still running' gives a clear usage context and the key condition (job still running). It stops short of stating what to use instead once the job has finished (e.g., results/status), so no explicit alternatives or exclusions are provided.

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