Skip to main content
Glama
kongyo2

eve-online-mcp

get-market-groups

Retrieve grouped market data for specific items and regions in EVE Online. Input a region ID and type ID to access organized market information via the MCP server.

Instructions

Get grouped market data for a region and type

Input Schema

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

Implementation Reference

  • Handler function that fetches grouped market data (buy/sell statistics) from the EVE Online ESI API endpoint /markets/{region_id}/types/{type_id}/ and returns formatted JSON text response.
    async ({ region_id, type_id }) => {
      const groups = await makeESIRequest<MarketGroup>(
        `/markets/${region_id}/types/${type_id}/`
      );
    
      return {
        content: [
          {
            type: "text",
            text: JSON.stringify({
              buy: {
                volume: groups.buy.volume,
                weighted_average: groups.buy.weighted_average,
                max: groups.buy.max,
                min: groups.buy.min,
                median: groups.buy.median
              },
              sell: {
                volume: groups.sell.volume,
                weighted_average: groups.sell.weighted_average,
                max: groups.sell.max,
                min: groups.sell.min,
                median: groups.sell.median
              }
            }, null, 2)
          }
        ]
      };
    }
  • Zod input schema defining parameters: region_id (required number) and type_id (required number).
    {
      region_id: z.number().describe("Region ID to get market groups from"),
      type_id: z.number().describe("Item type ID to get groups for"),
    },
  • src/index.ts:345-381 (registration)
    Registration of the 'get-market-groups' tool using McpServer.tool(), including description, input schema, and handler function.
    server.tool(
      "get-market-groups",
      "Get grouped market data for a region and type",
      {
        region_id: z.number().describe("Region ID to get market groups from"),
        type_id: z.number().describe("Item type ID to get groups for"),
      },
      async ({ region_id, type_id }) => {
        const groups = await makeESIRequest<MarketGroup>(
          `/markets/${region_id}/types/${type_id}/`
        );
    
        return {
          content: [
            {
              type: "text",
              text: JSON.stringify({
                buy: {
                  volume: groups.buy.volume,
                  weighted_average: groups.buy.weighted_average,
                  max: groups.buy.max,
                  min: groups.buy.min,
                  median: groups.buy.median
                },
                sell: {
                  volume: groups.sell.volume,
                  weighted_average: groups.sell.weighted_average,
                  max: groups.sell.max,
                  min: groups.sell.min,
                  median: groups.sell.median
                }
              }, null, 2)
            }
          ]
        };
      }
    );
  • TypeScript interface defining the expected structure of market group data (buy and sell objects with volume, weighted_average, max, min, stddev, median, percentile) from ESI API.
    interface MarketGroup {
      buy: {
        volume: number;
        weighted_average: number;
        max: number;
        min: number;
        stddev: number;
        median: number;
        percentile: number;
      };
      sell: {
        volume: number;
        weighted_average: number;
        max: number;
        min: number;
        stddev: number;
        median: number;
        percentile: 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