Skip to main content
Glama
sergeyklay

poe2-mcp-server

by sergeyklay

PoE2 Wiki Search

poe2_wiki_search
Read-onlyIdempotent

Search the Path of Exile 2 community wiki to find game mechanics, items, skills, and other information. Get up to 5 relevant results with titles and snippets for your queries.

Instructions

Search the Path of Exile 2 community wiki (poe2wiki.net) for game mechanics, items, skills, and other information.

Args:

  • query (string): Search term — skill name, mechanic, item, monster, etc.

Returns: Up to 5 matching wiki articles with titles and snippets.

Examples:

  • "How does Contagion spread?" → query="Contagion"

  • "Energy Shield mechanics" → query="Energy Shield"

  • "Lich ascendancy" → query="Lich ascendancy"

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYesSearch query for the wiki

Implementation Reference

  • Main handler function for poe2_wiki_search tool. Executes the wiki search by calling searchWiki API, formats results with titles/snippets/URLs, handles empty results and errors.
    async ({ query }) => {
      try {
        const results = await searchWiki(query);
        if (results.length === 0) {
          return {
            content: [
              {
                type: 'text',
                text: `No wiki articles found for "${query}". Try different keywords.`,
              },
            ],
          };
        }
    
        const lines: string[] = [`## Wiki Search: "${query}"`, ''];
        for (const r of results) {
          // Strip HTML tags from snippet
          const clean = r.snippet.replace(/<[^>]+>/g, '');
          lines.push(`### ${r.title}`);
          lines.push(`${clean}`);
          lines.push(
            `🔗 https://www.poe2wiki.net/wiki/${encodeURIComponent(r.title.replace(/ /g, '_'))}`,
          );
          lines.push('');
        }
    
        return {
          content: [{ type: 'text', text: lines.join('\n') }],
        };
      } catch (error) {
        const msg = error instanceof Error ? error.message : String(error);
        return {
          isError: true,
          content: [{ type: 'text', text: `Wiki search error: ${msg}` }],
        };
      }
    },
  • Input schema definition for poe2_wiki_search using zod. Defines the query parameter as a string with min 2 and max 200 characters.
    inputSchema: {
      query: z.string().min(2).max(200).describe('Search query for the wiki'),
    },
  • src/tools/wiki.ts:7-69 (registration)
    Complete registration of poe2_wiki_search tool using server.registerTool(). Includes tool metadata, title, description, input schema, annotations, and the handler function.
      server.registerTool(
        'poe2_wiki_search',
        {
          title: 'PoE2 Wiki Search',
          description: `Search the Path of Exile 2 community wiki (poe2wiki.net) for game mechanics, items, skills, and other information.
    
    Args:
      - query (string): Search term — skill name, mechanic, item, monster, etc.
    
    Returns: Up to 5 matching wiki articles with titles and snippets.
    
    Examples:
      - "How does Contagion spread?" → query="Contagion"
      - "Energy Shield mechanics" → query="Energy Shield"
      - "Lich ascendancy" → query="Lich ascendancy"`,
          inputSchema: {
            query: z.string().min(2).max(200).describe('Search query for the wiki'),
          },
          annotations: {
            readOnlyHint: true,
            destructiveHint: false,
            idempotentHint: true,
            openWorldHint: true,
          },
        },
        async ({ query }) => {
          try {
            const results = await searchWiki(query);
            if (results.length === 0) {
              return {
                content: [
                  {
                    type: 'text',
                    text: `No wiki articles found for "${query}". Try different keywords.`,
                  },
                ],
              };
            }
    
            const lines: string[] = [`## Wiki Search: "${query}"`, ''];
            for (const r of results) {
              // Strip HTML tags from snippet
              const clean = r.snippet.replace(/<[^>]+>/g, '');
              lines.push(`### ${r.title}`);
              lines.push(`${clean}`);
              lines.push(
                `🔗 https://www.poe2wiki.net/wiki/${encodeURIComponent(r.title.replace(/ /g, '_'))}`,
              );
              lines.push('');
            }
    
            return {
              content: [{ type: 'text', text: lines.join('\n') }],
            };
          } catch (error) {
            const msg = error instanceof Error ? error.message : String(error);
            return {
              isError: true,
              content: [{ type: 'text', text: `Wiki search error: ${msg}` }],
            };
          }
        },
      );
  • searchWiki helper function that performs the actual HTTP request to poe2wiki.net's MediaWiki API and returns the search results as WikiSearchResult[] array.
    export async function searchWiki(query: string): Promise<WikiSearchResult[]> {
      const url = `https://www.poe2wiki.net/w/api.php?action=query&list=search&srsearch=${encodeURIComponent(query)}&format=json&srlimit=5`;
      const data = await fetchJson<{ query?: { search?: WikiSearchResult[] } }>(url);
      return data.query?.search ?? [];
    }
Behavior4/5

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

The description adds valuable behavioral context beyond what annotations provide: it specifies the source (poe2wiki.net), the return format (up to 5 matching articles with titles and snippets), and provides concrete examples of query types. While annotations cover safety and idempotency, the description adds practical usage information that helps the agent understand what to expect from the tool's behavior.

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 well-structured and appropriately sized. It starts with the core purpose, then provides the Args and Returns sections, followed by helpful examples. Every sentence earns its place by adding specific value - no redundant information or unnecessary elaboration.

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, rich annotations, and 100% schema coverage, the description is quite complete. It covers purpose, usage context, return format, and provides examples. The main gap is the lack of output schema, but the description compensates well by specifying what gets returned. It could be slightly more complete by mentioning limitations or edge cases.

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?

With 100% schema description coverage, the baseline is 3. The description adds minimal parameter semantics beyond what's in the schema - it provides examples of query types (skill name, mechanic, item, monster) which gives context about appropriate query content, but doesn't add significant syntax or format details beyond the schema's 'Search query for the wiki' description.

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 tool's purpose with specific verb ('Search') and resource ('Path of Exile 2 community wiki'), and distinguishes it from siblings by specifying it searches for 'game mechanics, items, skills, and other information' rather than currency, prices, builds, or specific pages. This makes it immediately clear what this tool does differently from poe2_wiki_page.

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 provides clear context about when to use this tool (searching the wiki for various game elements), but doesn't explicitly state when NOT to use it or name specific alternatives. The examples help illustrate appropriate use cases, but there's no explicit guidance about choosing between this and poe2_wiki_page or other search-related tools.

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

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/sergeyklay/poe2-mcp-server'

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