Skip to main content
Glama

LM Studio: cancel a task

task_cancel
DestructiveIdempotent

Stop a running background task by task ID while preserving session history up to the previous answer. Use it to cancel ongoing work without losing prior context.

Instructions

Stop a running background task. The session keeps everything up to the previous answer.

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": {
      "task_id": "<task_id>"
    },
    "name": "task_cancel"
  }
}

Input Schema

NameRequiredDescriptionDefault
task_idYesTask id from task_start or task_status.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.8/5.0
Behavior4/5

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

Annotations already declare destructiveHint=true, idempotentHint=true and readOnlyHint=false, so the safety profile is covered. The description adds real value beyond that by disclosing state retention: the session keeps everything up to the previous answer, i.e. the in-progress answer is discarded. That retention detail is exactly the kind of context annotations cannot express, though 'previous answer' is slightly loose phrasing.

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 short sentences with zero filler; the core action is front-loaded and the only secondary sentence carries genuinely new information about retained state.

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?

For a single-parameter, idempotent cancel operation with strong annotations and no output schema, the definition covers action and state effect adequately. It stops short of describing edge cases such as an unknown or already-completed task id, which would be the remaining gap.

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 task_id is already documented with its pattern and provenance (task_start or task_status). The description adds nothing about the parameter, so the baseline 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?

States a specific verb and resource: 'Stop a running background task.' That is unambiguous and clearly distinct in kind from task_start/task_status, though the description never names those siblings to reinforce the contrast.

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

Usage Guidelines3/5

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

The phrase 'running background task' implies the precondition for use, but there is no explicit when-to-use guidance, no note about what to do if the task already finished, and no routing to alternatives such as task_status for checking completion first.

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