Skip to main content
Glama

stop_and_verify

Stops a task and verifies its final state as exited, stopped, or unknown, so unknown results are retried or reported instead of treated as cleaned.

Instructions

停止任务并核实终态。status 三态:exited=拿到退出码;stopped=终止已核实;unknown=核实不可达(非成功非失败——重试核实或显式上报,严禁当已清理)。

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": {
      "session_id": "<session_id>"
    },
    "name": "stop_and_verify"
  }
}

Input Schema

NameRequiredDescriptionDefault
layerNo外部或已过期会话需要指定所属层,初始层用 __initial__
session_idYesspawn_and_observe 返回的 session_id

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.5/5.0
Behavior3/5

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

With no annotations, the description carries the full burden. It does valuable work by defining the three terminal states and explicitly warning that 'unknown' is neither success nor failure and must not be assumed cleaned up — a real behavioral disclosure beyond the schema. It omits other essentials for a stop operation: whether termination is graceful or forced, whether the action is reversible, permission requirements, and what happens if the session is already gone.

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?

Two compact sentences, front-loaded with the action and then the state semantics; the parenthetical carries the most decision-relevant warning. Dense but every clause earns its place, with no filler.

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?

There is no output schema, so the description must explain return semantics — and it does, enumerating the three status values and their meanings. For a two-parameter lifecycle tool this is nearly sufficient; the main gap is the absence of any statement about the effect of stopping or the layer parameter's role in cross-layer sessions.

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 both parameters (layer, session_id) are already documented in the schema, and the description adds nothing about them. Baseline 3 applies because the schema does the heavy lifting here.

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 states a specific verb+resource pair ('停止任务' / stop the task) plus an explicit follow-up action ('核实终态' / verify the terminal state), which distinguishes it from spawn-oriented siblings. It stops short of naming any sibling it should not be confused with, so it is clear but not fully differentiated.

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 by the tool's framing, and it gives real procedural guidance for the 'unknown' case (retry verification or explicitly report, never treat as cleaned up). However, it never says when to prefer this over related lifecycle tools such as close_stream, nor what preconditions must hold before stopping.

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