Skip to main content
Glama
kongyo2

EVE University Wiki MCP Server

get_eve_wiki_article

Retrieve full EVE University Wiki article content by title, with Wayback Machine fallback for reliable access to EVE Online knowledge.

Instructions

Get the full content of an EVE University Wiki article (with Wayback Machine fallback)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
titleYesTitle of the EVE University Wiki article

Implementation Reference

  • src/server.ts:53-85 (registration)
    Registers the 'get_eve_wiki_article' tool using server.addTool, including name, description, input schema, and inline handler function.
    server.addTool({ annotations: { openWorldHint: true, readOnlyHint: true, title: "Get EVE University Wiki Article", }, description: "Get the full content of an EVE University Wiki article (with Wayback Machine fallback)", execute: async (args) => { try { const article = await eveWikiClient.getArticle(args.title); const isArchived = article.pageid === -1; return JSON.stringify( { content: article.content, // Full content without limit pageid: article.pageid, timestamp: article.timestamp, title: article.title, source: isArchived ? "wayback_machine" : "live_wiki", note: isArchived ? "Content retrieved from Internet Archive Wayback Machine" : undefined, }, null, 2, ); } catch (error) { return `Error getting article: ${error}`; } }, name: "get_eve_wiki_article", parameters: z.object({ title: z.string().describe("Title of the EVE University Wiki article"), }), });
  • The tool's execute handler: fetches article via EveWikiClient, determines source (live or archived), formats and returns JSON response.
    execute: async (args) => { try { const article = await eveWikiClient.getArticle(args.title); const isArchived = article.pageid === -1; return JSON.stringify( { content: article.content, // Full content without limit pageid: article.pageid, timestamp: article.timestamp, title: article.title, source: isArchived ? "wayback_machine" : "live_wiki", note: isArchived ? "Content retrieved from Internet Archive Wayback Machine" : undefined, }, null, 2, ); } catch (error) { return `Error getting article: ${error}`; } },
  • Zod input schema defining the 'title' parameter.
    parameters: z.object({ title: z.string().describe("Title of the EVE University Wiki article"), }),
  • Core implementation in EveWikiClient.getArticle: queries MediaWiki API for article content, falls back to Wayback Machine HTML scraping if unavailable.
    async getArticle(title: string): Promise<Article> { return this.retryableRequest(async () => { try { const response = await this.client.get("", { params: { action: "query", format: "json", prop: "revisions", rvprop: "content|timestamp|ids", rvslots: "main", titles: title, }, }); const pages = response.data?.query?.pages; if (!pages) { throw new Error("No pages found"); } const pageId = Object.keys(pages)[0]; const page = pages[pageId]; if (page.missing) { throw new Error(`Article "${title}" not found`); } const revision = page.revisions?.[0]; if (!revision) { throw new Error("No revision found"); } return { content: revision.slots?.main?.["*"] || "", pageid: page.pageid, revid: revision.revid, timestamp: revision.timestamp, title: page.title, }; } catch (error) { console.error("Primary EVE Wiki request failed, trying Wayback Machine fallback:", error); // Try Wayback Machine fallback try { const articleUrl = `https://wiki.eveuniversity.org/wiki/${encodeURIComponent(title.replace(/ /g, '_'))}`; const waybackContent = await this.getWaybackContent(articleUrl); const textContent = this.extractTextFromHtml(waybackContent); return { content: textContent, pageid: -1, // Indicate this is from Wayback Machine revid: -1, timestamp: new Date().toISOString(), title: `${title} (Archived)`, }; } catch (waybackError) { console.error("Wayback Machine fallback also failed:", waybackError); throw new Error(`Failed to get article "${title}" from both primary source and Wayback Machine`); } } }); }
  • TypeScript interface defining the structure of an Article returned by getArticle.
    export interface Article { content: string; pageid: number; revid: number; timestamp: string; title: string; }

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-University-Wiki-MCP-Server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server