Skip to main content
Glama

Estimate Buy Resource

tronsave_estimate_buy_resource
Read-onlyIdempotent

Quote price and availability for buying ENERGY or BANDWIDTH for a receiver address before placing an order. This quote feeds tronsave_create_order; for tronsave_internal_order_create (API key) quote with tronsave_internal_order_estimate. Returns { unitPrice (SUN/unit), durationSec, estimateTrx (total cost in SUN), availableResource, systemDepositAddress } — map them to tronsave_create_order as orderUnitPrice, orderDurationSec, paymentPaymentAmount. Defaults: ENERGY, 100000 units (1000 for BANDWIDTH), 900 s. Read-only and safe to call repeatedly; no session is required, but backend rate limits apply. For order-book depth use tronsave_list_order_books; for the minimum unit price only use tronsave_get_min_price.

Input Schema

NameRequiredDescriptionDefault
receiverNoTRON address that will receive the resource. Strongly recommended: quotes depend on it.
unitPriceNoDesired unit price in SUN. Values below the market minimum are raised to the minimum. Omit for the MEDIUM market price.
durationSecNoDelegation duration in seconds. Default 900 (15 minutes).
resourceTypeNoResource type to buy. Default ENERGY.ENERGY
allowPartialFillNoAllow partial fill of the order.
buyResourceAmountNoResource units to buy. Default 100000 for ENERGY and 1000 for BANDWIDTH.
minResourceDelegateRequiredAmountNoMinimum resource amount per matching provider.

Output Schema

