Skip to main content
Glama

cancel_server

Cancel an in-flight server start or swap on a specified port. Returns success even if no operation is in progress, preventing errors.

Instructions

Cancel an in-flight start or swap on this port (ADR-014). Sets a cancel flag on the in-flight marker; the running op picks it up at the next phase boundary (typically within ~1 s during readiness poll). Returns success with marker_existed=False if there is no in-flight op — 'nothing to cancel' is a successful no-op, not an error. A cancel that arrives after the new process has been spawned and the lockfile written is ignored; the op completes and reports cancel_ignored_post_commit=True.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
portYesPort number of the in-flight op to cancel
Behavior5/5

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

Fully discloses mechanism (cancel flag, phase boundary), timing (~1 s), and return conditions (marker_existed=False, cancel_ignored_post_commit=True), especially important since no annotations are provided.

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 sentences, front-loaded with purpose, each sentence adds value without redundancy.

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 single parameter and no output schema, description covers behavior, edge cases, and timing comprehensively.

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 covers port parameter fully with description; description mentions it in context but doesn't add significant new semantics beyond the schema, so baseline 3 is appropriate.

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 it cancels an in-flight start or swap on a port, with specific verb-resource pairing and reference to ADR-014, distinguishing it from sibling tools like start_server and stop_server.

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?

Describes when to use (cancel in-flight op) and explains edge cases (no-op if no in-flight op), but doesn't explicitly contrast with alternatives like stopping a server directly.

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/shanevcantwell/llauncher'

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