Skip to main content
Glama

gateway.cancel

Cancel pending tool invocations by request ID; use force to override health checks.

Instructions

Cancel a pending tool invocation. By default, refuses to cancel healthy requests (recent heartbeat). Use force=true to cancel anyway. Use gateway.list_pending first to see request IDs and health status.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
forceNoForce cancel even if request is healthy (has recent heartbeat)
request_idYesRequest ID in format "server_name::local_id" from gateway.list_pending
Behavior4/5

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

With no annotations, the description carries full burden. It discloses the key behavioral trait: default refusal of healthy requests and the force flag to override. It also notes the request ID format. It could mention idempotency or error states, but the core behavior is well-transparent for a cancel operation.

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?

Three concise sentences: purpose, default behavior with force alternative, and prerequisite advice. No wasted words, front-loaded with the core action. Ideal structure for quick agent comprehension.

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?

Given no output schema and simple tool, the description covers all needed context: prerequisite list_pending, default safety behavior, force option, ID format. For the complexity level, it is fully complete.

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?

The description adds context to schema-defined parameters: it explains the request ID format (already in schema) and the force parameter's effect. With 100% schema coverage, baseline is 3, but the description adds extra usage context, raising it to 4.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool cancels a pending tool invocation, specifies the verb and resource, and distinguishes from siblings by referencing gateway.list_pending and explaining default refusal of healthy requests. It leaves no ambiguity about the tool's purpose.

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

Usage Guidelines5/5

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

The description explicitly advises to use gateway.list_pending first to get request IDs and health status, and explains the default behavior and force flag. This provides clear when-to-use and when-not-to-use guidance, effectively integrating with the sibling tool.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/ViperJuice/pmcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server