Skip to main content
Glama

Cancel a relay lease

cancel_relay_lease
DestructiveIdempotent

Cancel a relay lease before it expires - returns the SIP name to the shared pool for other customers. A lease already used by a running call cannot be cancelled this way - it just runs its course. Same data as DELETE /v1/relay/{id} (response schema in /openapi.json).

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "id": "<id>"
    },
    "name": "cancel_relay_lease"
  }
}

Input Schema

NameRequiredDescriptionDefault
idYesId of the relay lease to cancel, from create_relay_lease or list_relay_leases. Looks like rl_9f3a2b7c4d1e.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.1/5.0
Behavior4/5

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

Annotations already declare destructiveHint=true and idempotentHint=true, so the description only needs to add context, and it does: it explains the side effect on the SIP pool and the special-case behavior when the lease is tied to a live call. The one ambiguity is whether the running-call case is a no-op or an error; 'it just runs its course' hints at no-op but does not say outright.

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?

Three tight sentences, with the effect and the precondition front-loaded. The trailing REST mapping ('Same data as DELETE /v1/relay/{id}...') is useful for developers, but it is the least essential sentence.

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?

A simple single-parameter mutation with no output schema, so the description covers nearly everything needed: the effect, the eligibility condition, and a pointer to /openapi.json for the response shape. The remaining gap is what the tool returns or whether it errors in the blocked case.

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 coverage is 100% and the single id parameter is fully described in the schema, including a format example, so the description does not need to restate it. Its one addition is naming where the id comes from (create_relay_lease / list_relay_leases), which only marginally extends the schema.

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?

States a specific verb and resource ('Cancel a relay lease') plus the concrete effect ('returns the SIP name to the shared pool'), which separates it cleanly from create_relay_lease and list_relay_leases.

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?

Gives an explicit precondition ('before it expires') and an explicit exclusion ('a lease already used by a running call cannot be cancelled this way'). It stops short of naming an alternative tool for that blocked case, so it is strong but not complete.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.