Skip to main content
Glama

Create IVR Mapping Job

createMapping

Create an IVR mapping job for a phone number: its name, number, config and tags. This saves the job and nothing else: it places no call and starts no run, and the job comes back with status="idle" and no currentRun. A run is what calls the number, navigates the menu by DTMF and/or voice, transcribes the audio and analyses it with AI to discover the branches (typically 2-15 minutes, depending on tree depth). Start a run with startMapping. Check listMappings first: if a job for this number exists, run that one instead of saving another. Use when: the user asks to map a number.

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": {
      "name": "<name>",
      "phoneNumber": "<phoneNumber>",
      "config": "<config>"
    },
    "name": "createMapping"
  }
}

Input Schema

NameRequiredDescriptionDefault
nameYesJob display name.
tagsNoUp to 10 lowercase kebab-case labels for filtering and organisation. Normalised server-side (trimmed, lowercased, de-duplicated).
configYes
profileIdNoData profile used to supply scripted input values during the run. A profile id is `profile_` followed by base-36 characters, not a UUID.
phoneNumberYesTarget phone number in E.164 format.

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. Changed2 schema fields changed
    • changedInput schema / properties / profileId / description
      Previous value: -"Data profile used to supply scripted input values during the run."New value: +"Data profile used to supply scripted input values during the run. A profile id is\n`profile_` followed by base-36 characters, not a UUID.\n"
    • removedInput schema / properties / profileId / format
      Removed value: -"uuid"
  2. 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"
  3. First observed

TDQS

A4.3/5.0
Behavior4/5

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

Beyond the annotations (readOnly=false, destructive=false, idempotent=false) it discloses the true effect scope ('saves the job and nothing else'), the resulting state (status="idle", no currentRun), and the cost profile of the follow-up run (2-15 minutes, DTMF/voice, transcription, AI analysis). It does not state permission/auth requirements or what happens on a duplicate name or invalid config, which are the remaining behavioural gaps for a create-style 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?

Structure is front-loaded: purpose first, then the critical create-vs-run distinction, then the alternative and the trigger. The aside describing how a run works (DTMF/voice navigation, transcription, 2-15 minute duration) is slightly tangential for a create tool but is justified as it explains why creating and running are separate and why duplicate checks matter.

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?

An output schema exists, so the description is not obliged to document return values, yet it still names the returned state, which helps verification. For a create tool whose config surface is fully documented in the schema, the description covers purpose, non-effects, prerequisite, and next step; only error and auth behaviour are absent.

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 description coverage is 80% and the nested config is heavily documented, so the schema does the heavy lifting. The description only restates the top-level fields ('its name, number, config and tags') without adding meaning, constraints, or defaults beyond what the schema already says, which matches the baseline for high coverage.

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 first sentence names a specific verb and resource ('Create an IVR mapping job for a phone number') and enumerates the payload it holds (name, number, config, tags). It then explicitly separates itself from the sibling that does the actual calling by stating 'it places no call and starts no run' and naming startMapping as the run trigger.

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?

It gives an explicit trigger ('Use when: the user asks to map a number'), an explicit prerequisite ('Check listMappings first: if a job for this number exists, run that one instead of saving another'), and routes the alternative case to startMapping. Both the when-to-use and when-to-use-something-else paths are covered.

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.