Skip to main content
Glama

Re-rent an expired rental

re_rent_rental
Destructive

Re-rent an expired phone number for another period at its re-rent price, requiring an approved max price so charges are refused if higher.

Instructions

Re-rent the same number for another period of its original duration, charged at re_rent_price_cents (shown by get_rental). Only works on an expired rental whose re_rent_available is true (the number has not been released yet). No duration argument. Requires max_price_cents: the re-rent price you showed the user and they approved; refused uncharged if the price is higher.

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": {
      "rental_id": "<rental_id>",
      "max_price_cents": "<max_price_cents>"
    },
    "name": "re_rent_rental"
  }
}

Input Schema

NameRequiredDescriptionDefault
rental_idYesren_... id of an expired rental with re_rent_available=true
max_price_centsYesThe price you showed the user and they approved, in US cents (e.g. 250 = $2.50). Nothing is charged if the current price is higher; the new price comes back so you can ask the user again.

Output Schema

NameRequiredDescriptionDefault
rentalYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changedv2.1.0
    • addedOutput schema / properties / rental / properties / messages / items / properties / content_withheld
      Added value: +{
      +  "type": "boolean"
      +}
    • changedOutput schema / properties / rental / properties / messages / items / properties / text / type
      Previous value: -"string"New value: +[
      +  "string",
      +  "null"
      +]
    • addedOutput schema / properties / rental / properties / payment_due
      Added value: +{
      +  "anyOf": [
      +    {
      +      "additionalProperties": {},
      +      "properties": {
      +        "amount_cents": {
      +          "maximum": 9007199254740991,
      +          "minimum": -9007199254740991,
      +          "type": "integer"
      +        },
      +        "since": {
      +          "type": "string"
      +        }
      +      },
      +      "required": [
      +        "amount_cents",
      +        "since"
      +      ],
      +      "type": "object"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ]
      +}
  2. Changed2 schema fields changedv2.0.0
    • changedInput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
    • changedOutput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
  3. Changed3 schema fields changedv1.2.1
    • addedInput schema / properties / max_price_cents
      Added value: +{
      +  "description": "The price you showed the user and they approved, in US cents (e.g. 250 = $2.50). Nothing is charged if the current price is higher; the new price comes back so you can ask the user again.",
      +  "exclusiveMinimum": 0,
      +  "maximum": 1000000,
      +  "type": "integer"
      +}
    • changedInput schema / required
      Previous value: -[
      -  "rental_id"
      -]New value: +[
      +  "rental_id",
      +  "max_price_cents"
      +]
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "$schema": "http://json-schema.org/draft-07/schema#",
      +  "additionalProperties": {},
      +  "properties": {
      +    "rental": {
      +      "additionalProperties": {},
      +      "properties": {
      +        "auto_renew": {
      +          "type": "boolean"
      +        },
      +        "can_cancel": {
      +          "type": "boolean"
      +        },
      +        "cancel_window_expires_at": {
      +          "type": [
      +            "string",
      +            "null"
      +          ]
      +        },
      +        "charged_price_cents": {
      +          "maximum": 9007199254740991,
      +          "minimum": -9007199254740991,
      +          "type": "integer"
      +        },
      +        "country": {
      +          "type": "string"
      +        },
      +        "created_at": {
      +          "type": "string"
      +        },
      +        "display_id": {
      +          "type": [
      +            "string",
      +            "null"
      +          ]
      +        },
      +        "duration": {
      +          "type": "string"
      +        },
      +        "expires_at": {
      +          "type": "string"
      +        },
      +        "id": {
      +          "type": "string"
      +        },
      +        "messages": {
      +          "items": {
      +            "additionalProperties": {},
      +            "properties": {
      +              "code": {
      +                "type": [
      +                  "string",
      +                  "null"
      +                ]
      +              },
      +              "id": {
      +                "type": "string"
      +              },
      +              "received_at": {
      +                "type": "string"
      +              },
      +              "text": {
      +                "type": "string"
      +              }
      +            },
      +            "required": [
      +              "id",
      +              "text",
      +              "received_at"
      +            ],
      +            "type": "object"
      +          },
      +          "type": "array"
      +        },
      +        "next_renewal_price_cents": {
      +          "maximum": 9007199254740991,
      +          "minimum": -9007199254740991,
      +          "type": "integer"
      +        },
      +        "paid_until": {
      +          "type": "string"
      +        },
      +        "phone_number": {
      +          "type": "string"
      +        },
      +        "re_rent_available": {
      +          "type": "boolean"
      +        },
      +        "re_rent_blocked_at": {
      +          "type": [
      +            "string",
      +            "null"
      +          ]
      +        },
      +        "re_rent_price_cents": {
      +          "anyOf": [
      +            {
      +              "maximum": 9007199254740991,
      +              "minimum": -9007199254740991,
      +              "type": "integer"
      +            },
      +            {
      +              "type": "null"
      +            }
      +          ]
      +        },
      +        "refunded_cents": {
      +          "maximum": 9007199254740991,
      +          "minimum": -9007199254740991,
      +          "type": "integer"
      +        },
      +        "rental_type": {
      +          "const": "rental",
      +          "type": "string"
      +        },
      +        "service_id": {
      +          "type": [
      +            "string",
      +            "null"
      +          ]
      +        },
      +        "service_name": {
      +          "type": "string"
      +        },
      +        "status": {
      +          "enum": [
      +            "active",
      +            "expired",
      +            "cancelled"
      +          ],
      +          "type": "string"
      +        }
      +      },
      +      "required": [
      +        "id",
      +        "status",
      +        "phone_number",
      +        "service_id",
      +        "service_name",
      +        "country",
      +        "duration",
      +        "rental_type",
      +        "charged_price_cents",
      +        "auto_renew",
      +        "next_renewal_price_cents",
      +        "re_rent_available",
      +        "re_rent_price_cents",
      +        "re_rent_blocked_at",
      +        "created_at",
      +        "paid_until",
      +        "expires_at",
      +        "can_cancel"
      +      ],
      +      "type": "object"
      +    }
      +  },
      +  "required": [
      +    "rental"
      +  ],
      +  "type": "object"
      +}
  4. Changed2 schema fields changedv1.1.8
    • changedInput schema / properties / rental_id / description
      Previous value: -"ren_xxx from an expired LTR with re_rent_available=true"New value: +"ren_... id of an expired rental with re_rent_available=true"
    • addedInput schema / properties / rental_id / pattern
      Added value: +"^(?:ren_[A-Za-z0-9_-]{1,64})$"
  5. First observedv1.1.3

