Skip to main content
Glama

read_xml

Parses XML files from the Noita game data directory into a nested dictionary for reading spell, entity, and config definitions, with node limits to control output size.

Instructions

把 XML 解析成嵌套字典返回。

属性直接平铺为键;同名子节点合并成数组;文本放在 "_text"。 max_nodes 限制节点总数,超出部分标记 "_truncated"。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYes
max_nodesNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.4/5.0
Behavior3/5

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

With no annotations, the description carries the full burden. It usefully discloses output behavior (attributes flattened, same-name children merged into arrays, text under '_text') and the novel truncation behavior with max_nodes, which is not derivable from the schema. It omits error handling, encoding assumptions, and read-only semantics.

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?

Four terse lines, front-loaded with the core purpose followed by the mapping and truncation rules. Every sentence carries distinct information with no filler.

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?

An output schema exists, so return values need not be explained, yet the description adds useful structural detail anyway. Together with the max_nodes explanation and truncation semantics, the definition is sufficient for correct invocation; only error/encoding edge cases are unaddressed.

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 0%, so the description must compensate. It explains max_nodes well ('限制节点总数,超出部分标记 _truncated'), clarifying both its meaning and its effect. The required 'path' parameter is left entirely to inference, though its meaning is self-evident.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb+resource ('把 XML 解析成嵌套字典返回' - parse XML into a nested dict) and even details the transformation mapping rules, so the purpose is unambiguous. It does not, however, explicitly distinguish itself from the sibling read_text, leaving that differentiation to inference.

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

Usage Guidelines2/5

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

There is no guidance on when to use this tool versus alternatives such as read_text or search. The XML-specific nature implies a use case, but no explicit condition, prerequisite, or exclusion is stated.

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