Skip to main content
Glama

Cancel Job

cancel_job

Stop a stuck or unwanted running command by killing its process inside a Docker sandbox. If the job already finished, it returns the final state unchanged.

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.2/5.0
Behavior4/5

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

No annotations provided, so description carries full burden. It discloses the destructive action (kill process) and adds safety: 'Safe on a job that already finished -- it returns the final state untouched.' This gives an idempotency guarantee. Could mention side effects on logs or output, but for a simple kill action this is adequate.

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, no wasted words. The core purpose is front-loaded, and usage guidance is compact. Each sentence earns its place.

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?

With an output schema present, return values are covered. The description covers purpose, usage, and safety for a simple one-parameter cancellation tool. Could specify synchronous/asynchronous behavior, but not essential. Completeness is good for the tool's simplicity.

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 job_id is described as 'Job id to cancel.' The description adds no additional semantics beyond the schema (e.g., format, where to find it). Since coverage is high, baseline 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?

States a specific verb+resource: 'Stop a running command and kill its process inside the sandbox.' This clearly differentiates from siblings like get_job_status or get_job_result, which are read-only. The purpose is unambiguous.

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?

Provides explicit when-to-use context: 'USE THIS when a command is clearly stuck or no longer needed.' Also notes safety on already-finished jobs, giving practical guidance. Does not name alternatives explicitly but the context is sufficient to select this tool over read-only siblings.

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/riyasaxena32/sandbox-mcp'

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