Skip to main content
Glama

Cancel Mapping Job

cancelMapping
DestructiveIdempotent

Cancel an in-progress IVR mapping job. Returns the updated job resource. No effect if the job is already idle/cancelled. Use this when you need to stop a long-running mapping early (e.g., the agent realised the wrong number was supplied).

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": "cancelMapping"
  }
}

Input Schema

NameRequiredDescriptionDefault
idYesMapping-job identifier.

Output Schema

NameRequiredDescriptionDefault
idYesUnique mapping-job identifier.
nameYesJob display name.
tagsNoString labels for filtering and grouping. Lowercase alphanumeric + hyphens.
errorNoError message if the job failed.
statsNoAggregate statistics for the current run, populated while the job executes.
configYesPer-job configuration knobs that govern exploration shape and call orchestration. Sensible defaults are applied server-side when fields are omitted on create.
statusYesOn getMappingJob, the status of the run the response describes (a copy of `currentRun.status`, with `queued` shown as `idle`), or `idle` when the job has never run. createMappingJob returns `idle`: creating a job places no call and starts no run (POST /mapping/{id}/start does).
userIdYesUser who created the job.
createdAtYesCreation timestamp.
runNumberNoFlat-merged run number from the active or requested (via `?version=`) run. Phase 04 D-09 — preserved at top level for frontend back-compat alongside the new nested `currentRun` object.
startedAtNoMost-recent run start timestamp.
updatedAtYesLast update timestamp.
currentRunNoNested run summary on single-job responses (Phase 04 D-09 / D-10). `currentRun.status` is the run's own status (`queued`, `running`, `completed`, `failed` or `limited`); read it to decide whether the discovery is done. The flat `status` on the job response is a copy of it, except that `queued` shows as `idle`. The field name stays `currentRun` even when `?version=N` is supplied — the wrapper describes the run this response describes (active by default, or the historical run identified by `version`).
completedAtNoMost-recent run completion timestamp.
limitReasonNoReason the run stopped early (only present when `status` is `limited`).
phoneNumberYesTarget phone number in E.164 format.
workspaceIdYesOwning workspace.
currentRunIdNoIdentifier of the most-recent run (absent if never started).
inFlightCountNoCurrently executing calls.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changed
    • changedOutput schema / properties / currentRun / description
      Previous value: -"Nested run summary on single-job responses (Phase 04 D-09 / D-10). Unlike the\njob-level `status` (which cycles `running` ↔ `idle` and never reaches\n`completed`), `currentRun.status` CAN reach `completed`/`failed`/`limited`.\nRead this field to decide whether the discovery is done — do NOT poll for\n`status === 'completed'` on the job itself.\n\nThe field name stays `currentRun` even when `?version=N` is supplied — the\nwrapper describes the run this response describes (active by default, or\nthe historical run identified by `version`).\n"New value: +"Nested run summary on single-job responses (Phase 04 D-09 / D-10).\n`currentRun.status` is the run's own status (`queued`, `running`, `completed`,\n`failed` or `limited`); read it to decide whether the discovery is done. The\nflat `status` on the job response is a copy of it, except that `queued` shows\nas `idle`.\n\nThe field name stays `currentRun` even when `?version=N` is supplied — the\nwrapper describes the run this response describes (active by default, or\nthe historical run identified by `version`).\n"
    • changedOutput schema / properties / currentRun / properties / status / description
      Previous value: -"Run-level status. CAN reach `completed`, unlike the job-level status.\n"New value: +"The run's own status. A run has finished when it is `completed`, `failed` or\n`limited`. The job response's flat `status` copies it, with `queued` shown as `idle`.\n"
    • changedOutput schema / properties / status / description
      Previous value: -"Current job status. Note: mapping jobs typically cycle `running` → `idle`\nafter each run completes — they rarely persist `completed` state.\n"New value: +"On getMappingJob, the status of the run the response describes (a copy of\n`currentRun.status`, with `queued` shown as `idle`), or `idle` when the job\nhas never run. createMappingJob returns `idle`: creating a job places no\ncall and starts no run (POST /mapping/{id}/start does).\n"
  2. 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; the description reinforces the idempotency in human terms ('No effect if the job is already idle/cancelled') and states the effect ('Returns the updated job resource'). That tells the agent the outcome of a repeat call and what comes back, which the annotations do not. It does not discuss whether partial mapping state is rolled back or left in place, which is the notable remaining gap for a destructive 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?

Four short sentences, front-loaded with the action, then the return value, then the no-op condition, then the usage trigger. No filler and no repetition of the schema or name.

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?

For a one-parameter mutation with full annotation coverage and an output schema, the description supplies everything an agent needs: what it does, what it returns, repeat-call behavior, and the situation that warrants it. Return-value detail can be deferred to the output schema, and it is.

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% with a single required UUID parameter already documented as 'Mapping-job identifier.' The description adds only the 'IVR mapping' framing, which clarifies what domain the identifier belongs to. Baseline 3 applies since the schema does the parameter work.

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: 'Cancel an in-progress IVR mapping job.' That is concrete enough to separate it from getMapping/createMapping/listMappingRuns without opening any schema. It does not name a sibling tool explicitly, which is the only thing keeping it off a 5.

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 a clear triggering condition: 'Use this when you need to stop a long-running mapping early (e.g., the agent realised the wrong number was supplied).' The example makes the intended situation concrete. It stops short of explicit when-not guidance or naming an alternative recovery path, so it is not a full 5.

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.