Skip to main content
Glama

task_close

Destructive

Close a context to release its in-memory snapshots and observations, optionally retaining or canceling owned jobs without deleting user files.

Instructions

Close this context and release its in-memory snapshots and observations. owned_jobs=retain preserves owned jobs; owned_jobs=cancel requests cancellation of owned work and can terminate owned process trees. Does not delete user files. Inspect each returned disposition; cancel_requested does not mean termination was observed.

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": {
      "context_id": "<context_id>"
    },
    "name": "task_close"
  }
}

Input Schema

NameRequiredDescriptionDefault
context_idYes
owned_jobsNoretain

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.7.0

TDQS

A4.1/5.0
Behavior5/5

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

Adds substantial context beyond the annotations: it names what is released (in-memory snapshots and observations), bounds the destructiveness by saying it 'Does not delete user files', and warns that cancel_requested is not proof of termination. That last caveat is exactly the kind of behavior an agent would otherwise misread as success.

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?

Four tight sentences, front-loaded with the core action, then the parameter semantics, then the safety bound, then the result-interpretation caveat. No filler and nothing repeated from structured fields.

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 no output schema, the description partly compensates by telling the agent to inspect each returned disposition and clarifying that cancel_requested is not termination. It is nearly complete for a two-parameter mutation, though the actual shape of the returned dispositions is left to inference.

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?

Schema description coverage is 0%, so the description must carry the parameters; it fully explains both enum values of owned_jobs including their consequences (preserve vs request cancellation with possible process-tree termination). context_id gets no explanation, but its meaning is unambiguous from the name and required/minLength constraints.

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 ('Close this context and release its in-memory snapshots and observations'), which tells an agent exactly what the operation does. It does not name or compare against a sibling such as `context` or `job`, so differentiation is only implicit through 'this context'.

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?

Usage is implied (close a context when finished with it) and the description gives clear guidance on the owned_jobs=retain vs cancel tradeoff, including the risk that cancel 'can terminate owned process trees'. However, it never states when to prefer this over sibling tools like `context` or `job`, and there are no explicit exclusions.

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