Skip to main content
Glama
kongyo2

eve-online-mcp

get-market-stats

Retrieve real-time market statistics for a specified region in EVE Online using region ID. Access data via ESI API for accurate market insights and analysis.

Instructions

Get market statistics for a region

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
region_idYesRegion ID to get statistics from

Implementation Reference

  • The handler function that executes the tool logic: fetches market statistics from the EVE ESI API endpoint `/markets/${region_id}/stats/` using the makeESIRequest helper and returns a text content block with JSON-stringified stats.
    async ({ region_id }) => {
      const stats = await makeESIRequest<MarketStat[]>(
        `/markets/${region_id}/stats/`
      );
    
      return {
        content: [
          {
            type: "text",
            text: JSON.stringify(stats, null, 2)
          }
        ]
      };
    }
  • Zod input schema defining the required 'region_id' parameter for the tool.
    {
      region_id: z.number().describe("Region ID to get statistics from"),
    },
  • src/index.ts:417-437 (registration)
    Registration of the 'get-market-stats' tool with server.tool(), including description, input schema, and inline handler.
    server.tool(
      "get-market-stats",
      "Get market statistics for a region",
      {
        region_id: z.number().describe("Region ID to get statistics from"),
      },
      async ({ region_id }) => {
        const stats = await makeESIRequest<MarketStat[]>(
          `/markets/${region_id}/stats/`
        );
    
        return {
          content: [
            {
              type: "text",
              text: JSON.stringify(stats, null, 2)
            }
          ]
        };
      }
    );
  • TypeScript interface defining the structure of individual market stat entries (name-value pairs) used for typing the API response in the handler.
    interface MarketStat {
      name: string;
      value: number;
    }
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