Skip to main content
Glama

Buy a proxy

purchase_proxy
Destructive

Purchases a proxy plan from search results using an approved max price; charges balance only if price matches, refunds if provisioning fails, and returns status for connection details.

Instructions

Buy a proxy plan from search_proxies, charged to your balance immediately. Requires max_price_cents: the plan price you showed the user and they approved; if the price is now higher, nothing is charged and the new price comes back to re-confirm. A shared proxy becomes active in 1-2 minutes; a dedicated proxy is often active immediately, otherwise within about 5 minutes. If it cannot be provisioned, the charge is refunded automatically. Poll get_proxy_status until status='active' for the connection details.

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": {
      "plan_id": "<plan_id>",
      "max_price_cents": "<max_price_cents>"
    },
    "name": "purchase_proxy"
  }
}

Input Schema

NameRequiredDescriptionDefault
plan_idYesplan_... id from search_proxies
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
proxyYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 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"
    • addedOutput schema / properties / proxy / properties / topup_prices
      Added value: +{
      +  "anyOf": [
      +    {
      +      "items": {
      +        "additionalProperties": {},
      +        "properties": {
      +          "additional_gb": {
      +            "maximum": 9007199254740991,
      +            "minimum": -9007199254740991,
      +            "type": "integer"
      +          },
      +          "days_added": {
      +            "type": "number"
      +          },
      +          "price_cents": {
      +            "maximum": 9007199254740991,
      +            "minimum": -9007199254740991,
      +            "type": "integer"
      +          }
      +        },
      +        "required": [
      +          "additional_gb",
      +          "price_cents",
      +          "days_added"
      +        ],
      +        "type": "object"
      +      },
      +      "type": "array"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ]
      +}
  2. 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: -[
      -  "plan_id"
      -]New value: +[
      +  "plan_id",
      +  "max_price_cents"
      +]
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "$schema": "http://json-schema.org/draft-07/schema#",
      +  "additionalProperties": {},
      +  "properties": {
      +    "proxy": {
      +      "additionalProperties": {},
      +      "properties": {
      +        "auto_renew": {
      +          "type": "boolean"
      +        },
      +        "carrier": {
      +          "type": [
      +            "string",
      +            "null"
      +          ]
      +        },
      +        "charged_price_cents": {
      +          "maximum": 9007199254740991,
      +          "minimum": -9007199254740991,
      +          "type": "integer"
      +        },
      +        "country": {
      +          "type": [
      +            "string",
      +            "null"
      +          ]
      +        },
      +        "created_at": {
      +          "type": "string"
      +        },
      +        "data_bytes_used": {
      +          "maximum": 9007199254740991,
      +          "minimum": -9007199254740991,
      +          "type": "integer"
      +        },
      +        "data_gb_total": {
      +          "maximum": 9007199254740991,
      +          "minimum": -9007199254740991,
      +          "type": "integer"
      +        },
      +        "expires_at": {
      +          "type": "string"
      +        },
      +        "gateway": {
      +          "anyOf": [
      +            {
      +              "additionalProperties": {},
      +              "properties": {
      +                "host": {
      +                  "type": "string"
      +                },
      +                "password": {
      +                  "type": "string"
      +                },
      +                "port": {
      +                  "maximum": 9007199254740991,
      +                  "minimum": -9007199254740991,
      +                  "type": "integer"
      +                },
      +                "protocol": {
      +                  "enum": [
      +                    "http",
      +                    "socks5"
      +                  ],
      +                  "type": "string"
      +                },
      +                "socks_port": {
      +                  "anyOf": [
      +                    {
      +                      "maximum": 9007199254740991,
      +                      "minimum": -9007199254740991,
      +                      "type": "integer"
      +                    },
      +                    {
      +                      "type": "null"
      +                    }
      +                  ]
      +                },
      +                "username": {
      +                  "type": "string"
      +                },
      +                "username_geo_hint": {
      +                  "type": "string"
      +                }
      +              },
      +              "required": [
      +                "host",
      +                "port",
      +                "protocol",
      +                "username",
      +                "password"
      +              ],
      +              "type": "object"
      +            },
      +            {
      +              "type": "null"
      +            }
      +          ]
      +        },
      +        "id": {
      +          "type": "string"
      +        },
      +        "lists": {
      +          "items": {
      +            "additionalProperties": {},
      +            "properties": {
      +              "activation_note": {
      +                "type": "string"
      +              },
      +              "city": {
      +                "type": [
      +                  "string",
      +                  "null"
      +                ]
      +              },
      +              "countries": {
      +                "anyOf": [
      +                  {
      +                    "items": {
      +                      "type": "string"
      +                    },
      +                    "type": "array"
      +                  },
      +                  {
      +                    "type": "null"
      +                  }
      +                ]
      +              },
      +              "country": {
      +                "type": [
      +                  "string",
      +                  "null"
      +                ]
      +              },
      +              "created_at": {
      +                "type": "string"
      +              },
      +              "credentials": {
      +                "anyOf": [
      +                  {
      +                    "additionalProperties": {},
      +                    "properties": {
      +                      "host": {
      +                        "type": "string"
      +                      },
      +                      "password": {
      +                        "type": "string"
      +                      },
      +                      "port": {
      +                        "maximum": 9007199254740991,
      +                        "minimum": -9007199254740991,
      +                        "type": "integer"
      +                      },
      +                      "protocol": {
      +                        "type": "string"
      +                      },
      +                      "username": {
      +                        "type": "string"
      +                      }
      +                    },
      +                    "required": [
      +                      "host",
      +                      "port",
      +                      "protocol",
      +                      "username",
      +                      "password"
      +                    ],
      +                    "type": "object"
      +                  },
      +                  {
      +                    "type": "null"
      +                  }
      +                ]
      +              },
      +              "entries": {
      +                "items": {
      +                  "type": "string"
      +                },
      +                "type": "array"
      +              },
      +              "format": {
      +                "type": "string"
      +              },
      +              "id": {
      +                "type": "string"
      +              },
      +              "isp": {
      +                "type": [
      +                  "string",
      +                  "null"
      +                ]
      +              },
      +              "name": {
      +                "type": "string"
      +              },
      +              "network": {
      +                "type": [
      +                  "string",
      +                  "null"
      +                ]
      +              },
      +              "proxy_id": {
      +                "type": "string"
      +              },
      +              "region": {
      +                "type": [
      +                  "string",
      +                  "null"
      +                ]
      +              },
      +              "rotation_mode": {
      +                "type": "string"
      +              },
      +              "rotation_period_seconds": {
      +                "maximum": 9007199254740991,
      +                "minimum": -9007199254740991,
      +                "type": "integer"
      +              },
      +              "zip": {
      +                "type": [
      +                  "string",
      +                  "null"
      +                ]
      +              }
      +            },
      +            "required": [
      +              "id",
      +              "proxy_id",
      +              "name",
      +              "rotation_period_seconds",
      +              "rotation_mode",
      +              "format",
      +              "credentials",
      +              "entries",
      +              "activation_note",
      +              "created_at"
      +            ],
      +            "type": "object"
      +          },
      +          "type": "array"
      +        },
      +        "next_renewal_price_cents": {
      +          "anyOf": [
      +            {
      +              "maximum": 9007199254740991,
      +              "minimum": -9007199254740991,
      +              "type": "integer"
      +            },
      +            {
      +              "type": "null"
      +            }
      +          ]
      +        },
      +        "plan_id": {
      +          "type": [
      +            "string",
      +            "null"
      +          ]
      +        },
      +        "rotation_url": {
      +          "type": [
      +            "string",
      +            "null"
      +          ]
      +        },
      +        "status": {
      +          "enum": [
      +            "provisioning",
      +            "active",
      +            "expired",
      +            "refunded",
      +            "exhausted"
      +          ],
      +          "type": "string"
      +        },
      +        "type": {
      +          "enum": [
      +            "shared",
      +            "dedicated_standard",
      +            "dedicated_premium"
      +          ],
      +          "type": "string"
      +        }
      +      },
      +      "required": [
      +        "id",
      +        "status",
      +        "data_gb_total",
      +        "data_bytes_used",
      +        "charged_price_cents",
      +        "expires_at",
      +        "gateway",
      +        "lists"
      +      ],
      +      "type": "object"
      +    }
      +  },
      +  "required": [
      +    "proxy"
      +  ],
      +  "type": "object"
      +}
  3. Changed2 schema fields changedv1.1.8
    • addedInput schema / properties / plan_id / description
      Added value: +"plan_... id from search_proxies"
    • addedInput schema / properties / plan_id / pattern
      Added value: +"^(?:plan_[A-Za-z0-9_-]{1,64})$"
  4. First observedv1.1.3

