get_market_history
Retrieve price history for specific EVE Online items in a given region to analyze market trends and inform trading decisions.
Instructions
Returns the price history of an item in a particular region
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| regionId | Yes | Region ID | |
| typeId | Yes | Item type ID |
Implementation Reference
- src/server.ts:104-108 (handler)The execute handler function that constructs the API endpoint for market history using regionId and typeId, fetches data via makeApiRequest helper, and returns pretty-printed JSON.execute: async (args) => { const endpoint = `/v1/market/history/${args.regionId}/${args.typeId}`; const data = await makeApiRequest(endpoint); return JSON.stringify(data, null, 2); },
- src/server.ts:110-113 (schema)Zod input schema defining required parameters: regionId (number) and typeId (number).parameters: z.object({ regionId: z.number().describe("Region ID"), typeId: z.number().describe("Item type ID"), }),
- src/server.ts:97-114 (registration)FastMCP server.addTool registration for 'get_market_history' tool, including annotations, description, handler, name, and parameters schema.server.addTool({ annotations: { openWorldHint: true, readOnlyHint: true, title: "Get Market History", }, description: "Returns the price history of an item in a particular region", execute: async (args) => { const endpoint = `/v1/market/history/${args.regionId}/${args.typeId}`; const data = await makeApiRequest(endpoint); return JSON.stringify(data, null, 2); }, name: "get_market_history", parameters: z.object({ regionId: z.number().describe("Region ID"), typeId: z.number().describe("Item type ID"), }), });
- src/server.ts:12-21 (helper)Shared helper function to make fetch requests to the EVE Tycoon API base URL, handles errors, used by get_market_history and other tools.async function makeApiRequest(endpoint: string): Promise<any> { const url = `${BASE_URL}${endpoint}`; const response = await fetch(url); if (!response.ok) { throw new Error(`API request failed: ${response.status} ${response.statusText}`); } return response.json(); }