Skip to main content
Glama
kongyo2

EVE University Wiki MCP Server

get_eve_wiki_related_topics

Retrieve related topics for an EVE University Wiki article using its categories. Specify the article title and limit results to explore relevant content efficiently.

Instructions

Get topics related to an EVE University Wiki article based on categories

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNoMaximum number of related topics to return
titleYesTitle of the EVE University Wiki article

Implementation Reference

  • src/server.ts:177-214 (registration)
    Registration of the 'get_eve_wiki_related_topics' MCP tool, including annotations, description, input schema, output formatting, and handler function that delegates to EveWikiClient.getRelatedTopics.
    // Get related topics from EVE University Wiki server.addTool({ annotations: { openWorldHint: true, readOnlyHint: true, title: "Get Related EVE University Wiki Topics", }, description: "Get topics related to an EVE University Wiki article based on categories", execute: async (args) => { try { const relatedTopics = await eveWikiClient.getRelatedTopics( args.title, args.limit, ); return JSON.stringify( { related_topics: relatedTopics, title: args.title, }, null, 2, ); } catch (error) { return `Error getting related topics: ${error}`; } }, name: "get_eve_wiki_related_topics", parameters: z.object({ limit: z .number() .min(1) .max(20) .default(10) .describe("Maximum number of related topics to return"), title: z.string().describe("Title of the EVE University Wiki article"), }), });
  • Main handler logic for fetching related topics: retrieves categories of the given wiki article title, then fetches up to 5 member pages from each of the first 3 categories (excluding the original title), collecting up to the specified limit.
    async getRelatedTopics(title: string, limit: number = 10): Promise<string[]> { return this.retryableRequest(async () => { try { // First get categories for the article const categoriesResponse = await this.client.get("", { params: { action: "query", cllimit: 10, format: "json", prop: "categories", titles: title, }, }); const pages = categoriesResponse.data?.query?.pages; if (!pages) { return []; } const pageId = Object.keys(pages)[0]; const page = pages[pageId]; if (page.missing || !page.categories) { return []; } // Get articles from the same categories const categories = page.categories.slice(0, 3); // Limit to first 3 categories const relatedArticles: Set<string> = new Set(); for (const category of categories) { try { const categoryResponse = await this.client.get("", { params: { action: "query", cmlimit: 5, cmtitle: category.title, cmtype: "page", format: "json", list: "categorymembers", }, }); if (categoryResponse.data?.query?.categorymembers) { categoryResponse.data.query.categorymembers.forEach( (member: { title: string }) => { if (member.title !== title && relatedArticles.size < limit) { relatedArticles.add(member.title); } }, ); } } catch (error) { console.warn( `Error getting category members for ${category.title}:`, error, ); } } return Array.from(relatedArticles); } catch (error) { console.error("Error getting related topics:", error); throw new Error(`Failed to get related topics for "${title}": ${error}`); } }); }
  • Input schema validation using Zod: requires 'title' string and optional 'limit' number (1-20, default 10).
    parameters: z.object({ limit: z .number() .min(1) .max(20) .default(10) .describe("Maximum number of related topics to return"), title: z.string().describe("Title of the EVE University Wiki article"), }),

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