Skip to main content
Glama
sergeyklay

poe2-mcp-server

by sergeyklay

PoE2 Database Lookup

poe2_db_lookup
Read-onlyIdempotent

Look up detailed Path of Exile 2 game data including items, gems, mods, and passives with exact stat values from datamined sources.

Instructions

Look up detailed game data from poe2db.tw — items, gems, mods, passives.

poe2db.tw contains datamined information directly from game files, including exact stat values, gem scaling, mod tiers, and more.

Also useful for finding Russian translations of game terms: use lang="ru" to get Russian page.

IMPORTANT: Skills, passives, and ascendancy nodes with ranks use Roman numerals in poe2db, not Arabic. Convert rank numbers: 1→I, 2→II, 3→III, 4→IV, 5→V. Always include the rank suffix if the user mentions a specific rank.

Args:

  • term (string): English name of an item, gem, mod, etc. Use underscores for spaces, e.g. "Essence_Drain", "Chaos_Bolt". For ranked skills/passives, append Roman numeral: "Urgent_Totems_II", "War_Cry_III".

  • lang ("us" | "fr"): Language — "us" for English (default), "fr" for French, etc.

Returns: Raw page content from poe2db (HTML stripped to text, truncated at 6000 chars).

Examples:

  • Gem details: term="Essence_Drain"

  • Passive rank 2: term="Urgent_Totems_II" (NOT "Urgent_Totems_2" or "Urgent_Totems")

  • Ascendancy node rank 3: term="War_Cry_III"

  • Russian name: term="Chaos_Bolt", lang="ru"

  • Unique item: term="Atziri's_Rule"

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
termYesSearch term with underscores for spaces. Use Roman numerals for ranks, e.g. "Urgent_Totems_II", "Essence_Drain"
langNoLanguage: us=English, ru=Russianus

Implementation Reference

  • The main handler implementation for 'poe2_db_lookup' tool. It registers the tool with its schema, description, and handler function that fetches data from poe2db.tw, strips HTML, and returns formatted text output.
      server.registerTool(
        'poe2_db_lookup',
        {
          title: 'PoE2 Database Lookup',
          description: `Look up detailed game data from poe2db.tw — items, gems, mods, passives.
    
    poe2db.tw contains datamined information directly from game files, including exact stat values, gem scaling, mod tiers, and more.
    
    Also useful for finding Russian translations of game terms: use lang="ru" to get Russian page.
    
    IMPORTANT: Skills, passives, and ascendancy nodes with ranks use Roman numerals in poe2db, not Arabic.
    Convert rank numbers: 1→I, 2→II, 3→III, 4→IV, 5→V.
    Always include the rank suffix if the user mentions a specific rank.
    
    Args:
      - term (string): English name of an item, gem, mod, etc. Use underscores for spaces, e.g. "Essence_Drain", "Chaos_Bolt". For ranked skills/passives, append Roman numeral: "Urgent_Totems_II", "War_Cry_III".
      - lang ("us" | "fr"): Language — "us" for English (default), "fr" for French, etc.
    
    Returns: Raw page content from poe2db (HTML stripped to text, truncated at 6000 chars).
    
    Examples:
      - Gem details: term="Essence_Drain"
      - Passive rank 2: term="Urgent_Totems_II" (NOT "Urgent_Totems_2" or "Urgent_Totems")
      - Ascendancy node rank 3: term="War_Cry_III"
      - Russian name: term="Chaos_Bolt", lang="ru"
      - Unique item: term="Atziri's_Rule"`,
          inputSchema: {
            term: z
              .string()
              .min(1)
              .describe(
                'Search term with underscores for spaces. Use Roman numerals for ranks, e.g. "Urgent_Totems_II", "Essence_Drain"',
              ),
            lang: z.enum(['us', 'ru']).default('us').describe('Language: us=English, ru=Russian'),
          },
          annotations: {
            readOnlyHint: true,
            destructiveHint: false,
            idempotentHint: true,
            openWorldHint: true,
          },
        },
        async ({ term, lang }) => {
          try {
            const html = await getPoe2dbPage(term, lang);
    
            // Strip HTML to get meaningful text
            let text = html
              .replace(/<script[\s\S]*?<\/script>/gi, '')
              .replace(/<style[\s\S]*?<\/style>/gi, '')
              .replace(/<nav[\s\S]*?<\/nav>/gi, '')
              .replace(/<footer[\s\S]*?<\/footer>/gi, '')
              .replace(/<header[\s\S]*?<\/header>/gi, '')
              .replace(/<[^>]+>/g, ' ')
              .replace(/ /g, ' ')
              .replace(/&/g, '&')
              .replace(/</g, '<')
              .replace(/>/g, '>')
              .replace(/\s+/g, ' ')
              .trim();
    
            if (text.length > 6000) {
              text = text.slice(0, 6000) + '\n\n... [truncated]';
            }
    
            const url = `https://poe2db.tw/${lang}/${term.replace(/\s+/g, '_')}`;
            return {
              content: [
                {
                  type: 'text',
                  text: `## poe2db: ${term} (${lang})\n🔗 ${url}\n\n${text}`,
                },
              ],
            };
          } catch (error) {
            const msg = error instanceof Error ? error.message : String(error);
            return {
              isError: true,
              content: [
                {
                  type: 'text',
                  text: `Error looking up "${term}" on poe2db: ${msg}\n\nTips:\n- Use English names with underscores, e.g. "Essence_Drain", "Orb_of_Augmentation"\n- For ranked skills/passives, use Roman numerals: "Urgent_Totems_II", not "Urgent_Totems_2"\n- Always include the rank suffix (I, II, III, etc.) if looking up a specific rank`,
                },
              ],
            };
          }
        },
      );
  • Input schema definition for 'poe2_db_lookup' tool using zod validation. Defines 'term' as a required string with underscores for spaces, and 'lang' as an enum ('us' | 'ru') defaulting to 'us'.
    inputSchema: {
      term: z
        .string()
        .min(1)
        .describe(
          'Search term with underscores for spaces. Use Roman numerals for ranks, e.g. "Urgent_Totems_II", "Essence_Drain"',
        ),
      lang: z.enum(['us', 'ru']).default('us').describe('Language: us=English, ru=Russian'),
    },
  • Helper function that fetches HTML page from poe2db.tw for a given term and language. Includes automatic normalization of trailing Arabic numerals to Roman numerals with retry logic.
    export async function getPoe2dbPage(term: string, lang: 'us' | 'ru' = 'us'): Promise<string> {
      const slug = term.replace(/\s+/g, '_');
      const normalizedSlug = normalizeTrailingArabicToRoman(slug);
      const headers = { 'User-Agent': USER_AGENT, Accept: 'text/html' };
    
      const res = await fetch(`https://poe2db.tw/${lang}/${normalizedSlug}`, {
        headers,
      });
    
      if (res.ok) return res.text();
    
      if (res.status === 404 && normalizedSlug !== slug) {
        const retry = await fetch(`https://poe2db.tw/${lang}/${slug}`, { headers });
        if (retry.ok) return retry.text();
      }
    
      throw new Error(`poe2db returned ${res.status} for "${term}"`);
    }
  • Helper function that converts trailing Arabic numerals to Roman numerals (e.g., 'Urgent_Totems_2' → 'Urgent_Totems_II') to match poe2db.tw naming conventions.
    export function normalizeTrailingArabicToRoman(slug: string): string {
      const match = /^(.+_)(\d+)$/.exec(slug);
      if (!match) return slug;
      const roman = ARABIC_TO_ROMAN[match[2]!];
      return roman ? match[1]! + roman : slug;
    }
