Skip to main content
Glama

crypto_price_history

Retrieve historical cryptocurrency price data for analysis by specifying a coin and time period.

Instructions

Get price history for a coin over a number of days

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
coinYesCoin ID (e.g. bitcoin)
daysNoNumber of days (1, 7, 30, 90, 365)

Implementation Reference

  • The `crypto_price_history` tool is implemented here, defining the input schema (coin, days) and executing the handler by fetching market data from CoinGecko and formatting the result.
    server.tool("crypto_price_history", "Get price history for a coin over a number of days", {
      coin: z.string().describe("Coin ID (e.g. bitcoin)"),
      days: z.number().default(7).describe("Number of days (1, 7, 30, 90, 365)")
    }, async ({ coin, days }) => {
      const data = await safeFetch(`https://api.coingecko.com/api/v3/coins/${coin}/market_chart?vs_currency=usd&days=${days}`);
      const prices = data.prices;
      const first = prices[0][1];
      const last = prices[prices.length - 1][1];
      const change = ((last - first) / first) * 100;
      const high = Math.max(...prices.map((p: any) => p[1]));
      const low = Math.min(...prices.map((p: any) => p[1]));
      return { content: [{ type: "text", text: `**${coin.toUpperCase()} — ${days}d History**\nStart: ${formatCurrency(first)}\nEnd: ${formatCurrency(last)}\nChange: ${formatPercent(change)}\nHigh: ${formatCurrency(high)}\nLow: ${formatCurrency(low)}\nData Points: ${prices.length}` }] };
    });
Behavior2/5

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

No annotations are present, so the description must carry full behavioral burden. It fails to disclose data source, return format (candles vs. closing prices), time granularity, or error behavior for invalid coin IDs. Only states what is retrieved, not how the tool behaves.

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?

Single sentence of nine words with no redundancy. Main action front-loaded. Efficient but arguably undersized given lack of output schema and behavioral details that should have been included.

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?

No output schema exists, yet description fails to document return values (price array format, timestamp structure, OHLCV vs. close-only). For a data retrieval tool with no output specification, this is a significant gap.

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 coverage is 100% with both 'coin' and 'days' well-documented in the schema (including valid examples for days). Since schema carries full semantic load, baseline 3 is appropriate. Description adds no parameter syntax beyond schema.

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 uses specific verb 'Get' with clear resource 'price history' and scope 'for a coin over a number of days'. However, it does not explicitly distinguish from sibling 'crypto_price' (current vs. historical data), so it lacks sibling differentiation that would earn a 5.

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?

Provides no guidance on when to use this tool versus alternatives like 'crypto_price' or 'crypto_market_overview'. No mention of prerequisites, rate limits, or data granularity requirements.

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/ElromEvedElElyon/claw-mcp-toolkit'

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