Skip to main content
Glama

get-market-analysis

Analyze cryptocurrency markets by retrieving detailed insights on top exchanges and volume distribution using a specific symbol. Ideal for informed trading decisions and market research.

Instructions

Get detailed market analysis including top exchanges and volume distribution

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
symbolYesCryptocurrency symbol (e.g., BTC, ETH)

Implementation Reference

  • Main handler function that executes the get-market-analysis tool: validates input with Zod schema, fetches cryptocurrency asset data and market data using Coincap API services, handles errors for missing data, and formats the market analysis response.
    export async function handleGetMarketAnalysis(args: unknown) { const { symbol } = GetMarketAnalysisSchema.parse(args); const upperSymbol = symbol.toUpperCase(); const assetsData = await getAssets(); if (!assetsData) { return { content: [{ type: "text", text: "Failed to retrieve cryptocurrency data" }], }; } const asset = assetsData.data.find( (a: { symbol: string; }) => a.symbol.toUpperCase() === upperSymbol ); if (!asset) { return { content: [{ type: "text", text: `Could not find cryptocurrency with symbol ${upperSymbol}` }], }; } const marketsData = await getMarkets(asset.id); if (!marketsData) { return { content: [{ type: "text", text: "Failed to retrieve market data" }], }; } return { content: [{ type: "text", text: formatMarketAnalysis(asset, marketsData.data) }], }; }
  • Input schema definition for the get-market-analysis tool, registered in the ListTools response.
    { name: "get-market-analysis", description: "Get detailed market analysis including top exchanges and volume distribution", inputSchema: { type: "object", properties: { symbol: { type: "string", description: "Cryptocurrency symbol (e.g., BTC, ETH)", }, }, required: ["symbol"], }, },
  • src/index.ts:95-96 (registration)
    Switch case registration that dispatches calls to the get-market-analysis handler function.
    case "get-market-analysis": return await handleGetMarketAnalysis(args);
  • Zod validation schema used internally by the handler for input parsing.
    export const GetMarketAnalysisSchema = z.object({ symbol: z.string().min(1), });

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/wazzan/mcp-coincap-jj'

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