Skip to main content
Glama
sergeyklay

poe2-mcp-server

by sergeyklay

PoE2 Wiki Page Content

poe2_wiki_page
Read-onlyIdempotent

Retrieve complete wiki page content for Path of Exile 2 game information. Use after finding exact page titles to access detailed wikitext data.

Instructions

Get the full content of a specific wiki page from poe2wiki.net.

Use poe2_wiki_search first to find the exact page title, then use this to read the full content.

Args:

  • title (string): Exact wiki page title (from search results)

Returns: Full wikitext content of the page (may be long — truncated at 8000 chars).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
titleYesExact wiki page title

Implementation Reference

  • The main handler function for poe2_wiki_page tool. It takes a title parameter, calls getWikiPage() to fetch content from the wiki API, handles truncation for long pages (8000 chars), and returns formatted content with a wiki link. Includes error handling for failures.
    async ({ title }) => {
      try {
        let content = await getWikiPage(title);
        if (!content) {
          return {
            content: [
              {
                type: 'text',
                text: `Wiki page "${title}" not found or empty.`,
              },
            ],
          };
        }
    
        // Truncate very long pages
        if (content.length > 8000) {
          content = content.slice(0, 8000) + '\n\n... [truncated — page too long]';
        }
    
        return {
          content: [
            {
              type: 'text',
              text: `## Wiki: ${title}\n🔗 https://www.poe2wiki.net/wiki/${encodeURIComponent(title.replace(/ /g, '_'))}\n\n${content}`,
            },
          ],
        };
      } catch (error) {
        const msg = error instanceof Error ? error.message : String(error);
        return {
          isError: true,
          content: [{ type: 'text', text: `Error fetching wiki page: ${msg}` }],
        };
      }
    },
  • Input schema validation for poe2_wiki_page tool. Uses zod to validate that the title parameter is a non-empty string with minimum length of 1 character.
    inputSchema: {
      title: z.string().min(1).describe('Exact wiki page title'),
    },
  • Complete registration of the poe2_wiki_page tool. Includes tool metadata (title, description, inputSchema, annotations) and the handler function. Registered via server.registerTool() within the registerWikiTools() function.
      server.registerTool(
        'poe2_wiki_page',
        {
          title: 'PoE2 Wiki Page Content',
          description: `Get the full content of a specific wiki page from poe2wiki.net.
    
    Use poe2_wiki_search first to find the exact page title, then use this to read the full content.
    
    Args:
      - title (string): Exact wiki page title (from search results)
    
    Returns: Full wikitext content of the page (may be long — truncated at 8000 chars).`,
          inputSchema: {
            title: z.string().min(1).describe('Exact wiki page title'),
          },
          annotations: {
            readOnlyHint: true,
            destructiveHint: false,
            idempotentHint: true,
            openWorldHint: true,
          },
        },
        async ({ title }) => {
          try {
            let content = await getWikiPage(title);
            if (!content) {
              return {
                content: [
                  {
                    type: 'text',
                    text: `Wiki page "${title}" not found or empty.`,
                  },
                ],
              };
            }
    
            // Truncate very long pages
            if (content.length > 8000) {
              content = content.slice(0, 8000) + '\n\n... [truncated — page too long]';
            }
    
            return {
              content: [
                {
                  type: 'text',
                  text: `## Wiki: ${title}\n🔗 https://www.poe2wiki.net/wiki/${encodeURIComponent(title.replace(/ /g, '_'))}\n\n${content}`,
                },
              ],
            };
          } catch (error) {
            const msg = error instanceof Error ? error.message : String(error);
            return {
              isError: true,
              content: [{ type: 'text', text: `Error fetching wiki page: ${msg}` }],
            };
          }
        },
      );
  • The getWikiPage helper function that makes the actual HTTP request to poe2wiki.net API. Constructs the MediaWiki API URL to parse page content by title and returns the wikitext content.
    export async function getWikiPage(title: string): Promise<string> {
      const url = `https://www.poe2wiki.net/w/api.php?action=parse&page=${encodeURIComponent(title)}&prop=wikitext&format=json`;
      const data = await fetchJson<{ parse?: { wikitext?: { '*'?: string } } }>(url);
      return data.parse?.wikitext?.['*'] ?? '';
    }
Behavior4/5

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

Annotations cover read-only, open-world, idempotent, and non-destructive traits, but the description adds valuable context: it warns that returns 'may be long — truncated at 8000 chars,' which is a behavioral detail not captured in annotations. No contradiction with annotations exists.

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 front-loaded with the core purpose, followed by usage guidelines and parameter/return details in a structured format. Every sentence adds value—no wasted words—and it's appropriately sized for the tool's complexity.

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

Completeness5/5

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

Given the tool's simplicity (1 parameter, high schema coverage, annotations covering safety and behavior), the description is complete: it clarifies purpose, usage workflow, parameter semantics, and output behavior (truncation). No output schema exists, but the description adequately explains returns.

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 the parameter 'title' documented as 'Exact wiki page title.' The description adds minimal value beyond this, restating 'Exact wiki page title (from search results)' without providing additional syntax or format details. Baseline 3 is appropriate given high schema coverage.

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 verb 'Get' and resource 'full content of a specific wiki page from poe2wiki.net', distinguishing it from sibling tools like poe2_wiki_search (which searches) and others that handle currency, builds, or items. It specifies the exact source and content type, making the purpose unambiguous.

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

Usage Guidelines5/5

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

The description explicitly states 'Use poe2_wiki_search first to find the exact page title, then use this to read the full content,' providing clear when-to-use guidance and naming the alternative tool. This helps the agent understand the workflow and avoid misuse.

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