Skip to main content
Glama
stata-copilot

stata-copilot

by Parado-D

Check a background job

stata_job_status

Check a background Stata job's state, elapsed time, return code, first error, and log tail. Poll in a loop with pauses instead of blocking on long runs.

Instructions

Report one background Stata job: state (running/ok/failed/timedout/killed), elapsed time, return code, the first Stata error if the do-file aborted, and the tail of its log. Call it in a loop with a pause between calls instead of blocking on a long run.

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_status"
  }
}

Input Schema

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

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.5.1

TDQS

A4.3/5.0
Behavior4/5

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

No annotations are supplied, so the description carries the full burden. It discloses the returned status values, error behavior, log tail, and non-blocking polling expectation, but omits details like log-tail length, rate-limit concerns, and an explicit read-only/no-side-effect statement.

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 return profile and followed by concise usage advice. Every clause contributes information, with no filler.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple two-parameter status tool with no output schema, the description provides enough: it explains the returned fields and polling behavior. Only minor edge details, such as how much log tail is returned, are absent.

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%, and the schema already documents jobId and cwd. The description adds no parameter-specific meaning beyond the one-job scope, so the baseline of 3 is appropriate.

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 opens with a specific verb and resource ("Report one background Stata job") and enumerates the exact status fields returned. "One" and "tail of its log" help distinguish it from job-list and full-log siblings, even without naming them.

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?

It gives a clear polling pattern: call in a loop with pauses instead of blocking on a long run. It does not explicitly contrast with stata_job_list or stata_job_log, or say when not to use it, so it falls short of full alternative routing.

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