alliance-osint
Retrieve detailed OSINT data for EVE Online alliances, including member corporations, total member count, and alliance specifics, using precise alliance name input.
Instructions
Get OSINT information about an EVE Online alliance by name. Returns member corporations, total member count, and alliance details.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| allianceName | Yes | The exact name of the EVE Online alliance to investigate |
Implementation Reference
- src/server.ts:875-965 (handler)The main execution handler for the 'alliance-osint' tool. It resolves the alliance name to an ID using ESI, fetches alliance details from ESI and member corporations from EveWho API, then formats and returns a comprehensive Markdown OSINT report.execute: async (args, { log }) => { try { log.info("Resolving alliance name to ID", { allianceName: args.allianceName, }); // Resolve alliance name to ID const resolved = await resolveNamesToIds([args.allianceName]); if (!resolved.alliances || resolved.alliances.length === 0) { return `Alliance "${args.allianceName}" not found. Please check the spelling and ensure it's an exact match.`; } const alliance = resolved.alliances[0]; log.info("Alliance resolved", { id: alliance.id, name: alliance.name }); // Get alliance information from multiple sources log.info("Fetching alliance data from multiple sources", { allianceId: alliance.id, }); const [esiAllianceInfo, eveWhoAllianceData] = await Promise.allSettled([ getESIAllianceInfo(alliance.id), getAllianceCorps(alliance.id), ]); let result = `# Alliance OSINT Report: ${alliance.name}\n\n`; result += `**Alliance ID:** ${alliance.id}\n`; result += `**Alliance Name:** ${alliance.name}\n\n`; // ESI Alliance Information if (esiAllianceInfo.status === "fulfilled") { const esiInfo = esiAllianceInfo.value; result += `## ESI Alliance Information\n`; result += `**Name:** ${esiInfo.name}\n`; result += `**Ticker:** ${esiInfo.ticker}\n`; result += `**Founded:** ${esiInfo.date_founded}\n`; result += `**Creator Corporation ID:** ${esiInfo.creator_corporation_id}\n`; result += `**Creator ID:** ${esiInfo.creator_id}\n`; if (esiInfo.executor_corporation_id) { result += `**Executor Corporation ID:** ${esiInfo.executor_corporation_id}\n`; } if (esiInfo.faction_id) { result += `**Faction ID:** ${esiInfo.faction_id}\n`; } result += `\n`; } // EveWho Alliance Data if (eveWhoAllianceData.status === "fulfilled") { const allianceData = eveWhoAllianceData.value; result += `## EveWho Alliance Statistics\n`; if (allianceData.memberCount !== undefined) { result += `**Total Members:** ${allianceData.memberCount}\n`; } if (allianceData.corporationCount !== undefined) { result += `**Total Corporations:** ${allianceData.corporationCount}\n`; } if (allianceData.delta !== undefined) { result += `**7-Day Delta:** ${allianceData.delta > 0 ? "+" : ""}${allianceData.delta}\n`; } result += `\n## Member Corporations\n`; if (allianceData.corporations && allianceData.corporations.length > 0) { allianceData.corporations.forEach((corp, index: number) => { result += `${index + 1}. **${corp.name}** (ID: ${corp.corporation_id})`; if (corp.memberCount !== undefined) { result += ` - ${corp.memberCount} members`; } if (corp.delta !== undefined) { result += ` (${corp.delta > 0 ? "+" : ""}${corp.delta} 7d)`; } if (corp.start_date) { result += ` - Joined: ${corp.start_date}`; } result += `\n`; }); } else { result += "No corporation data available.\n"; } } result += `\n---\n*Data provided by EveWho API*`; return result; } catch (error) { log.error("Alliance OSINT failed", { error: error instanceof Error ? error.message : String(error), }); return `Error: ${error instanceof Error ? error.message : String(error)}`; } },
- src/server.ts:967-971 (schema)Zod input schema defining the 'allianceName' parameter for the alliance-osint tool.parameters: z.object({ allianceName: z .string() .describe("The exact name of the EVE Online alliance to investigate"), }),
- src/server.ts:867-972 (registration)The server.addTool registration block that defines and registers the 'alliance-osint' tool with FastMCP, including annotations, description, execute handler, name, and parameters schema.server.addTool({ annotations: { openWorldHint: true, readOnlyHint: true, title: "Alliance OSINT", }, description: "Get OSINT information about an EVE Online alliance by name. Returns member corporations, total member count, and alliance details.", execute: async (args, { log }) => { try { log.info("Resolving alliance name to ID", { allianceName: args.allianceName, }); // Resolve alliance name to ID const resolved = await resolveNamesToIds([args.allianceName]); if (!resolved.alliances || resolved.alliances.length === 0) { return `Alliance "${args.allianceName}" not found. Please check the spelling and ensure it's an exact match.`; } const alliance = resolved.alliances[0]; log.info("Alliance resolved", { id: alliance.id, name: alliance.name }); // Get alliance information from multiple sources log.info("Fetching alliance data from multiple sources", { allianceId: alliance.id, }); const [esiAllianceInfo, eveWhoAllianceData] = await Promise.allSettled([ getESIAllianceInfo(alliance.id), getAllianceCorps(alliance.id), ]); let result = `# Alliance OSINT Report: ${alliance.name}\n\n`; result += `**Alliance ID:** ${alliance.id}\n`; result += `**Alliance Name:** ${alliance.name}\n\n`; // ESI Alliance Information if (esiAllianceInfo.status === "fulfilled") { const esiInfo = esiAllianceInfo.value; result += `## ESI Alliance Information\n`; result += `**Name:** ${esiInfo.name}\n`; result += `**Ticker:** ${esiInfo.ticker}\n`; result += `**Founded:** ${esiInfo.date_founded}\n`; result += `**Creator Corporation ID:** ${esiInfo.creator_corporation_id}\n`; result += `**Creator ID:** ${esiInfo.creator_id}\n`; if (esiInfo.executor_corporation_id) { result += `**Executor Corporation ID:** ${esiInfo.executor_corporation_id}\n`; } if (esiInfo.faction_id) { result += `**Faction ID:** ${esiInfo.faction_id}\n`; } result += `\n`; } // EveWho Alliance Data if (eveWhoAllianceData.status === "fulfilled") { const allianceData = eveWhoAllianceData.value; result += `## EveWho Alliance Statistics\n`; if (allianceData.memberCount !== undefined) { result += `**Total Members:** ${allianceData.memberCount}\n`; } if (allianceData.corporationCount !== undefined) { result += `**Total Corporations:** ${allianceData.corporationCount}\n`; } if (allianceData.delta !== undefined) { result += `**7-Day Delta:** ${allianceData.delta > 0 ? "+" : ""}${allianceData.delta}\n`; } result += `\n## Member Corporations\n`; if (allianceData.corporations && allianceData.corporations.length > 0) { allianceData.corporations.forEach((corp, index: number) => { result += `${index + 1}. **${corp.name}** (ID: ${corp.corporation_id})`; if (corp.memberCount !== undefined) { result += ` - ${corp.memberCount} members`; } if (corp.delta !== undefined) { result += ` (${corp.delta > 0 ? "+" : ""}${corp.delta} 7d)`; } if (corp.start_date) { result += ` - Joined: ${corp.start_date}`; } result += `\n`; }); } else { result += "No corporation data available.\n"; } } result += `\n---\n*Data provided by EveWho API*`; return result; } catch (error) { log.error("Alliance OSINT failed", { error: error instanceof Error ? error.message : String(error), }); return `Error: ${error instanceof Error ? error.message : String(error)}`; } }, name: "alliance-osint", parameters: z.object({ allianceName: z .string() .describe("The exact name of the EVE Online alliance to investigate"), }), });
- src/server.ts:248-270 (helper)Helper function to retrieve member corporations of an alliance from the EveWho API, used by the alliance-osint handler.async function getAllianceCorps( allianceId: number, ): Promise<EveWhoAllianceResponse> { try { const response = await fetchWithRetry(`${EVEWHO_BASE_URL}/allilist/${allianceId}`, { headers: { "User-Agent": "EVE-OSINT-MCP/1.0.0", }, }); if (!response.ok) { throw new Error( `EveWho API error: ${response.status} ${response.statusText}`, ); } return (await response.json()) as EveWhoAllianceResponse; } catch (error) { throw new Error( `Failed to get alliance corporations: ${error instanceof Error ? error.message : String(error)}`, ); } }
- src/server.ts:398-420 (helper)Helper function to fetch basic alliance information (name, ticker, founded date, executor, etc.) from ESI API, used by the alliance-osint handler.async function getESIAllianceInfo( allianceId: number, ): Promise<ESIAllianceInfo> { try { const response = await fetchWithRetry(`${ESI_BASE_URL}/alliances/${allianceId}/`, { headers: { "User-Agent": "EVE-OSINT-MCP/1.0.0", }, }); if (!response.ok) { throw new Error( `ESI API error: ${response.status} ${response.statusText}`, ); } return (await response.json()) as ESIAllianceInfo; } catch (error) { throw new Error( `Failed to get ESI alliance info: ${error instanceof Error ? error.message : String(error)}`, ); } }