Skip to main content
Glama
anjor

Coinmarket

get_currency_listings

Fetch up-to-date cryptocurrency listings from the Coinmarket API. Use this tool to retrieve comprehensive data on available digital currencies for analysis or integration.

Instructions

Get latest cryptocurrency listings

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Core handler function that fetches the latest cryptocurrency listings from the CoinMarketCap API, limited to 5 entries in USD.
    async def get_currency_listings() -> dict[str, Any]:
        url = 'https://pro-api.coinmarketcap.com/v1/cryptocurrency/listings/latest'
        parameters = {
          'start':'1',
          'limit':'5',
          'convert':'USD'
        }
        headers = {
          'Accepts': 'application/json',
          'X-CMC_PRO_API_KEY': API_KEY,
        }
    
        response = requests.get(url, headers=headers, params=parameters)
        response.raise_for_status()
        data = json.loads(response.text)
        return data
  • Registration of the 'get_currency_listings' tool in the list_tools handler, including name, description, and empty input schema.
    types.Tool(
        name="get_currency_listings",
        description="Get latest cryptocurrency listings",
        inputSchema={
            "type": "object",
            "properties": {},
            "required": [],
        },
    ),
  • Tool execution handler within @server.call_tool() that invokes get_currency_listings and returns the JSON-formatted result as TextContent.
    case "get_currency_listings":
        try:
            data = await get_currency_listings()
            return [
                types.TextContent(
                    type="text",
                    text=json.dumps(data, indent=2),
                )
            ]
        except Exception as e:
            raise RuntimeError(f"Failed to fetch data: {e}")
  • Input schema definition for the get_currency_listings tool: an empty object with no required properties.
    inputSchema={
        "type": "object",
        "properties": {},
        "required": [],
    },
Behavior2/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 states what the tool does but doesn't reveal any behavioral traits such as rate limits, authentication needs, data freshness, or response format. This is a significant gap for a tool with zero annotation coverage.

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 a single, efficient sentence with no wasted words. It's front-loaded with the core purpose, making it easy to parse and understand quickly, which is ideal for conciseness.

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

Completeness2/5

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

Given the lack of annotations and output schema, the description is incomplete. It doesn't explain what 'latest' means (e.g., real-time, delayed), the scope of listings (e.g., all cryptocurrencies, top 100), or the return format, leaving gaps in understanding the tool's behavior and output.

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 tool has 0 parameters with 100% schema description coverage, so the schema fully documents the input requirements. The description doesn't need to add parameter details, and it appropriately doesn't mention any, earning a baseline score of 4 for this context.

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 action ('Get') and resource ('latest cryptocurrency listings'), providing a specific verb+resource combination. However, it doesn't differentiate from the sibling tool 'get_quotes', which might also retrieve cryptocurrency data, so it doesn't fully distinguish 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 Guidelines2/5

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

No guidance is provided on when to use this tool versus the sibling 'get_quotes' or other alternatives. The description lacks context about use cases, prerequisites, or exclusions, leaving the agent without clear direction on tool selection.

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

Related 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/anjor/coinmarket-mcp-server'

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