NameRequiredDescriptionDefault
unitPriceNoQuoted unit price in SUN per resource unit → `orderUnitPrice`.
durationSecNoDelegation duration in seconds → `orderDurationSec`.
estimateTrxNoEstimated total cost in SUN (despite the name; TRX = value / 1e6) → `paymentPaymentAmount`.
availableResourceNoResource units currently available at this price; if lower than requested, the order may fill partially.
systemDepositAddressNoTronSave deposit address; destination of the signed TRX transfer for `paymentMethod=onchain`.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed32 schema fields changed
    • changedInput schema / properties / buyResourceAmount / description
      Previous value: -"Amount of resource to buy. Default 100000 for ENERGY and 1000 for BANDWIDTH"New value: +"Resource units to buy. Default 100000 for ENERGY and 1000 for BANDWIDTH."
    • addedInput schema / properties / buyResourceAmount / exclusiveMinimum
      Added value: +0
    • addedInput schema / properties / buyResourceAmount / maximum
      Added value: +9007199254740991
    • changedInput schema / properties / buyResourceAmount / type
      Previous value: -"number"New value: +"integer"
    • changedInput schema / properties / durationSec / description
      Previous value: -"Duration of the order in seconds. Default 15 minutes"New value: +"Delegation duration in seconds. Default 900 (15 minutes)."
    • addedInput schema / properties / durationSec / exclusiveMinimum
      Added value: +0
    • addedInput schema / properties / durationSec / maximum
      Added value: +9007199254740991
    • changedInput schema / properties / durationSec / type
      Previous value: -"number"New value: +"integer"
    • changedInput schema / properties / minResourceDelegateRequiredAmount / description
      Previous value: -"Minimum amount of resource to delegate."New value: +"Minimum resource amount per matching provider."
    • addedInput schema / properties / minResourceDelegateRequiredAmount / minimum
      Added value: +0
    • changedInput schema / properties / receiver / description
      Previous value: -"receiver address."New value: +"TRON address that will receive the resource. Strongly recommended: quotes depend on it."
    • addedInput schema / properties / receiver / pattern
      Added value: +"^T[1-9A-HJ-NP-Za-km-z]{33}$"
    • changedInput schema / properties / resourceType / description
      Previous value: -"Resource type to buy. Default ENERGY"New value: +"Resource type to buy. Default ENERGY."
    • changedInput schema / properties / unitPrice / description
      Previous value: -"Unit price in SUN."New value: +"Desired unit price in SUN. Values below the market minimum are raised to the minimum. Omit for the MEDIUM market price."
    • addedInput schema / properties / unitPrice / exclusiveMinimum
      Added value: +0
    • changedOutput schema / additionalProperties
      Previous value: -falseNew value: +{}
    • addedOutput schema / properties / availableResource / anyOf
      Added value: +[
      +  {
      +    "description": "Resource units currently available at this price; if lower than requested, the order may fill partially.",
      +    "type": "number"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • changedOutput schema / properties / availableResource / description
      Previous value: -"Available resource amount"New value: +"Resource units currently available at this price; if lower than requested, the order may fill partially."
    • removedOutput schema / properties / availableResource / type
      Removed value: -"number"
    • addedOutput schema / properties / durationSec / anyOf
      Added value: +[
      +  {
      +    "description": "Delegation duration in seconds → `orderDurationSec`.",
      +    "type": "number"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • changedOutput schema / properties / durationSec / description
      Previous value: -"Delegated duration in seconds"New value: +"Delegation duration in seconds → `orderDurationSec`."
    • removedOutput schema / properties / durationSec / type
      Removed value: -"number"
    • addedOutput schema / properties / estimateTrx / anyOf
      Added value: +[
      +  {
      +    "description": "Estimated total cost in SUN (despite the name; TRX = value / 1e6) → `paymentPaymentAmount`.",
      +    "type": "number"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • changedOutput schema / properties / estimateTrx / description
      Previous value: -"Estimated TRX cost in SUN"New value: +"Estimated total cost in SUN (despite the name; TRX = value / 1e6) → `paymentPaymentAmount`."
    • removedOutput schema / properties / estimateTrx / type
      Removed value: -"number"
    • addedOutput schema / properties / systemDepositAddress / anyOf
      Added value: +[
      +  {
      +    "description": "TronSave deposit address; destination of the signed TRX transfer for `paymentMethod=onchain`.",
      +    "type": "string"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • changedOutput schema / properties / systemDepositAddress / description
      Previous value: -"System deposit address for onchain payment"New value: +"TronSave deposit address; destination of the signed TRX transfer for `paymentMethod=onchain`."
    • removedOutput schema / properties / systemDepositAddress / type
      Removed value: -"string"
    • addedOutput schema / properties / unitPrice / anyOf
      Added value: +[
      +  {
      +    "description": "Quoted unit price in SUN per resource unit → `orderUnitPrice`.",
      +    "type": "number"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • changedOutput schema / properties / unitPrice / description
      Previous value: -"Unit price in SUN"New value: +"Quoted unit price in SUN per resource unit → `orderUnitPrice`."
    • removedOutput schema / properties / unitPrice / type
      Removed value: -"number"
    • removedOutput schema / required
      Removed value: -[
      -  "systemDepositAddress",
      -  "unitPrice",
      -  "durationSec",
      -  "estimateTrx",
      -  "availableResource"
      -]
  2. Changed3 schema fields changed
    • changedInput schema / properties / buyResourceAmount / description
      Previous value: -"Amount of resource to buy."New value: +"Amount of resource to buy. Default 100000 for ENERGY and 1000 for BANDWIDTH"
    • changedInput schema / properties / durationSec / description
      Previous value: -"Duration of the order in seconds. Default 3 days"New value: +"Duration of the order in seconds. Default 15 minutes"
    • removedInput schema / required
      Removed value: -[
      -  "buyResourceAmount"
      -]
  3. Changed2 schema fields changed
    • addedOutput schema / properties / systemDepositAddress
      Added value: +{
      +  "description": "System deposit address for onchain payment",
      +  "type": "string"
      +}
    • changedOutput schema / required
      Previous value: -[
      -  "unitPrice",
      -  "durationSec",
      -  "estimateTrx",
      -  "availableResource"
      -]New value: +[
      +  "systemDepositAddress",
      +  "unitPrice",
      +  "durationSec",
      +  "estimateTrx",
      +  "availableResource"
      +]
  4. Changed1 schema field changed
    • changedInput schema / properties / unitPrice / description
      Previous value: -"Unit price of the resource to buy."New value: +"Unit price in SUN."
  5. Changed19 schema fields changed
    • addedInput schema / properties / allowPartialFill / description
      Added value: +"Allow partial fill of the order."
    • addedInput schema / properties / buyResourceAmount / description
      Added value: +"Amount of resource to buy."
    • removedInput schema / properties / buyResourceAmount / exclusiveMinimum
      Removed value: -0
    • addedInput schema / properties / durationSec / description
      Added value: +"Duration of the order in seconds. Default 3 days"
    • removedInput schema / properties / durationSec / exclusiveMinimum
      Removed value: -0
    • changedInput schema / properties / minResourceDelegateRequiredAmount / description
      Previous value: -"Optional floor for partial-fill matching (GraphQL Float)."New value: +"Minimum amount of resource to delegate."
    • addedInput schema / properties / receiver / description
      Added value: +"receiver address."
    • removedInput schema / properties / receiver / minLength
      Removed value: -1
    • addedInput schema / properties / resourceType
      Added value: +{
      +  "default": "ENERGY",
      +  "description": "Resource type to buy. Default ENERGY",
      +  "enum": [
      +    "ENERGY",
      +    "BANDWIDTH"
      +  ],
      +  "type": "string"
      +}
    • addedInput schema / properties / unitPrice / description
      Added value: +"Unit price of the resource to buy."
    • removedInput schema / properties / unitPrice / exclusiveMinimum
      Removed value: -0
    • changedInput schema / required
      Previous value: -[
      -  "receiver",
      -  "buyResourceAmount",
      -  "unitPrice",
      -  "durationSec",
      -  "allowPartialFill"
      -]New value: +[
      +  "buyResourceAmount"
      +]
    • addedOutput schema / properties / availableResource
      Added value: +{
      +  "description": "Available resource amount",
      +  "type": "number"
      +}
    • addedOutput schema / properties / durationSec
      Added value: +{
      +  "description": "Delegated duration in seconds",
      +  "type": "number"
      +}
    • removedOutput schema / properties / estimate
      Removed value: -{
      -  "additionalProperties": false,
      -  "properties": {
      -    "availableResource": {
      -      "type": "number"
      -    },
      -    "buyResourcePrice": {
      -      "type": "number"
      -    },
      -    "discountPercent": {
      -      "type": "number"
      -    },
      -    "maxAvailableResource": {
      -      "type": "number"
      -    },
      -    "minResourcePrice": {
      -      "type": "number"
      -    },
      -    "totalEstimateResource": {
      -      "type": "number"
      -    }
      -  },
      -  "required": [
      -    "totalEstimateResource",
      -    "availableResource",
      -    "maxAvailableResource",
      -    "discountPercent",
      -    "buyResourcePrice",
      -    "minResourcePrice"
      -  ],
      -  "type": "object"
      -}
    • addedOutput schema / properties / estimateTrx
      Added value: +{
      +  "description": "Estimated TRX cost in SUN",
      +  "type": "number"
      +}
    • removedOutput schema / properties / systemDepositAddress
      Removed value: -{
      -  "minLength": 1,
      -  "type": "string"
      -}
    • addedOutput schema / properties / unitPrice
      Added value: +{
      +  "description": "Unit price in SUN",
      +  "type": "number"
      +}
    • changedOutput schema / required
      Previous value: -[
      -  "estimate",
      -  "systemDepositAddress"
      -]New value: +[
      +  "unitPrice",
      +  "durationSec",
      +  "estimateTrx",
      +  "availableResource"
      +]
  6. First observed

TDQS

A4.8/5.0
Behavior5/5

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

Annotations already declare readOnly, idempotent, and openWorld, and the description adds genuinely new behavior: no session required, backend rate limits apply, safe to call repeatedly, and which returned fields map to which tronsave_create_order parameters. That mapping is actionable context not present in any structured field.

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?

Front-loaded with the verb and purpose, then the downstream mapping, then defaults, then sibling routing — a sensible order with no filler sentences. It is dense as a single block and the return-shape and alternative-tool clauses could be split for scanability, but nothing is wasted.

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 read-only quote tool with an output schema, full parameter coverage, and rich annotations, the description covers purpose, defaults, output semantics, follow-up call, and alternatives. An agent has everything needed to call it correctly and use the result.

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 description coverage is 100%, so the baseline is 3; the description still adds value by summarizing the default combinations (ENERGY/100000 units/900 s, BANDWIDTH/1000) and, more importantly, by explaining how the quote's outputs become create_order inputs. It does not add much on the less obvious params like allowPartialFill or minResourceDelegateRequiredAmount beyond what the schema says.

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 and resource: quoting price and availability for buying ENERGY or BANDWIDTH for a receiver address, explicitly positioned as a pre-order step. It also names the exact siblings it is not (tronsave_internal_order_estimate for API-key orders), so an agent can distinguish it immediately.

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 explicit routing rules: use this quote to feed tronsave_create_order, use tronsave_internal_order_estimate for internal orders, tronsave_list_order_books for order-book depth, and tronsave_get_min_price for minimum price only. Defaults for resourceType, amount, and duration are restated so an agent can call with zero arguments.

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.

Resources