Skip to main content
Glama
Path of Building MCP Server

Path of Building MCP Server

by urbanvcode

classify_item_affixes

Resolve explicit item mod lines to their source prefixes and suffixes before crafting or rerolling; report matched counts, remaining slots, and hybrid affixes so hybrid lines are not miscounted.

Instructions

Resolve an item's explicit mod lines back to the affixes that produced them, using Path of Building's ModExplicit (legacy ModItem) and ModMaster tables. Reports matched prefix and suffix counts, remaining slots when the classification is complete and unambiguous, affix ranges and minimum item levels, and which lines belong to one hybrid affix. USE THIS BEFORE recommending any craft or reroll: one affix can print several lines, and counting those lines separately inverts the answer (a hybrid energy shield prefix also prints stun recovery, which reads like a suffix). LIMITS: explicit mods only. Unmatched lines may be unrecognized explicit affixes that still occupy slots. Remaining slots are reported as unknown when any lines are unmatched or ambiguous. An item whose lines admit more than one reading is flagged as ambiguous rather than guessed. Slot counts assume a rare, which holds three prefixes and three suffixes; a magic item holds one of each.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "mod_lines": "<mod_lines>"
    },
    "name": "classify_item_affixes"
  }
}

Input Schema

NameRequiredDescriptionDefault
mod_linesYesThe item's mod lines, one per entry, exactly as printed (e.g. '+42 to maximum Life'). PoB tags such as {crafted} are stripped automatically.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.1

TDQS

A4.4/5.0
Behavior5/5

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

With no annotations, the description carries the full burden and does so: it discloses exactly what is reported (prefix/suffix counts, remaining slots, affix ranges, min item levels, hybrid grouping), the scope limit (explicit mods only), and the failure modes (unmatched lines may still occupy slots; remaining slots reported unknown on ambiguity). It also states the rare-item slot assumption (3+3) versus magic (1+1), which is the kind of behavioral caveat annotations could never express.

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?

Purpose is front-loaded in the first sentence, followed by outputs, then a capitalized usage directive, then limits. Dense but nearly every clause carries operational meaning. The opening sentence is somewhat long and could be tightened, but nothing is genuinely redundant.

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?

There is no output schema, so the description must describe return content, and it enumerates the reported fields comprehensively. Combined with the ambiguity and unmatched-line handling and the slot-count assumption, an agent has everything needed to call it and interpret results without guessing.

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% for the single mod_lines parameter, and the schema already covers format ("exactly as printed") and PoB tag stripping. The description adds only the constraint that these must be explicit mod lines, which is modest incremental meaning. Baseline 3 is appropriate when the schema does the heavy lifting.

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?

"Resolve an item's explicit mod lines back to the affixes that produced them" gives a specific verb (resolve/classify) and resource (affix classification of mod lines), and names the data source (ModExplicit/ModMaster). This is clearly distinguishable from siblings like find_affix_tiers or list_craftable_mods, which concern tier lookup and craftable mod pools rather than reverse-mapping printed lines.

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?

"USE THIS BEFORE recommending any craft or reroll" gives an explicit trigger with a concrete rationale (one affix can print several lines, so naive line-counting inverts the answer). The LIMITS section clarifies scope (explicit mods only), which functions as a when-not condition. It does not name a specific sibling alternative, which keeps it just short of a 5.

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