Skip to main content
Glama

删除会话

piweb_delete_session
Destructive

Delete a Pi Web coding agent session and its child sub-agent sessions permanently. Requires explicit confirm=true; cannot be undone.

Instructions

删除会话(会连同它下面的子代理会话一起删掉,不可恢复)。必须显式传 confirm=true 才会执行。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
confirmNo确认删除:必须显式传 true,否则拒绝执行
sessionYes会话 id / 名称

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.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 and readOnlyHint=false, but the description adds non-obvious behavior: the deletion cascades to sub-agent sessions and is irreversible, plus a mandatory confirmation gate. These are real consequences beyond what the structured fields convey.

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?

A single tightly-packed sentence with the destructive consequence front-loaded in the parenthetical and the confirmation requirement last. Every clause earns its place with zero 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?

For a destructive, no-output-schema mutation tool, it covers what is destroyed (sub-agent sessions), that it cannot be undone, and the guard condition. Only the permission/auth requirements and post-delete state are left implicit.

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 (session, confirm) are already documented in the schema. The description's mention of confirm=true duplicates that; it adds no new format or semantics for the session identifier. 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?

The description states a specific verb+resource (删除会话/delete session) and scopes it with the cascade and irreversibility detail. It does not, however, distinguish itself from siblings like piweb_abort_session, which an agent might conflate with terminating a session.

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?

It clearly states the precondition that confirm=true must be explicitly passed or execution is refused, which is genuine usage guidance. It does not say when to prefer this over alternatives such as piweb_abort_session (stop running) versus permanent removal, leaving that inference to the agent.

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