Behavior4/5

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

Annotations already provide readOnlyHint=true, destructiveHint=false, openWorldHint=true, and idempotentHint=true, covering safety and idempotency. The description adds valuable behavioral context beyond annotations: it explains the source (datamined from game files), mentions truncation at 6000 chars, and specifies that returns are 'HTML stripped to text.' This enhances understanding of the tool's behavior without contradicting annotations.

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

Conciseness4/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, adds important context about the data source, provides usage notes, and includes clear examples. Every sentence serves a purpose, though the Roman numeral explanation is somewhat detailed. It could be slightly more concise but remains highly effective without wasted words.

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 complexity (database lookup with formatting rules) and lack of output schema, the description provides excellent completeness. It explains what data is returned (raw page content, HTML stripped, truncated), covers parameter nuances thoroughly, and includes practical examples. This compensates well for the missing output schema and ensures the agent understands the tool's full context.

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

Parameters5/5

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

Schema description coverage is 100%, so the baseline would be 3. However, the description adds significant semantic value beyond the schema: it explains the Roman numeral conversion rule for ranks, provides concrete examples of term formatting, clarifies language usage for Russian translations, and warns about common mistakes. This greatly aids correct parameter usage despite the schema already documenting types and constraints.

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: 'Look up detailed game data from poe2db.tw — items, gems, mods, passives.' It specifies the exact resource (poe2db.tw) and the types of data retrieved, distinguishing it from sibling tools like currency or price checkers. The verb 'look up' is specific and appropriate for a database query operation.

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 provides explicit guidance on when to use this tool vs. alternatives. It states it's for 'detailed game data from poe2db.tw' and mentions specific use cases like finding Russian translations. It also implicitly distinguishes from siblings by focusing on database lookups rather than currency, prices, or wiki content, making it clear this is the tool for raw datamined information.

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