Skip to main content
Glama

Cancel Job

cancel_job

Stops a running command and kills its process inside a sandbox. Use when a job is stuck or no longer needed; returns final state if already finished.

Instructions

Stop a running command and kill its process inside the sandbox.

USE THIS when a command is clearly stuck or no longer needed. Safe on a job that already finished -- it returns the final state untouched.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
job_idYesJob id to cancel.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
errorNo
job_idYes
statusYes
stderrNo
stdoutNo
commandYes
exit_codeNo
duration_msNo
experiment_idYes
stderr_truncatedNo
stdout_truncatedNo

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. First observedv0.1.0

TDQS

A4.3/5.0
Behavior4/5

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

With no annotations, the description carries the behavioral burden. It discloses that the tool stops a running command, kills its process, and is idempotent on finished jobs by returning the final state untouched. This gives the agent a clear mental model of side effects and edge-case safety.

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?

The description is compact and front-loaded with the action, followed by a direct usage criterion and an idempotency note. Every sentence earns its place with no filler or repetition.

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 one-parameter tool with an output schema, the description is sufficiently complete. It covers the core action, the circumstances that warrant cancellation, and the behavior on already-finished jobs, leaving no critical gap for correct invocation.

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 sole parameter 'job_id' is already described as 'Job id to cancel.' The description adds no additional parameter-level meaning, but none is needed given the high schema coverage and single straightforward parameter.

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 uses a specific verb and resource: 'Stop a running command and kill its process inside the sandbox.' This clearly identifies the tool's purpose and distinguishes it from sibling tools that check status or retrieve results.

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?

The description explicitly says when to use the tool: 'USE THIS when a command is clearly stuck or no longer needed.' It also gives important guidance about safety on already-finished jobs, though it does not explicitly name alternative tools or when-not conditions.

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

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Dhananjay-JSR/sandbox-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server