corporation-osint
Retrieve OSINT data on EVE Online corporations, including member lists, activity metrics, and detailed profiles, using the corporation name as input.
Instructions
Get OSINT information about an EVE Online corporation by name. Returns member list, activity metrics, and corporation details.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| corporationName | Yes | The exact name of the EVE Online corporation to investigate |
Implementation Reference
- src/server.ts:752-857 (handler)The execute handler for the corporation-osint tool. Resolves the corporation name to ID using ESI search, fetches detailed corporation information from ESI (including member count, tax rate, CEO, etc.), retrieves member list and stats from EveWho API, and compiles a markdown-formatted OSINT report.execute: async (args, { log }) => { try { log.info("Resolving corporation name to ID", { corporationName: args.corporationName, }); // Resolve corporation name to ID const resolved = await resolveNamesToIds([args.corporationName]); if (!resolved.corporations || resolved.corporations.length === 0) { return `Corporation "${args.corporationName}" not found. Please check the spelling and ensure it's an exact match.`; } const corporation = resolved.corporations[0]; log.info("Corporation resolved", { id: corporation.id, name: corporation.name, }); // Get corporation information from multiple sources log.info("Fetching corporation data from multiple sources", { corporationId: corporation.id, }); const [esiCorpInfo, eveWhoCorpData] = await Promise.allSettled([ getESICorporationInfo(corporation.id), getCorporationMembers(corporation.id), ]); let result = `# Corporation OSINT Report: ${corporation.name}\n\n`; result += `**Corporation ID:** ${corporation.id}\n`; result += `**Corporation Name:** ${corporation.name}\n\n`; // ESI Corporation Information if (esiCorpInfo.status === "fulfilled") { const esiInfo = esiCorpInfo.value; result += `## ESI Corporation Information\n`; result += `**Name:** ${esiInfo.name}\n`; result += `**Ticker:** ${esiInfo.ticker}\n`; result += `**Member Count:** ${esiInfo.member_count}\n`; result += `**Tax Rate:** ${(esiInfo.tax_rate * 100).toFixed(1)}%\n`; if (esiInfo.date_founded) { result += `**Founded:** ${esiInfo.date_founded}\n`; } if (esiInfo.alliance_id) { result += `**Alliance ID:** ${esiInfo.alliance_id}\n`; } result += `**CEO ID:** ${esiInfo.ceo_id}\n`; result += `**Creator ID:** ${esiInfo.creator_id}\n`; if (esiInfo.description) { result += `**Description:** ${esiInfo.description}\n`; } if (esiInfo.url) { result += `**URL:** ${esiInfo.url}\n`; } if (esiInfo.war_eligible !== undefined) { result += `**War Eligible:** ${esiInfo.war_eligible ? "Yes" : "No"}\n`; } result += `\n`; } // EveWho Corporation Data if (eveWhoCorpData.status === "fulfilled") { const corpData = eveWhoCorpData.value; result += `## EveWho Corporation Statistics\n`; if (corpData.memberCount !== undefined) { result += `**Total Members (EveWho):** ${corpData.memberCount}\n`; } if (corpData.delta !== undefined) { result += `**7-Day Delta:** ${corpData.delta > 0 ? "+" : ""}${corpData.delta}\n`; } if (corpData.alliance) { result += `**Alliance:** ${corpData.alliance.name} (ID: ${corpData.alliance.alliance_id})\n`; } result += `\n## Member List (EveWho)\n`; if (corpData.characters && corpData.characters.length > 0) { result += `Showing ${Math.min(corpData.characters.length, 50)} members:\n\n`; corpData.characters.slice(0, 50).forEach((member, index: number) => { result += `${index + 1}. **${member.name}** (ID: ${member.character_id})`; if (member.start_date) { result += ` - Joined: ${member.start_date}`; } if (member.security_status !== undefined) { result += ` - Sec Status: ${member.security_status.toFixed(2)}`; } result += `\n`; }); if (corpData.characters.length > 50) { result += `\n*... and ${corpData.characters.length - 50} more members*\n`; } } else { result += "No member data available.\n"; } } result += `\n---\n*Data provided by EveWho API*`; return result; } catch (error) { log.error("Corporation OSINT failed", { error: error instanceof Error ? error.message : String(error), }); return `Error: ${error instanceof Error ? error.message : String(error)}`; } },
- src/server.ts:859-863 (schema)Zod schema defining the input parameters for the tool: a required string 'corporationName'.parameters: z.object({ corporationName: z .string() .describe("The exact name of the EVE Online corporation to investigate"), }),
- src/server.ts:744-864 (registration)Registration of the 'corporation-osint' tool via server.addTool(), including annotations, description, name, parameters schema, and execute handler.server.addTool({ annotations: { openWorldHint: true, readOnlyHint: true, title: "Corporation OSINT", }, description: "Get OSINT information about an EVE Online corporation by name. Returns member list, activity metrics, and corporation details.", execute: async (args, { log }) => { try { log.info("Resolving corporation name to ID", { corporationName: args.corporationName, }); // Resolve corporation name to ID const resolved = await resolveNamesToIds([args.corporationName]); if (!resolved.corporations || resolved.corporations.length === 0) { return `Corporation "${args.corporationName}" not found. Please check the spelling and ensure it's an exact match.`; } const corporation = resolved.corporations[0]; log.info("Corporation resolved", { id: corporation.id, name: corporation.name, }); // Get corporation information from multiple sources log.info("Fetching corporation data from multiple sources", { corporationId: corporation.id, }); const [esiCorpInfo, eveWhoCorpData] = await Promise.allSettled([ getESICorporationInfo(corporation.id), getCorporationMembers(corporation.id), ]); let result = `# Corporation OSINT Report: ${corporation.name}\n\n`; result += `**Corporation ID:** ${corporation.id}\n`; result += `**Corporation Name:** ${corporation.name}\n\n`; // ESI Corporation Information if (esiCorpInfo.status === "fulfilled") { const esiInfo = esiCorpInfo.value; result += `## ESI Corporation Information\n`; result += `**Name:** ${esiInfo.name}\n`; result += `**Ticker:** ${esiInfo.ticker}\n`; result += `**Member Count:** ${esiInfo.member_count}\n`; result += `**Tax Rate:** ${(esiInfo.tax_rate * 100).toFixed(1)}%\n`; if (esiInfo.date_founded) { result += `**Founded:** ${esiInfo.date_founded}\n`; } if (esiInfo.alliance_id) { result += `**Alliance ID:** ${esiInfo.alliance_id}\n`; } result += `**CEO ID:** ${esiInfo.ceo_id}\n`; result += `**Creator ID:** ${esiInfo.creator_id}\n`; if (esiInfo.description) { result += `**Description:** ${esiInfo.description}\n`; } if (esiInfo.url) { result += `**URL:** ${esiInfo.url}\n`; } if (esiInfo.war_eligible !== undefined) { result += `**War Eligible:** ${esiInfo.war_eligible ? "Yes" : "No"}\n`; } result += `\n`; } // EveWho Corporation Data if (eveWhoCorpData.status === "fulfilled") { const corpData = eveWhoCorpData.value; result += `## EveWho Corporation Statistics\n`; if (corpData.memberCount !== undefined) { result += `**Total Members (EveWho):** ${corpData.memberCount}\n`; } if (corpData.delta !== undefined) { result += `**7-Day Delta:** ${corpData.delta > 0 ? "+" : ""}${corpData.delta}\n`; } if (corpData.alliance) { result += `**Alliance:** ${corpData.alliance.name} (ID: ${corpData.alliance.alliance_id})\n`; } result += `\n## Member List (EveWho)\n`; if (corpData.characters && corpData.characters.length > 0) { result += `Showing ${Math.min(corpData.characters.length, 50)} members:\n\n`; corpData.characters.slice(0, 50).forEach((member, index: number) => { result += `${index + 1}. **${member.name}** (ID: ${member.character_id})`; if (member.start_date) { result += ` - Joined: ${member.start_date}`; } if (member.security_status !== undefined) { result += ` - Sec Status: ${member.security_status.toFixed(2)}`; } result += `\n`; }); if (corpData.characters.length > 50) { result += `\n*... and ${corpData.characters.length - 50} more members*\n`; } } else { result += "No member data available.\n"; } } result += `\n---\n*Data provided by EveWho API*`; return result; } catch (error) { log.error("Corporation OSINT failed", { error: error instanceof Error ? error.message : String(error), }); return `Error: ${error instanceof Error ? error.message : String(error)}`; } }, name: "corporation-osint", parameters: z.object({ corporationName: z .string() .describe("The exact name of the EVE Online corporation to investigate"), }), });
- src/server.ts:368-392 (helper)Helper function to fetch corporation member list from EveWho API, used by the corporation-osint handler.async function getCorporationMembers( corporationId: number, ): Promise<EveWhoCorporationResponse> { try { const response = await fetchWithRetry( `${EVEWHO_BASE_URL}/corplist/${corporationId}`, { 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 EveWhoCorporationResponse; } catch (error) { throw new Error( `Failed to get corporation members: ${error instanceof Error ? error.message : String(error)}`, ); }
- src/server.ts:484-509 (helper)Helper function to fetch corporation details from ESI API, used by the corporation-osint handler.async function getESICorporationInfo( corporationId: number, ): Promise<ESICorporationInfo> { try { const response = await fetchWithRetry( `${ESI_BASE_URL}/corporations/${corporationId}/`, { 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 ESICorporationInfo; } catch (error) { throw new Error( `Failed to get ESI corporation info: ${error instanceof Error ? error.message : String(error)}`, ); } }