Skip to main content
Glama
justlend

mcp-server-justlend

Official
by justlend

estimate_lending_energy

Read-onlyIdempotent

Estimate required energy, bandwidth, and TRX fees for any JustLend lending operation—supply, borrow, repay, and more—before executing. Simulates on-chain, with automatic fallback to historical averages.

Instructions

Estimate energy, bandwidth, and TRX cost for any JustLend operation BEFORE executing it. Covers ALL operations: supply, withdraw, withdraw_all, borrow, repay, approve, enter_market, exit_market, claim_rewards. Tries on-chain simulation first; falls back to historical typical values if simulation fails. Returns per-step breakdown (e.g. approve + mint for supply), total energy, total bandwidth, and estimated TRX cost. For supply/repay: automatically checks current allowance — if sufficient, the approve step is skipped. For approve: supports custom spender address (not just jToken). Use this tool whenever the user asks about gas/energy/cost for any lending operation.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
amountNoAmount in underlying token units (e.g. '100'). Default: '1'. Not needed for enter_market, exit_market, approve, withdraw_all, claim_rewards.
marketYesjToken symbol (e.g. 'jUSDT', 'jTRX', 'jUSDD'). Required for all operations except claim_rewards.
addressNoTRON address for simulation. Default: configured wallet
networkNoNetwork. Default: mainnet
spenderNoCustom spender address for approve operation. Default: jToken contract address. Only used when operation is 'approve'.
operationYesThe operation to estimate resources for
Behavior5/5

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

Beyond annotations (readOnlyHint, idempotentHint, destructiveHint), the description adds crucial behavior: 'Tries on-chain simulation first; falls back to historical typical values if simulation fails.', 'Returns per-step breakdown...', and 'For supply/repay: automatically checks current allowance — if sufficient, the approve step is skipped.' This provides transparency about reliability and edge cases.

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?

The description is front-loaded with purpose and well-structured. It lists operations in a sentence and explains fallback, breakdown, and special cases. It is slightly long but each sentence adds value; a minor trim could improve conciseness 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?

Despite no output schema, the description explains the return value: per-step breakdown, total energy, total bandwidth, estimated TRX cost. It covers all operations, fallback behavior, and handle edge cases (allowance check, custom spender). This is complete for an estimation tool.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

All 6 parameters have schema descriptions (100% coverage). The description adds significant meaning: explains default amount ('1'), clarifies spender usage for approve, and notes which operations omit amount (enter_market, withdraw_all, etc.). This enriches understanding beyond schema.

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 tool estimates energy, bandwidth, and TRX cost for any JustLend operation before execution. It lists all covered operations (supply, withdraw, etc.) and implies it is for estimation, not execution. This is specific and distinguishes from siblings like estimate_moolah_energy.

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 tells when to use: 'whenever the user asks about gas/energy/cost for any lending operation'. It also says 'BEFORE executing' which implies it is not for after the fact. While it does not explicitly state when not to use, the context and fallback behavior are clear. Could be more explicit about alternatives.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/justlend/mcp-server-justlend'

If you have feedback or need assistance with the MCP directory API, please join our Discord server