Skip to main content
Glama

calculate_token_conversion

Calculate token conversion quotes between two cryptocurrencies to determine current market prices for trading or portfolio analysis.

Instructions

Perform token conversion quote between two tokens. Good for quickly calculating market prices.

Expects a ConversionRequestContainer, returns a list of ConversionResponse.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
conversion_requestsYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • Handler function for the 'calculate_token_conversion' MCP tool. Registered via @mcp.tool() decorator. Performs token conversion quotes by calling the Armor API client's conversion_api method.
    @mcp.tool()
    async def calculate_token_conversion(conversion_requests: ConversionRequestContainer) -> List[ConversionResponse]:
        """
        Perform token conversion quote between two tokens. Good for quickly calculating market prices.
        
        Expects a ConversionRequestContainer, returns a list of ConversionResponse.
        """
        if not armor_client:
            return [{"error": "Not logged in"}]
        try:
            result: List[ConversionResponse] = await armor_client.conversion_api(conversion_requests)
            return result
        except Exception as e:
            return [{"error": str(e)}]
Behavior2/5

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

No annotations are provided, so the description carries full burden. It mentions 'quickly calculating market prices' which implies read-only, non-destructive behavior, but does not disclose critical traits like rate limits, authentication needs, error handling, or whether it's a simulation vs. actual transaction. For a financial tool with zero annotation coverage, this leaves significant behavioral gaps.

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 appropriately sized with three sentences that are front-loaded: the first states the purpose, the second adds context, and the third covers input/output. There is no wasted text, though it could be slightly more structured (e.g., bullet points for parameters). Overall, it's efficient and easy to parse.

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 1 parameter with 0% schema coverage, no annotations, and an output schema exists (so return values are documented), the description is incomplete. It covers the basic purpose and input/output types but lacks parameter details, behavioral context, and usage guidelines. For a tool in a financial context with siblings, this is minimally adequate but has clear gaps.

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

Parameters2/5

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

Schema description coverage is 0%, so the description must compensate. It states 'Expects a ConversionRequestContainer' but does not explain what this contains (e.g., token pairs, amounts) or provide examples. With 1 undocumented parameter, the description adds minimal semantic value beyond naming the container, failing to clarify parameter meaning or usage.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/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: 'Perform token conversion quote between two tokens' specifies the verb (perform conversion quote) and resource (tokens). It distinguishes from siblings like 'swap_quote' by focusing on conversion rather than swapping, though the distinction could be more explicit. The addition 'Good for quickly calculating market prices' reinforces the use case.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. It mentions 'quickly calculating market prices' but does not specify scenarios, prerequisites, or exclusions compared to siblings like 'swap_quote' or 'stake_quote'. Without explicit when/when-not instructions, the agent lacks clear usage context.

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/emmaThompson07/armor-crypto-mcp'

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