Skip to main content
Glama

get_defi_by_protocol

Read-onlyIdempotent

Analyze wallet exposure to a specific DeFi protocol across all chains for risk assessment and yield optimization.

Instructions

Get DeFi positions for a wallet filtered by a specific protocol across all chains. Provides detailed analysis of exposure to a particular DeFi protocol for risk assessment and yield optimization.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
walletYesEthereum wallet address (42-character hex string starting with 0x) to get DeFi positions for
protocolYesDeFi protocol to filter by. Examples: 'uniswap', 'aave', 'compound', 'makerdao', 'curve', 'balancer', 'sushiswap', 'quickswap', 'traderjoe', 'pancakeswap'
Behavior4/5

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

Annotations already indicate read-only, non-destructive, idempotent, and open-world behavior. The description adds valuable context beyond annotations by specifying that it provides 'detailed analysis of exposure' and works 'across all chains', which helps the agent understand the tool's scope and output nature. No contradictions with annotations are present.

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 front-loaded with the core functionality in the first sentence and uses a second sentence to explain the purpose without redundancy. Every sentence adds value (filtering details and use cases), and there is no wasted text, making it efficient and well-structured.

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 (multi-chain DeFi analysis), annotations cover safety and behavior well, and the schema fully describes parameters. However, the lack of an output schema means the description could benefit from more details on return values (e.g., types of positions, metrics provided). It adequately covers the tool's purpose and usage but leaves output specifics ambiguous.

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 description coverage is 100%, with clear descriptions for both parameters (wallet and protocol). The description adds some semantic context by mentioning 'filtered by a specific protocol' and 'for a wallet', but does not provide additional details beyond what the schema already covers, such as specific protocol examples or wallet format nuances. Baseline 3 is appropriate given high schema coverage.

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 with specific verbs ('Get DeFi positions', 'filtered by a specific protocol across all chains') and distinguishes it from siblings by emphasizing protocol-specific filtering rather than chain-based or comprehensive position retrieval. It explicitly mentions the resource (DeFi positions) and scope (wallet, protocol, all chains).

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 provides clear context for usage ('for risk assessment and yield optimization') and implies when to use this tool (when focusing on a specific protocol across chains). However, it does not explicitly state when not to use it or name alternatives among the sibling tools, such as 'get_all_defi_positions' for unfiltered results or 'get_defi_by_chain' for chain-specific filtering.

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/Datai-Network/datai-mcp-server'

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