Skip to main content
Glama

colab_cancel

Destructive

Cancel an active background job to release Colab GPU resources. Use colab_jobs to find job IDs, then cancel and verify with colab_poll.

Instructions

Cancel an active background job.

Marks the job as cancelled and attempts to cancel the underlying asyncio task. Use colab_jobs to find active job IDs.

After cancellation:

  • Verify with colab_poll(job_id) that the status is 'cancelled'.

  • The Colab runtime is released automatically.

  • You can then start a new background job with colab_execute.

Common issues:

  • Cannot cancel a job that is already completed, failed, or cancelled.

  • Use colab_jobs first if you don't have the job_id.

Args: job_id: The job identifier returned by colab_execute.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
job_idYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/5

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

Annotations declare destructiveHint=true and readOnlyHint=false, but the description adds value by explaining the underlying async task cancellation, automatic runtime release, and verification step. No contradiction.

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?

Well-structured with sections for main action, post-cancellation steps, common issues, and args. Front-loaded with purpose. A bit lengthy but every sentence adds value.

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?

Given an output schema exists (not shown), return values are not needed. The description covers purpose, usage, behavioral effects, common issues, and sibling references thoroughly for a cancellation tool.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Only one parameter (job_id) with 0% schema description coverage. The description explains it as 'The job identifier returned by colab_execute,' which is clear and sufficient given the single required param.

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 clearly states 'Cancel an active background job' and explains the action (marks as cancelled, cancels async task). It distinguishes from siblings by referencing colab_execute, colab_jobs, and colab_poll for different lifecycle stages.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly states when to use (cancel active job), when not to (cannot cancel already completed/failed/cancelled), and recommends colab_jobs first if job_id is unknown. Provides post-cancellation steps (verify with colab_poll, then start new job with colab_execute).

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

Install Server

Other Tools

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/mio-github/mcp-colab-gpu'

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