Cancel a session
niche_session_cancelCancel a scan that is still running.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| reason | No | Optional. Surfaced as session.error_message. | |
| session_id | Yes |
niche_session_cancelCancel a scan that is still running.
| Name | Required | Description | Default |
|---|---|---|---|
| reason | No | Optional. Surfaced as session.error_message. | |
| session_id | Yes |
Changes observed during successful MCP inspections.
Input schema / additionalPropertiesAdded value: +falseDoes the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already declare destructiveHint=true, readOnlyHint=false, and openWorldHint=false, so the safety profile is covered without description help. The description contributes the "still running" state constraint, but is silent on whether partial results are retained, whether cancellation is immediate vs graceful, and what happens to an already-finished session. With annotations carrying the destructive signal, this is adequate but thin.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
A single front-loaded sentence with zero filler and the key constraint (still running) stated up front. It is appropriately terse for a one-argument cancel operation, though it sits close to under-specification.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a destructive, non-readonly mutation with no output schema and only half the parameters documented, the description covers the essentials (what it cancels, which state it targets) but omits post-cancellation effects and partial-result behavior. Annotations cover the safety profile, so the remaining gap is moderate rather than severe.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 50%: reason is well documented in the schema ("Surfaced as session.error_message"), while session_id carries no description anywhere but is self-evident from the tool name. The description adds nothing beyond the schema, which is acceptable here since the non-obvious parameter is documented.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
States a specific verb (cancel) and resource (a running scan/session), so an agent can distinguish it from niche_session_state and niche_list_sessions at a glance. The only wrinkle is terminology drift between the tool name (session) and the description (scan), but the intent is unambiguous.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
"Still running" implies a precondition (only active scans, not completed or queued ones), which is useful implied guidance. However, no alternative is named for cases when the session is not running, and no prerequisites or follow-up steps are given.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Add one secure layer between your agents and this server.