Skip to main content
Glama

Stop a background task

task_stop
Destructive

Stops a running background task by sending SIGTERM to its process group, waiting a grace period, then forcing SIGKILL if it is still alive.

Instructions

Send a signal to the task process group, wait for the grace period, then force SIGKILL if it is still alive. Defaults to SIGTERM.

Input Schema

NameRequiredDescriptionDefault
idYesTask id.
signalNoInitial signal. Default SIGTERM.
grace_msNoGrace period before SIGKILL. Default 3000.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A3.6/5.0
Behavior4/5

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

Annotations already declare destructiveHint=true, so the destructive profile is known; the description adds real value on top by disclosing the escalation behavior — signal the whole process group, wait a grace period, then force SIGKILL — which is exactly the risk an agent needs to understand. It leaves out what happens to the task's record and buffered output afterwards, which keeps it from a 5.

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 tight sentences that front-load the kill sequence and end with the default. Nothing is repeated and nothing is padded.

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 destructive, non-idempotent operation with no output schema and full schema coverage, the description covers the mechanism and defaults adequately. It stops short of describing error conditions (unknown/already-exited task) or whether a follow-up task_remove is needed, which are the remaining gaps.

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 description coverage is 100%, so every parameter (id, signal enum, grace_ms bounds) is already documented in the schema. The description restates the SIGTERM default and the grace-period semantics but adds no new syntax or constraints beyond that, which is the baseline case for high coverage.

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 names a specific action (send a signal to the task process group, escalating to SIGKILL) on a specific resource, and the title/id make the target (a background task) unambiguous. It does not explicitly distinguish itself from task_remove or terminal_kill, but the mechanics described are distinctive enough to identify the tool.

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

Usage Guidelines2/5

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

The description explains how the stop happens but never says when to choose this over siblings like task_remove (which presumably cleans up the record) or terminal_kill (which targets terminals). There are no preconditions, no exclusions, and no mention of what to do if the task is already finished.

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