Skip to main content
Glama
orchestra-hq

Orchestra MCP Server

Official
by orchestra-hq

Cancel an agent session prompt

cancel_agent_session_prompt

Ask an agent session to stop working on a prompt, named by the promptAcceptedSequenceId its history records for it. This returns once the cancel is queued, and the history records when the prompt stops.

Instructions

Ask an agent session to stop working on a prompt, named by the promptAcceptedSequenceId its history records for it. This returns once the cancel is queued, and the history records when the prompt stops. Needs a grant to run the session's agent. Returns 404 for a session the caller cannot see, and 403 for one whose agent the caller cannot run. A session started by a user in the Orchestra UI is visible to that user alone, so an API key never sees one. Sessions started for a task run or an incident are visible to everyone in the workspace who can view the agent.

Input Schema

NameRequiredDescriptionDefault
session_idYesAgent session ID.
X-Orchestra-Account-IdNoAct on this account rather than the one the credential resolves to. Omit it to use the credential's own account. An API key is issued to a single account, so it may only name that account; an OAuth token may name any account its grant covers.
promptAcceptedSequenceIdYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv2026.10.12-0

TDQS

A4.3/5.0
Behavior5/5

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

Goes well beyond the annotations: it discloses that the call is asynchronous ("returns once the cancel is queued"), that history records when the prompt actually stops, the authorization prerequisite, and precise 404/403 semantics tied to visibility scopes. This is exactly the behavioral detail an agent needs for a mutation tool.

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?

Front-loads the core action, then layers on async behavior, permissions, and error semantics in a logical order with no filler. It is dense but every sentence carries actionable information, so it is not padded.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/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 carries the return-behavior burden and does so (cancel queued vs. history-recorded completion), plus permissions and visibility scoping. An agent has everything needed to call this correctly and interpret the outcome.

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 coverage is 67% and the one undocumented parameter, promptAcceptedSequenceId, is explained in the description as the ID the session's history records for the prompt. session_id and the account-override header are already documented in the schema, so the description fills the remaining gap well.

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 ("Ask an agent session to stop working on a prompt") and identifies the exact identifier the operation targets. This clearly distinguishes it from siblings like send_agent_session_message or get_agent_session, though it never names an alternative explicitly.

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

Usage Guidelines4/5

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

Provides strong operative context: it explains the grant required to run the session's agent and the visibility rules that determine whether a session is even reachable (404 vs 403). It stops short of explicitly contrasting when to cancel versus send a new message, but the usage conditions are clear.

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

Deploy Server

Other Tools