Skip to main content
Glama
kongyo2

EVE University Wiki MCP Server

search_eve_wiki

Read-only

Find articles on EVE University Wiki with an integrated Wayback Machine fallback to ensure reliable access to EVE Online knowledge.

Instructions

Search for articles on EVE University Wiki (with Wayback Machine fallback)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNoMaximum number of results to return
queryYesSearch query for EVE University Wiki

Implementation Reference

  • src/server.ts:15-50 (registration)
    Registration of the 'search_eve_wiki' tool using FastMCP server.addTool, including annotations, description, inline execute handler that delegates to EveWikiClient.search, name, and Zod parameters schema.
    server.addTool({
      annotations: {
        openWorldHint: true, // This tool interacts with external systems
        readOnlyHint: true, // This tool doesn't modify anything
        title: "Search EVE University Wiki",
      },
      description: "Search for articles on EVE University Wiki (with Wayback Machine fallback)",
      execute: async (args) => {
        try {
          const results = await eveWikiClient.search(args.query, args.limit);
          const hasArchivedResults = results.some(r => r.pageid === -1);
          
          return JSON.stringify(
            {
              query: args.query,
              results: results,
              note: hasArchivedResults ? "Some results are from Internet Archive Wayback Machine" : undefined,
            },
            null,
            2,
          );
        } catch (error) {
          return `Error searching EVE Wiki: ${error}`;
        }
      },
      name: "search_eve_wiki",
      parameters: z.object({
        limit: z
          .number()
          .min(1)
          .max(50)
          .default(10)
          .describe("Maximum number of results to return"),
        query: z.string().describe("Search query for EVE University Wiki"),
      }),
    });
  • Core implementation of the search functionality in EveWikiClient class. Performs MediaWiki API search with retryable requests, fallback to hardcoded common pages via Wayback Machine availability check if API fails.
    async search(query: string, limit: number = 10): Promise<SearchResult[]> {
      return this.retryableRequest(async () => {
        try {
          const response = await this.client.get("", {
            params: {
              action: "query",
              format: "json",
              list: "search",
              srlimit: limit,
              srprop: "snippet|titlesnippet|size|wordcount|timestamp",
              srsearch: query,
            },
          });
    
          if (response.data?.query?.search) {
            return response.data.query.search.map(
              (item: {
                pageid: number;
                snippet?: string;
                timestamp?: string;
                title: string;
                wordcount?: number;
              }) => ({
                pageid: item.pageid,
                snippet: this.cleanSnippet(item.snippet || ""),
                timestamp: item.timestamp || "",
                title: item.title,
                wordcount: item.wordcount || 0,
              }),
            );
          }
    
          return [];
        } catch (error) {
          console.error("Primary EVE Wiki search failed, trying Wayback Machine fallback:", error);
          
          // Try Wayback Machine fallback with common EVE-related pages
          try {
            const commonEvePages = [
              "Fitting", "Ships", "Mining", "Trading", "PvP", "Missions", 
              "Corporations", "Alliances", "Industry", "Exploration"
            ];
            
            const matchingPages = commonEvePages.filter(page => 
              page.toLowerCase().includes(query.toLowerCase()) ||
              query.toLowerCase().includes(page.toLowerCase())
            );
            
            if (matchingPages.length === 0) {
              // If no matches, try to get a few common pages
              matchingPages.push(...commonEvePages.slice(0, Math.min(limit, 3)));
            }
            
            const results: SearchResult[] = [];
            
            for (const page of matchingPages.slice(0, limit)) {
              try {
                const articleUrl = `https://wiki.eveuniversity.org/wiki/${encodeURIComponent(page.replace(/ /g, '_'))}`;
                const snapshot = await this.checkWaybackAvailability(articleUrl);
                
                if (snapshot) {
                  results.push({
                    pageid: -1, // Indicate this is from Wayback Machine
                    snippet: `Archived content related to ${page} (from Wayback Machine)`,
                    timestamp: snapshot.timestamp,
                    title: `${page} (Archived)`,
                    wordcount: 0,
                  });
                }
              } catch (pageError) {
                console.warn(`Failed to check Wayback availability for ${page}:`, pageError);
              }
            }
            
            return results;
          } catch (waybackError) {
            console.error("Wayback Machine fallback also failed:", waybackError);
            throw new Error(`Failed to search EVE Wiki from both primary source and Wayback Machine`);
          }
        }
      });
    }
  • Zod input schema defining parameters for the tool: required 'query' string and optional 'limit' number (1-50, default 10).
    parameters: z.object({
      limit: z
        .number()
        .min(1)
        .max(50)
        .default(10)
        .describe("Maximum number of results to return"),
      query: z.string().describe("Search query for EVE University Wiki"),
    }),
  • TypeScript interface defining the structure of search results returned by the search method.
    export interface SearchResult {
      pageid: number;
      snippet: string;
      timestamp: string;
      title: string;
      wordcount: number;
    }
  • Helper method to clean HTML snippets from search results by removing tags using cheerio.
    private cleanSnippet(snippet: string): string {
      // Remove HTML tags and decode entities
      const $ = cheerio.load(snippet);
      return $.root().text().trim();
    }
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already provide readOnlyHint=true and openWorldHint=true, indicating a safe read operation with open-world data. The description adds value by disclosing the 'Wayback Machine fallback' behavior, which is not covered by annotations. However, it lacks details on rate limits, error handling, or response format, leaving some behavioral traits unspecified.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that front-loads the core purpose ('Search for articles on EVE University Wiki') and adds a critical behavioral detail ('with Wayback Machine fallback') without any wasted words. It is appropriately sized and structured for clarity.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's moderate complexity (search with fallback), rich annotations (readOnlyHint, openWorldHint), and 100% schema coverage, the description is mostly complete. It covers the purpose and a key behavioral trait. However, without an output schema, it does not explain return values or result structure, which is a minor gap.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, with clear descriptions for both parameters (query and limit). The description does not add any additional meaning beyond what the schema provides, such as search syntax or result ordering. Baseline 3 is appropriate since the schema adequately documents the parameters.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the specific action ('Search for articles') and target resource ('EVE University Wiki'), and distinguishes it from sibling tools by mentioning the unique 'Wayback Machine fallback' feature. It uses a precise verb ('Search') rather than being vague or tautological.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implicitly suggests using this tool for searching articles on the EVE University Wiki, which provides clear context. However, it does not explicitly state when to use this versus the sibling tools (e.g., get_eve_wiki_article for specific articles), nor does it mention exclusions or alternatives beyond the fallback.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

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