Skip to main content
Glama
danteriva45-hub

DeFi Intelligence Engine

get_optimal_allocation

Optimize capital split across multiple DeFi protocols to maximize risk-adjusted yield, respecting TVL constraints and risk limits.

Instructions

Split capital optimally across multiple DeFi protocols for maximum risk-adjusted yield.

Unlike get_best_yield (one protocol), this tool returns a weighted multi-protocol allocation that maximizes APY while respecting TVL constraints and risk limits. Ideal for amounts >$10,000 where diversification improves risk-adjusted returns.

Use this when: an agent needs to deploy capital across multiple protocols. Do NOT use for: single-protocol analysis (use get_best_yield or explain_risk).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
assetYesToken to allocate. Examples: 'USDC', 'USDT', 'ETH', 'DAI'
total_amount_usdYesTotal capital to deploy in USD. Example: 100000
risk_profileNo'safe' (score>=75), 'moderate' (>=55), 'max_yield' (>=35)moderate
max_protocolsNoMaximum number of protocols to split across (2-5). Default: 3
chainsNoChains to consider. Default: ['Ethereum','Arbitrum','Base']. Pass ['all'] for all chains.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior4/5

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

With no annotations, the description bears full burden. It discloses that the tool 'returns a weighted multi-protocol allocation' that 'maximizes APY while respecting TVL constraints and risk limits.' It does not explicitly state read-only nature, but the description implies a computational/planning role. Missing explicit read/write disclosure but still informative.

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?

The description is succinct (two short paragraphs plus a guidance line). It is front-loaded with the core purpose, then differentiates, then provides usage rules. Every sentence adds value without redundancy.

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?

Given the tool's complexity (5 parameters, output schema, sibling tools), the description covers purpose, differentiation, usage guidelines, and behavioral constraints. It does not explain the output format, but the output schema exists to handle that. It could mention what happens if risk_profile is out of bounds, but overall it is complete.

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 context beyond parameter descriptions: 'respecting TVL constraints and risk limits' relates to risk_profile and max_protocols; 'diversification' connects to max_protocols; 'amounts >$10,000' adds practical use guidance for total_amount_usd.

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's purpose: 'Split capital optimally across multiple DeFi protocols for maximum risk-adjusted yield.' It uses a specific verb and resource, and explicitly differentiates from the sibling tool 'get_best_yield' by noting it handles multi-protocol allocations.

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?

The description provides explicit when-to-use ('an agent needs to deploy capital across multiple protocols') and when-not-to-use ('single-protocol analysis') with alternative tool names ('get_best_yield or explain_risk'). It also adds a threshold recommendation ('amounts >$10,000').

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/danteriva45-hub/defi-yield-engine'

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