Skip to main content
Glama
EmanuelJr
by EmanuelJr

fetch_quote

Retrieve current token prices from EVM blockchains by providing a token slug identifier.

Instructions

Get the price of a token

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
slugYes

Implementation Reference

  • The primary handler function implementing the 'fetch_quote' tool logic. It destructures the slug option, fetches lightweight crypto data from CoinMarketCap service, and returns the current price from the statistics.
    export const fetchQuote = async (options: FetchQuoteOptions) => {
      const { slug } = options;
    
      const data = await getCryptoDataLite(slug);
    
      return data.data.statistics.price;
    };
  • Zod schema defining the input for fetch_quote: a required 'slug' string (e.g., token identifier). Includes the inferred TypeScript type.
    export const FetchQuoteSchema = z.object({
      slug: z.string(),
    });
    export type FetchQuoteOptions = z.infer<typeof FetchQuoteSchema>;
  • src/index.ts:50-54 (registration)
    Registration of the 'fetch_quote' tool in the list returned by ListToolsRequestSchema, including name, description, and JSON schema for input validation.
    {
      name: "fetch_quote",
      description: "Get the price of a token",
      inputSchema: z.toJSONSchema(FetchQuoteSchema),
    },
  • Dispatcher handler in the main CallToolRequestSchema switch case. Parses arguments with the schema, invokes the fetchQuote handler, and formats the response as MCP tool content.
    case "fetch_quote": {
      const args = FetchQuoteSchema.parse(request.params.arguments);
      const result = await fetchQuote(args);
    
      return {
        content: [
          {
            type: "text",
            text: result.toString(),
            description: "The price of the token in USD",
          },
        ],
      };
    }
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 'Get the price of a token', implying a read-only operation, but doesn't specify details like data source, rate limits, error handling, or response format. This leaves significant gaps in understanding how the tool behaves beyond its basic purpose.

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, clear sentence with no wasted words, making it highly concise and front-loaded. It efficiently communicates the core purpose without unnecessary elaboration.

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 tool's complexity (a read operation with 1 parameter), lack of annotations, and no output schema, the description is incomplete. It doesn't explain the parameter, expected output, or behavioral traits, making it inadequate for the agent to fully understand how to use the tool effectively.

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?

The input schema has 1 parameter with 0% description coverage, and the tool description doesn't mention the 'slug' parameter at all. This fails to compensate for the lack of schema documentation, leaving the parameter's meaning and usage completely unexplained to the agent.

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 'Get the price of a token' clearly states the action (get) and resource (price of a token), making the purpose understandable. However, it doesn't differentiate from sibling tools like 'fetch_balance' or 'fetch_token_balance' which might also retrieve token-related information, so it doesn't fully distinguish itself 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?

The description provides no guidance on when to use this tool versus alternatives like 'fetch_balance' or 'read_contract'. It lacks context about specific use cases, prerequisites, or exclusions, leaving the agent with minimal direction 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/EmanuelJr/web3-mcp-server'

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