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. Returns estimated unitPrice (SUN per resource unit), paymentAmount, and availability fields used to populate tronsave_create_order inputs (orderUnitPrice, paymentPaymentAmount). Read-only and safe to call repeatedly; no session is required, but backend rate limits apply. FRESHNESS: this is live market data — unitPrice/availability can change roughly every 3 seconds (one TRON block). Re-run this estimate immediately before tronsave_create_order and never reuse a quote more than a few seconds old. For order-book depth use tronsave_list_order_books; for the minimum unit price only use tronsave_get_min_price.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
receiverNoreceiver address.
unitPriceNoUnit price in SUN.
durationSecNoDuration of the order in seconds. Default 15 minutes
resourceTypeNoResource type to buy. Default ENERGYENERGY
allowPartialFillNoAllow partial fill of the order.
buyResourceAmountNoAmount of resource to buy. Default 100000 for ENERGY and 1000 for BANDWIDTH
minResourceDelegateRequiredAmountNoMinimum amount of resource to delegate.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
unitPriceYesUnit price in SUN
durationSecYesDelegated duration in seconds
estimateTrxYesEstimated TRX cost in SUN
availableResourceYesAvailable resource amount
systemDepositAddressYesSystem deposit address for onchain payment

Schema Changelog

Changes observed during successful MCP inspections.

  1. 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"
      -]
  2. 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"
      +]
  3. Changed1 schema field changed
    • changedInput schema / properties / unitPrice / description
      Previous value: -"Unit price of the resource to buy."New value: +"Unit price in SUN."
  4. 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"
      +]
  5. First observed

TDQS

A4.8/5.0
Behavior5/5

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

Annotations already provide readOnlyHint, idempotentHint, openWorldHint. The description adds beyond: 'no session is required', 'backend rate limits apply', and data freshness of approximately 3 seconds. No contradictions with annotations.

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?

At about 100 words, it is concise. All sentences add value: purpose, freshness warning, sibling differentiation. Slight redundancy with annotations is acceptable. Front-loaded with main action.

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?

With 7 parameters (no required), many siblings, and an output schema, the description covers purpose, usage context, data freshness, rate limits, and parameter-output linkages. No gaps remain for an agent to understand correct invocation.

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 baseline is 3. The description adds meaning by linking output fields to `tronsave_create_order` inputs and providing default values for `durationSec`, `resourceType`, and `buyResourceAmount`. This contextualizes parameters beyond the schema alone.

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 description clearly states the verb 'Quote', the resource 'ENERGY or BANDWIDTH', and the receiver address. It distinguishes the tool from siblings by naming `tronsave_list_order_books` and `tronsave_get_min_price` as alternatives for different needs.

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 usage guidance: use before `tronsave_create_order`, do not reuse estimates older than a few seconds, re-run immediately before ordering. Alternatives are named for depth and minimum price queries.

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