Skip to main content
Glama
kongyo2

eve-online-mcp

get-market-history

Retrieve historical market data for a specific item in a region using the EVE Online API. Input region and item IDs to access detailed trade insights.

Instructions

Get market history for a specific item in a region

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
region_idYesRegion ID to get market history from
type_idYesItem type ID to get history for

Implementation Reference

  • Handler function that fetches market history data from the EVE Online ESI API endpoint `/markets/${region_id}/history/?type_id=${type_id}` using the shared makeESIRequest helper and returns it as a formatted JSON text content block.
    async ({ region_id, type_id }) => {
      const history = await makeESIRequest<Array<MarketHistory>>(`/markets/${region_id}/history/?type_id=${type_id}`);
    
      return {
        content: [
          {
            type: "text",
            text: JSON.stringify(history, null, 2),
          },
        ],
      };
    }
  • Zod schema defining the required input parameters: region_id (number) and type_id (number).
    {
      region_id: z.number().describe("Region ID to get market history from"),
      type_id: z.number().describe("Item type ID to get history for"),
    },
  • src/index.ts:323-342 (registration)
    Tool registration via server.tool() call, including name 'get-market-history', description, input schema, and inline handler implementation.
    server.tool(
      "get-market-history",
      "Get market history for a specific item in a region",
      {
        region_id: z.number().describe("Region ID to get market history from"),
        type_id: z.number().describe("Item type ID to get history for"),
      },
      async ({ region_id, type_id }) => {
        const history = await makeESIRequest<Array<MarketHistory>>(`/markets/${region_id}/history/?type_id=${type_id}`);
    
        return {
          content: [
            {
              type: "text",
              text: JSON.stringify(history, null, 2),
            },
          ],
        };
      }
    );
  • TypeScript interface defining the structure of market history data items returned by the ESI API.
    interface MarketHistory {
      average: number;
      date: string;
      highest: number;
      lowest: number;
      order_count: number;
      volume: number;
    }
  • Shared helper function for making authenticated ESI API requests, handling rate limits, errors, and headers. Used by the get-market-history handler.
    async function makeESIRequest<T>(endpoint: string, token?: string): Promise<T> {
      if (!checkRateLimit(endpoint)) {
        throw new Error("Rate limit exceeded. Please try again later.");
      }
    
      const headers: Record<string, string> = {
        "User-Agent": USER_AGENT,
        "Accept": "application/json",
      };
    
      if (token) {
        headers["Authorization"] = `Bearer ${token}`;
      }
    
      const response = await fetch(`${ESI_BASE_URL}${endpoint}`, { headers });
      updateRateLimit(endpoint, response.headers);
    
      if (!response.ok) {
        let errorMessage = `HTTP error! status: ${response.status}`;
        try {
          const errorData = await response.json() as ESIError;
          if (errorData.error) {
            errorMessage = `ESI Error: ${errorData.error}`;
            if (errorData.error_description) {
              errorMessage += ` - ${errorData.error_description}`;
            }
          }
        } catch {
          // エラーJSONのパースに失敗した場合は、デフォルトのエラーメッセージを使用
        }
        throw new Error(errorMessage);
      }
    
      return response.json() as Promise<T>;
    }
Behavior2/5

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

No annotations are provided, so the description carries full burden. It states it 'gets' data (implying read-only), but doesn't disclose behavioral traits like rate limits, authentication requirements (though sibling 'authenticate' suggests auth needed), data freshness, or pagination. The description is minimal and lacks context about what 'market history' entails (e.g., time range, format).

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 with zero waste. It's front-loaded with the core purpose and appropriately sized for a simple tool. Every word earns its place by specifying 'market history', 'specific item', and 'region'.

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 no annotations, no output schema, and 2 parameters with full schema coverage, the description is incomplete. It doesn't explain what 'market history' returns (e.g., price history, volume trends), time ranges, or how it relates to authentication (implied by sibling tools). For a data retrieval tool in a market context, more behavioral context is needed.

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%, with both parameters clearly documented in the schema. The description adds no additional meaning beyond implying 'region_id' and 'type_id' are required for specificity. It doesn't explain parameter relationships or provide examples, so it meets the baseline of 3 where schema does the heavy lifting.

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 verb 'Get' and the resource 'market history', specifying it's for 'a specific item in a region'. It distinguishes from siblings like 'get-market-prices' or 'get-market-orders' by focusing on historical data rather than current prices or orders. However, it doesn't explicitly differentiate from 'get-market-stats' which might also involve historical analysis.

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 'get-market-prices' or 'get-market-stats'. It mentions 'market history' but doesn't clarify if this is for trend analysis, price tracking, or other purposes. There are no explicit when/when-not instructions or prerequisites mentioned.

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/kongyo2/eve-online-mcp'

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