Skip to main content
Glama
token-metrics

Token Metrics MCP Server

Official

get_tokens_hourly_ohlcv

Retrieve hourly OHLCV (Open, High, Low, Close, Volume) data for specific tokens by specifying token IDs, names, symbols, or date ranges using the Token Metrics API for comprehensive cryptocurrency market analysis.

Instructions

Fetch hourly OHLCV (Open, High, Low, Close, Volume) data for token(s) for a specific date or date range from Token Metrics API.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
endDateNoEnd Date accepts date as a string - YYYY-MM-DD format. Example: 2023-10-10
limitNoLimit the number of results returned. Default is 50. Maximum is 100.
pageNoEnables pagination and data retrieval control by skipping a specified number of items before fetching data. Page should be a non-negative integer, with 1 indicating the beginning of the dataset.
startDateNoStart Date accepts date as a string - YYYY-MM-DD format. Example: 2023-10-01
symbolNoComma-separated string of token symbols (e.g., 'BTC,ETH,ADA')
token_idNoComma-separated string of token IDs (e.g., '1,2,3')
token_nameNoComma Separated Crypto Asset Names (e.g., Bitcoin, Ethereum)

Implementation Reference

  • The core handler logic for the 'get_tokens_hourly_ohlcv' tool. It validates the API key, builds query parameters from input, and makes an API request to the '/hourly-ohlcv' endpoint.
    protected async performApiRequest(
      input: HourlyOHLCVInput,
    ): Promise<TokenMetricsResponse> {
      this.validateApiKey();
      const params = this.buildParams(input);
    
      return (await this.makeApiRequest(
        "/hourly-ohlcv",
        params,
      )) as TokenMetricsResponse;
    }
  • The tool schema definition including name 'get_tokens_hourly_ohlcv', description, and input schema for parameters like token_id, symbol, dates, etc.
    getToolDefinition(): Tool {
      return {
        name: "get_tokens_hourly_ohlcv",
        description:
          "Fetch hourly OHLCV (Open, High, Low, Close, Volume) data for token(s) for a specific date or date range from Token Metrics API.",
        inputSchema: {
          type: "object",
          properties: {
            token_id: {
              type: "string",
              description: "Comma-separated string of token IDs (e.g., '1,2,3')",
            },
            token_name: {
              type: "string",
              description:
                "Comma Separated Crypto Asset Names (e.g., Bitcoin, Ethereum)",
            },
            startDate: {
              type: "string",
              description:
                "Start Date accepts date as a string - YYYY-MM-DD format. Example: 2023-10-01",
            },
            endDate: {
              type: "string",
              description:
                "End Date accepts date as a string - YYYY-MM-DD format. Example: 2023-10-10",
            },
            symbol: {
              type: "string",
              description:
                "Comma-separated string of token symbols (e.g., 'BTC,ETH,ADA')",
            },
            limit: {
              type: "number",
              description:
                "Limit the number of results returned. Default is 50. Maximum is 100.",
            },
            page: {
              type: "number",
              description:
                "Enables pagination and data retrieval control by skipping a specified number of items before fetching data. Page should be a non-negative integer, with 1 indicating the beginning of the dataset.",
            },
          },
          required: [],
        },
      } as Tool;
    }
  • Registration of the HourlyOHLCVTool instance (line 32) in the AVAILABLE_TOOLS array, which is used by the MCP server to list and execute tools.
    export const AVAILABLE_TOOLS: BaseTool[] = [
      new TokenDataTool(),
      new PriceTool(),
      new HourlyOHLCVTool(),
      new DailyOHLCVTool(),
      new TokenInvestorGradeTool(),
      new MarketMetricsTool(),
      new TokenTradingSignalTool(),
      new AiReportTool(),
      new CryptoInvestorTool(),
      new TopTokensTool(),
      new ResistanceSupportTool(),
      new SentimentTool(),
      new QuantMetricsTool(),
      new ScenarioAnalysisTool(),
      new CorrelationTool(),
      new IndicesTool(),
      new IndicesHoldingsTool(),
      new IndicesPerformanceTool(),
      new TokenHourlyTradingSignalTool(),
      new MoonshotTokensTool(),
      new TokenTmGradeTool(),
      new TokenTmGradeHistoricalTool(),
      new TokenTechnologyGradeTool(),
    ];
  • Type definition for the input parameters used in the tool handler.
    interface HourlyOHLCVInput {
      token_id?: string;
      symbol?: string;
      token_name?: string;
      startDate?: string;
      endDate?: string;
      limit?: number;
      page?: number;
    }
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 mentions data fetching but lacks details on rate limits, authentication requirements, error handling, or response format. For an API tool with 7 parameters, this leaves significant behavioral gaps.

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 that front-loads key information (fetch, hourly OHLCV, tokens, date range, API source). Every word contributes meaning without redundancy, making it appropriately concise and well-structured.

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?

For a data-fetching tool with 7 parameters and no output schema, the description is minimally adequate but incomplete. It covers the basic purpose but lacks behavioral context (e.g., rate limits, pagination behavior, error cases) and output details, which are crucial for effective tool use.

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?

The schema description coverage is 100%, with each parameter well-documented in the input schema. The description adds minimal value beyond the schema by mentioning 'date or date range' and 'token(s)', but does not explain parameter interactions or provide additional semantic context. Baseline 3 is appropriate given high schema coverage.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the specific action ('Fetch'), resource ('hourly OHLCV data for token(s)'), and scope ('from Token Metrics API'), distinguishing it from sibling tools like get_tokens_daily_ohlcv (daily vs. hourly) and get_tokens_price (price only vs. full OHLCV). It precisely communicates what the tool does.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

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

The description implies usage for retrieving historical hourly OHLCV data, but does not explicitly state when to use this tool versus alternatives like get_tokens_daily_ohlcv (for daily data) or get_tokens_price (for current prices). No guidance on prerequisites or exclusions is provided.

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/token-metrics/mcp'

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