TDQS

A4.5/5.0
Behavior5/5

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

Annotations already flag destructive, openWorld, and non-idempotent, and the description goes further: immediate balance charge, price-protection semantics, automatic refund if provisioning fails, and concrete activation timings per proxy type. It also explains the approval gate that prevents accidental overcharge, which is exactly the context an agent needs before a destructive purchase.

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?

Five sentences, each carrying a distinct operational fact: charge timing, required price guard, activation latency, refund fallback, and next polling step. The most consequential facts (immediate charge, price guard) are front-loaded.

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 destructive purchase tool with an output schema, this covers everything an agent needs: precondition (approved price from search_proxies), failure modes (price change, provisioning failure), timing expectations, and the follow-up call. No important gap remains.

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 both parameter descriptions already explain plan_id provenance and the max_price_cents approval/price-changed behavior, so the description mostly restates the schema. It reinforces the re-confirm workflow, but adds little parametric detail beyond what the structured fields provide.

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?

"Buy a proxy plan from search_proxies, charged to your balance immediately" gives a specific verb (buy), resource (proxy plan), source of the plan, and the payment implication. It is clearly distinguishable from sibling tools like renew_proxy or topup_proxy which operate on existing proxies.

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?

The description names the upstream step (search_proxies) and the downstream step (poll get_proxy_status until status='active'), which is strong sequencing guidance. It does not explicitly exclude renew_proxy or topup_proxy, so an agent must infer that this is only for new purchases rather than renewals.

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