Skip to main content
Glama

Create a relay lease for a custom agent

create_relay_lease

Create a one-time SIP name lease from the relay pool for an outbound call made by a custom (BYO) voice agent - to is the destination number, from is your own volai number the call should go out from (see get_sip_credentials). Configure the platform's outbound trunk with outboundTrunkAddress from get_sip_credentials, not server. Use the returned sipName (a bare name, not a URI) as to_number in your platform - ElevenLabs rejects a full SIP URI. sipUri is for a regular SIP client. A lease connects exactly one call: every new attempt, including a retry after a call that was not answered or failed, needs a new create_relay_lease - dialing the same sipName again is rejected, so turn off automatic redialing in your platform. The optional ttlSecs (15 to 300, default 120) is how many seconds the lease waits for the first call before an unused one expires and returns the SIP name to the shared pool - only use a longer value when you know your platform calls back late. With a monthly spending cap set by the customer (see get_spend_cap) and reached this month, this fails with spend_cap_reached (HTTP 402): nothing is charged and retrying will not help, so tell the customer, who can raise or remove the cap (set_spend_cap, clear_spend_cap) or wait for the next month. Same data as POST /v1/relay (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": {
      "to": "<to>",
      "from": "<from>"
    },
    "name": "create_relay_lease"
  }
}

Input Schema

NameRequiredDescriptionDefault
toYesDestination phone number for the call, in E.164 format with the country code, for example +420777123456.
fromYesYour own volai number the call goes out from, in E.164 format with the country code, from list_numbers or get_sip_credentials.
ttlSecsNoHow many seconds the lease waits for the first call before an unused one expires and returns the SIP name to the shared pool, 15 to 300. Defaults to 120.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.8/5.0
Behavior5/5

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

Annotations only declare the mutation/safety profile (readOnly=false, idempotent=false, destructive=false); the description adds substantial behavior beyond that: the lease is single-use, every retry requires a new lease, reusing a sipName is rejected, and there is a TTL window after which the name returns to a shared pool. The spend-cap failure mode with HTTP 402 and 'nothing is charged, retrying will not help' is exactly the kind of operational context annotations cannot carry.

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?

Purpose is front-loaded in the first clause and nearly every sentence carries operational content. It is a dense wall of prose in one paragraph, though, and could be split into setup / lease-lifetime / failure bullets for faster scanning without losing information.

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?

No output schema, but the description names the returned fields that matter (sipName, sipUri), warns that sipName is a bare name rather than a URI, points at /openapi.json for the response schema, and covers the edge cases (retry, expiry, spend cap). Nothing essential for a correct call or a correct follow-up action is missing.

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?

Schema coverage is 100%, so the schema already defines to, from and ttlSecs, making 3 the baseline. The description still adds meaning by framing to as the destination and from as the agent's own outbound volai number sourced from list_numbers/get_sip_credentials, and by reinforcing the 15–300 TTL window as the first-call wait rather than a call duration.

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 (create), a specific resource (a one-time SIP name lease from the relay pool) and the calling context (outbound call from a custom BYO voice agent). An agent can immediately separate this from siblings like create_agent or get_sip_credentials.

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?

Explicit guidance throughout: use sipUri instead when a regular SIP client is involved, see get_sip_credentials for the outbound trunk and from number, only raise ttlSecs when the platform calls back late, and disable auto-redialing. It even explains what to do on spend_cap_reached (raise/remove the cap or wait) rather than just naming the error.

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.