TDQS

A4.6/5.0
Behavior4/5

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

Annotations already declare destructiveHint=true and readOnlyHint=false, so the description's main added value is the financial behavior: a re-rent is charged, and a price mismatch is refused without charging. That post-condition is genuinely useful and not derivable from the annotations. It stops short of saying what happens to the prior rental record or whether a new rental id is issued.

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 dense sentences, front-loaded with the action and price, followed by preconditions and the price guard. Every clause carries information an agent would otherwise have to guess.

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 paid mutation tool with an output schema and full annotation coverage, and the description covers preconditions, cost, and failure behavior. The only gap is lifecycle detail (resulting rental id / state of the old rental), which is partly mitigated by the output schema.

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% and the schema already explains max_price_cents fully, so the description largely restates it; the credit comes from 'No duration argument', which rules out an expectation the schema alone cannot. The rental_id precondition (expired + re_rent_available=true) is reinforced meaningfully in prose.

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 the specific action (re-rent the same number), the scope (another period of its original duration), and the pricing model, and points at get_rental as the source of re_rent_price_cents. An agent can distinguish this from rent_number or reuse_number without inspecting either schema.

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?

Gives both the enabling condition (expired rental with re_rent_available=true, number not yet released) and an explicit when-not (price above max_price_cents → refused, uncharged). It also tells the agent there is no duration argument, removing a likely mistake.

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