Skip to main content
Glama

get_token_price

Fetch USD prices for tokens and native assets on supported chains using DefiLlama data, ideal for quick price lookups without wallet simulation.

Instructions

Fetch the USD price of a token via DefiLlama. Pass token: "native" for the chain's native asset (ETH on ethereum/arbitrum, MATIC on polygon) or an ERC-20 contract address. Prefer this over get_swap_quote for pure price lookups — no wallet or liquidity simulation needed.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
chainYes
tokenYes
Behavior3/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It mentions the data source ('via DefiLlama') and that it doesn't require wallet or liquidity simulation, which adds useful context. However, it doesn't cover potential rate limits, error conditions, or response format details, leaving some behavioral aspects unclear.

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 efficiently structured in two sentences with zero waste. The first sentence explains the core functionality and parameter usage, while the second provides clear usage guidelines. Every word serves a purpose, making it appropriately concise and well-organized.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's moderate complexity (2 parameters, no output schema, no annotations), the description covers the essential purpose, usage context, and parameter semantics adequately. However, it lacks details about the return format (e.g., price precision, timestamp) and potential limitations, which would be helpful for a price-fetching tool.

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?

The schema description coverage is 0%, so the description must compensate. It provides crucial semantic information for the 'token' parameter, explaining that 'native' refers to the chain's native asset with specific examples (ETH, MATIC) and that other values should be ERC-20 contract addresses. This adds significant meaning beyond the schema's technical constraints.

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 ('fetch the USD price of a token') and resources ('via DefiLlama'), and distinguishes it from the sibling tool get_swap_quote by emphasizing it's for 'pure price lookups.' This provides clear differentiation from alternatives.

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 explicitly provides usage guidance by stating when to use this tool ('prefer this over get_swap_quote for pure price lookups') and when not to ('no wallet or liquidity simulation needed'). It names the alternative tool and clarifies the appropriate context, offering complete guidance.

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/szhygulin/vaultpilot-mcp'

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