Skip to main content
Glama
stata-copilot

stata-copilot

by Parado-D

Stop a background job

stata_job_kill

Terminate a background Stata job by ID and return its final state, preserving the log so far to stop stuck imputations or accidental loops.

Instructions

Terminate a background Stata job by its id and return the final state. Prefer this over guessing: a stuck imputation or an accidental while loop is one call away from being stopped, and the log written so far is kept.

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

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

A3.6/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 and does disclose two useful behaviors: it returns the final state and the partial log is preserved. It does not say whether termination is forced or graceful, what happens if the job already finished or the id is unknown, 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.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two sentences, front-loaded with the action and followed by motivation. Minor rhetorical filler ('Prefer this over guessing', 'one call away from being stopped') costs a little but is not padding.

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

Completeness3/5

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

For a two-parameter mutation with no annotations and no output schema, the description covers the action and hints at the return value ('final state'). It omits failure modes and termination semantics, which matter for a kill operation.

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%, so both jobId and cwd are already documented in the input schema. The description adds no format or usage detail beyond 'by its id', so the baseline of 3 applies.

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 states a specific verb and resource: 'Terminate a background Stata job by its id and return the final state.' That is unambiguous and distinct from list/log/status siblings, though it never contrasts itself with the similarly-named stata_break sibling.

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 concrete usage context ('a stuck imputation or an accidental `while` loop') which tells the agent when this tool applies. It stops short of explicit exclusions or naming the alternative for non-background/interactive runs, which would be needed for a 5.

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