Skip to main content
Glama
kongyo2

eve-online-mcp

get-market-prices

Retrieve real-time market prices for all items in EVE Online using the EVE Swagger Interface (ESI) API.

Instructions

Get market prices for all items in EVE Online

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handler function for the "get-market-prices" tool. It fetches market prices data from the EVE Online ESI API endpoint "/markets/prices/" using the makeESIRequest helper, formats the prices by ensuring non-null values, and returns the data as a formatted JSON string in a text content block.
    async () => {
      const prices = await makeESIRequest<Array<{
        type_id: number;
        adjusted_price?: number;
        average_price?: number;
      }>>("/markets/prices/");
    
      const formattedPrices = prices.map((price) => ({
        type_id: price.type_id,
        adjusted_price: price.adjusted_price || 0,
        average_price: price.average_price || 0,
      }));
    
      return {
        content: [
          {
            type: "text",
            text: JSON.stringify(formattedPrices, null, 2),
          },
        ],
      };
    }
  • src/index.ts:259-285 (registration)
    The server.tool call that registers the "get-market-prices" tool, including its name, description, empty input schema (no parameters), and inline handler function.
    server.tool(
      "get-market-prices",
      "Get market prices for all items in EVE Online",
      {},
      async () => {
        const prices = await makeESIRequest<Array<{
          type_id: number;
          adjusted_price?: number;
          average_price?: number;
        }>>("/markets/prices/");
    
        const formattedPrices = prices.map((price) => ({
          type_id: price.type_id,
          adjusted_price: price.adjusted_price || 0,
          average_price: price.average_price || 0,
        }));
    
        return {
          content: [
            {
              type: "text",
              text: JSON.stringify(formattedPrices, null, 2),
            },
          ],
        };
      }
    );
  • The makeESIRequest helper function used by the handler to perform API requests to the EVE Online ESI endpoints, handling rate limiting, authentication, error handling, and response parsing.
    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>;
    }
  • TypeScript interface defining the structure of market price data returned from the ESI API, matching the types used in the handler.
    interface MarketPrice {
      adjusted_price?: number;
      average_price?: number;
      type_id: 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 states the tool's function but lacks critical details: it doesn't mention whether this is a read-only operation, potential rate limits, authentication requirements (though sibling tools suggest an auth system), or what the output format looks like. This leaves significant gaps for an agent to use it effectively.

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 directly states the tool's function without any fluff. It's front-loaded with the core action and resource, making it easy to parse quickly. Every word earns its place.

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 lack of annotations and output schema, the description is insufficiently complete. It doesn't address behavioral aspects like authentication needs (implied by sibling tools), rate limits, or output format. For a tool that likely interacts with an external API (EVE Online), more context is needed for reliable agent use.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has 0 parameters with 100% coverage, so no parameter documentation is needed. The description appropriately doesn't discuss parameters, focusing instead on the tool's purpose. This aligns with the baseline expectation for a parameterless tool.

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 action ('Get market prices') and resource ('all items in EVE Online'), making the purpose immediately understandable. It doesn't explicitly differentiate from siblings like 'get-market-history' or 'get-market-orders', but the scope ('all items') provides some implicit distinction.

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?

No guidance is provided on when to use this tool versus alternatives like 'get-market-history' or 'get-market-orders'. The description implies it retrieves current prices for all items, but it doesn't specify use cases, prerequisites, or exclusions, leaving the agent to infer usage from tool names alone.

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