get_stats
Retrieve computed character stats from a Path of Building build, including life, mana, resistances, DPS, and movement speed.
Instructions
Return all computed character stats from the loaded build.
These are the values Path of Building calculates: life, mana, energy shield, resistances, DPS for each skill, movement speed, etc.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |
Implementation Reference
- src/poe2_mcp/server.py:75-84 (handler)The get_stats() tool handler function (decorated with @mcp.tool()). It calls _require_build() to ensure a build is loaded, then returns a list of dicts mapping each Stat's name to its value from the build's stat list.
@mcp.tool() def get_stats() -> list[dict]: """ Return all computed character stats from the loaded build. These are the values Path of Building calculates: life, mana, energy shield, resistances, DPS for each skill, movement speed, etc. """ build = _require_build() return [{"stat": s.name, "value": s.value} for s in build.stats] - src/poe2_mcp/pob/models.py:4-7 (schema)The Stat dataclass used by get_stats — each stat has a 'name' (str) and 'value' (str) field.
@dataclass class Stat: name: str value: str - src/poe2_mcp/pob/parser.py:74-84 (helper)_parse_stats() — parses <PlayerStat> XML elements from the PoB build XML into Stat objects that populate Build.stats, which get_stats() returns.
def _parse_stats(root: ET.Element) -> list[Stat]: build = root.find("Build") if build is None: return [] stats = [] for elem in build.findall("PlayerStat"): name = elem.get("stat", "") value = elem.get("value", "") if name and value: stats.append(Stat(name=name, value=value)) return stats - src/poe2_mcp/server.py:1-12 (registration)The module docstring lists 'get_stats' as a registered tool. The actual registration is via the @mcp.tool() decorator on line 75.
""" PoE2 MCP server. Tools: load_build — decode a PoB export code or pobb.in URL get_stats — computed character stats (life, mana, damage, resists, …) get_passives — allocated passive nodes (with names/stats if tree data is loaded) get_items — equipped items and their mods get_skills — skill socket groups and gem links search_passives — find allocated passives matching a keyword search_tree — find any node in the full passive tree (allocated or not) """