Skip to main content
Glama
ymylive
by ymylive

get_global_defi

Get global DeFi market overview: total market cap, DeFi-to-Eth ratio, top coin share, and 24h trading volume.

Instructions

Get global DeFi market stats: total DeFi market cap, DeFi-to-Eth ratio, top DeFi coin by share.

For protocol-level TVL or chain-level breakdowns, use get_protocol_tvl or list_chains_tvl (DefiLlama) instead — they're much more granular.

Returns: Object with data containing defi_market_cap, eth_market_cap, defi_to_eth_ratio, trading_volume_24h, defi_dominance, top_coin_name, top_coin_defi_dominance.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The `get_global_defi` tool handler function. Decorated with @mcp.tool() on line 372, this async function calls CoinGecko's /global/decentralized_finance_defi endpoint and returns global DeFi market stats including total DeFi market cap, DeFi-to-Eth ratio, top DeFi coin by share, trading volume, and DeFi dominance.
    @mcp.tool()
    async def get_global_defi() -> Any:
        """Get global DeFi market stats: total DeFi market cap, DeFi-to-Eth ratio, top DeFi coin by share.
    
        For protocol-level TVL or chain-level breakdowns, use `get_protocol_tvl`
        or `list_chains_tvl` (DefiLlama) instead — they're much more granular.
    
        Returns:
            Object with `data` containing `defi_market_cap`, `eth_market_cap`,
            `defi_to_eth_ratio`, `trading_volume_24h`, `defi_dominance`,
            `top_coin_name`, `top_coin_defi_dominance`.
        """
        return await _cg_get("/global/decentralized_finance_defi")
  • coin_mcp/core.py:94-94 (registration)
    The tool is registered via @mcp.tool() decorator (line 372 of coingecko.py) on the FastMCP instance defined in core.py. The registration decorator is @mcp.tool() and the mcp instance is created at line 58 of core.py. Line 94 of core.py documents get_global_defi in the instruction table as 'DeFi TVL totals (high level, CoinGecko view)'.
    | DeFi TVL totals (high level, CoinGecko view) | get_global_defi |
  • The tool imports the `mcp` FastMCP instance from `coin_mcp.core` (line 7 of coingecko.py: `from .core import _bool_str, _cg_get, mcp`). The @mcp.tool() decorator on line 372 registers `get_global_defi` as an MCP tool.
    from .core import _bool_str, _cg_get, mcp
Behavior3/5

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

No annotations are provided, so the description carries the full burden. It discloses that the tool returns an object with specific fields, implying a read-only operation. However, it does not mention data freshness, authentication requirements, or any potential rate limits, leaving gaps in behavioral context.

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 mostly concise, with two paragraphs: purpose and return fields, then usage guidelines. It includes a separate 'Returns:' section that repeats some information, which is slightly redundant but enhances clarity. Overall, it is well-structured and informative.

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 no parameters, no output schema, and no annotations, the description covers the tool's purpose, return data, and usage context sufficiently. It distinguishes from siblings and lists all return fields, making it nearly complete for its simple nature.

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 input schema has zero parameters (100% coverage), so no parameter description is needed. The description adds value by listing return fields, which compensates for the lack of an output schema. Baseline for 0 params is 4.

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 retrieves global DeFi market stats, listing specific data points like total market cap, DeFi-to-Eth ratio, and top coin by share. The verb 'Get' and resource 'global DeFi market stats' are explicit, and it distinguishes from sibling tools by referencing alternatives for granular data.

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 guidance and names alternative tools (get_protocol_tvl and list_chains_tvl) for more granular protocol or chain-level breakdowns, helping an agent decide when not to use this tool.

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/ymylive/coin-mcp'

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