Skip to main content
Glama
kongyo2

eve-online-mcp

get-structure-orders

Retrieve all market orders within a specific EVE Online structure by providing the structure ID. Ideal for accessing real-time market data and managing in-game trade efficiently.

Instructions

Get all market orders in a structure

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pageNoWhich page to query, starts at 1
structure_idYesStructure ID to get market orders from

Implementation Reference

  • Handler function that constructs the ESI endpoint for structure market orders, fetches the orders using makeESIRequest, formats them by mapping to a subset of fields, and returns as JSON text content.
    async ({ structure_id, page }) => {
      const endpoint = `/markets/structures/${structure_id}/${page ? `?page=${page}` : ''}`;
      const orders = await makeESIRequest<MarketOrder[]>(endpoint);
    
      return {
        content: [
          {
            type: "text",
            text: JSON.stringify(orders.map(order => ({
              order_id: order.order_id,
              type_id: order.type_id,
              price: order.price,
              volume_remain: order.volume_remain,
              volume_total: order.volume_total,
              is_buy_order: order.is_buy_order,
              duration: order.duration,
              issued: order.issued,
              range: order.range
            })), null, 2)
          }
        ]
      };
    }
  • Zod input schema defining parameters for the tool: structure_id (required number) and page (optional number).
    {
      structure_id: z.number().describe("Structure ID to get market orders from"),
      page: z.number().optional().describe("Which page to query, starts at 1"),
    },
  • src/index.ts:384-414 (registration)
    Registration of the 'get-structure-orders' tool with McpServer using server.tool method, specifying name, description, input schema, and handler function.
    server.tool(
      "get-structure-orders",
      "Get all market orders in a structure",
      {
        structure_id: z.number().describe("Structure ID to get market orders from"),
        page: z.number().optional().describe("Which page to query, starts at 1"),
      },
      async ({ structure_id, page }) => {
        const endpoint = `/markets/structures/${structure_id}/${page ? `?page=${page}` : ''}`;
        const orders = await makeESIRequest<MarketOrder[]>(endpoint);
    
        return {
          content: [
            {
              type: "text",
              text: JSON.stringify(orders.map(order => ({
                order_id: order.order_id,
                type_id: order.type_id,
                price: order.price,
                volume_remain: order.volume_remain,
                volume_total: order.volume_total,
                is_buy_order: order.is_buy_order,
                duration: order.duration,
                issued: order.issued,
                range: order.range
              })), null, 2)
            }
          ]
        };
      }
    );
  • TypeScript interface defining the structure of MarketOrder objects returned by the ESI API, used in the handler's type annotation.
    interface MarketOrder {
      duration: number;
      is_buy_order: boolean;
      issued: string;
      location_id: number;
      min_volume: number;
      order_id: number;
      price: number;
      range: string;
      system_id: number;
      type_id: number;
      volume_remain: number;
      volume_total: number;
    }
  • Helper function for making authenticated ESI API requests, handling rate limits, errors, and headers; used by the tool handler to fetch orders.
    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?

With no annotations provided, the description carries the full burden of behavioral disclosure. It states the action but fails to describe key traits such as whether this is a read-only operation, potential rate limits, authentication requirements, or the format of returned data (e.g., pagination details). This leaves significant gaps for a tool that likely interacts with market data.

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 purpose without unnecessary words. It is appropriately sized and front-loaded, making it easy for an agent to parse quickly.

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 incomplete. It does not address behavioral aspects like safety, authentication, or data format, which are crucial for a tool fetching market orders. The high schema coverage helps with parameters, but overall context is insufficient for effective tool selection and invocation.

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 input schema has 100% description coverage, clearly documenting both parameters ('structure_id' and 'page'). The description adds no additional meaning beyond implying the scope ('in a structure'), which is already covered by the schema. This meets the baseline of 3 for high schema coverage.

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 resource ('all market orders in a structure'), making the purpose specific and understandable. However, it does not explicitly differentiate from sibling tools like 'get-market-orders' or 'get-structure-type-orders', which might have overlapping functionality, preventing a score of 5.

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 such as 'get-market-orders' or 'get-structure-type-orders'. It lacks context about prerequisites (e.g., authentication) or exclusions, leaving the agent to infer usage based on 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