Skip to main content
Glama

crypto_price

Retrieve current cryptocurrency prices in USD to track market values and monitor portfolio performance.

Instructions

Get current cryptocurrency price ($0.001)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
coinNoCoin name (e.g. bitcoin, ethereum)bitcoin

Implementation Reference

  • index.js:40-40 (registration)
    The tool 'crypto_price' is defined in the TOOLS array with its endpoint, schema, and description.
    { name: 'crypto_price', description: 'Get current cryptocurrency price', inputSchema: { type: 'object', properties: { coin: { type: 'string', default: 'bitcoin', description: 'Coin name (e.g. bitcoin, ethereum)' } }, required: [] }, endpoint: '/crypto/price', price: '$0.001' },
  • index.js:94-115 (handler)
    The tool request handler dynamically dispatches to 'callTool' based on the tool definition.
    server.setRequestHandler(CallToolRequestSchema, async (request) => {
      const { name, arguments: args } = request.params;
      
      if (!API_KEY) {
        return {
          content: [{ type: 'text', text: 'Error: ITERATOOLS_API_KEY environment variable not set. Get a key at https://iteratools.com' }],
          isError: true,
        };
      }
      
      const tool = TOOLS.find(t => t.name === name);
      if (!tool) {
        return { content: [{ type: 'text', text: `Unknown tool: ${name}` }], isError: true };
      }
      
      try {
        const result = await callTool(tool.endpoint, args);
        return { content: [{ type: 'text', text: JSON.stringify(result, null, 2) }] };
      } catch (err) {
        return { content: [{ type: 'text', text: `Error: ${err.message}` }], isError: true };
      }
    });
  • The 'callTool' helper function executes the API request for the specified endpoint.
    async function callTool(endpoint, params) {
      const fetch = (await import('node-fetch')).default;
      const isGet = ['GET'].includes((TOOLS.find(t => t.endpoint === endpoint) || {}).method);
      
      const url = isGet 
        ? `${BASE_URL}${endpoint}?${new URLSearchParams(params)}`
        : `${BASE_URL}${endpoint}`;
      
      const res = await fetch(url, {
        method: isGet ? 'GET' : 'POST',
        headers: {
          'Content-Type': 'application/json',
          'Authorization': `Bearer ${API_KEY}`,
        },
        body: isGet ? undefined : JSON.stringify(params),
      });
      
      const text = await res.text();
      let data;
      try { data = JSON.parse(text); } catch { data = { raw: text }; }
      
      if (!res.ok) {
        if (res.status === 402) {
          throw new Error(`Insufficient credits. Add credits at https://iteratools.com. Cost: ${TOOLS.find(t=>t.endpoint===endpoint)?.price || 'see docs'}`);
        }
        throw new Error(`API error ${res.status}: ${text.substring(0, 200)}`);
      }
      
      return data;
    }
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 only specifies 'current' (implying real-time data) but fails to disclose error handling for invalid coins, the return data structure/format, data source reliability, or rate limiting constraints.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The single-sentence structure is appropriately brief and front-loaded. However, the '($0.001)' fragment creates confusion without clear context—if it indicates return precision or format, it should be explicit; if erroneous, it wastes the limited space.

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 low complexity (one optional parameter, no nested objects, no output schema), the description is minimally adequate. However, it lacks critical completeness for an API tool: the return value format (string, number, JSON object?) and currency denomination are unspecified.

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 description coverage is 100% (the 'coin' parameter is fully documented with type, default, and examples). The description text does not mention parameters at all, but with high schema coverage, the baseline score of 3 is appropriate as the schema carries the semantic weight.

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 core function using a specific verb ('Get') and resource ('cryptocurrency price'). It effectively distinguishes from non-financial siblings like audio_transcribe or image_generate. However, the parenthetical '($0.001)' is ambiguous—it may indicate precision, a price example, or a formatting hint—which slightly obscures the clarity.

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, nor does it mention prerequisites (e.g., API keys) or rate limits. While no siblings overlap functionally, the agent lacks explicit context for 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

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/fredpsantos33/itera-tools-mcp'

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