Tools
Generated from the
tools/listanswer (server namesezzlee-xml) of@sezzlee/xml-mcp0.5.1.
The descriptions are the text the server publishes to every client, so your agent reads exactly what this page shows. Every input schema is closed: an argument a tool does not list here, or a value of the wrong type, is refused with invalid_argument and never silently ignored.
7 tools: list_documents, describe_document, read_node, find_in_document, select_xpath, project_records, aggregate_document.
list_documents
List readable XML documents under the server root. Returns filePath values that other tools accept verbatim. The listing never parses a file, so a listed path is a candidate, not a guarantee of well-formed XML. totalExact distinguishes a complete total; scanTruncated is separate from the result page limit.
Annotations: read-only, idempotent, closed world.
| Argument | Type | Required | Description |
|---|---|---|---|
subdirectory | string | Folder under the root to list. | |
pattern | string | Glob over the relative path, for example build/*.csproj. | |
maxResults | integer (1–200) | Maximum returned files, default 50. Does not increase the traversal budget. |
describe_document
Summarise one XML document: the document element, every namespace with a stable alias, a bounded structure count, repeated-element candidates and an address read_node accepts. Repetition candidates are observations, not a schema. Counts carry an exact flag; a sampled count says so.
Annotations: read-only, idempotent, closed world.
| Argument | Type | Required | Description |
|---|---|---|---|
filePath | string | yes | Document path relative to the root, as returned by list_documents. |
maxPaths | integer (1–200) | Maximum repetition candidates and mixed-content examples, default 20. |
read_node
Read a bounded, ordered slice of one document as flat depth-first records. Every record carries nodeId, parentId and childIndex, so text, element, comment and processing-instruction order survives a page boundary. Values are returned as written: no trimming, no number or date conversion. An element held back by maxDepth is marked childrenOmitted and needs its own call with that address; the cursor never delivers it.
Annotations: read-only, idempotent, closed world.
| Argument | Type | Required | Description |
|---|---|---|---|
filePath | string | yes | Document path relative to the root, as returned by list_documents. |
address | array of object (≤ 128 items) | Segment path from the document element inclusive. Not an XPath expression; describe_document returns one you can pass straight back. | |
address[].namespaceUri | string | yes | Namespace URI of the element. Empty string means no namespace. |
address[].localName | string (≥ 1 chars) | yes | Local name of the element. |
address[].occurrence | integer (≥ 1) | 1-based position among element siblings sharing this expanded name, default 1. | |
maxDepth | integer (0–128) | Levels below the addressed node to descend, default unlimited within the depth ceiling. 0 returns that node alone. | |
maxNodes | integer (1–200) | Maximum records in one page, default 50. The response byte budget may stop the page earlier. | |
cursor | string | nextCursor from a previous read_node response. Cannot be combined with address. |
find_in_document
Find literal text in one document's text nodes and attribute values. Case-sensitive and literal: the query is never treated as a regular expression or a query language. totalMatches appears only when the scan finished; a stopped scan reports scannedCount and matchedSoFar instead.
Annotations: read-only, idempotent, closed world.
| Argument | Type | Required | Description |
|---|---|---|---|
filePath | string | yes | Document path relative to the root, as returned by list_documents. |
query | string (≥ 1 chars) | yes | Literal text to look for. Case-sensitive; not a pattern. |
matchMode | "contains" | "exact" | Substring match (default) or whole-value equality. | |
searchIn | "text" | "attributes" | "both" | Search text nodes (default), attribute values, or both. With both, a text hit and an attribute hit on the same element are reported separately. | |
scopeAddress | array of object (≤ 128 items) | Restrict the scan to this element's subtree. | |
scopeAddress[].namespaceUri | string | yes | Namespace URI of the element. Empty string means no namespace. |
scopeAddress[].localName | string (≥ 1 chars) | yes | Local name of the element. |
scopeAddress[].occurrence | integer (≥ 1) | 1-based position among element siblings sharing this expanded name, default 1. | |
maxResults | integer (1–200) | Maximum matches in one page, default 50. | |
cursor | string | nextCursor from a previous find_in_document response. Cannot be combined with scopeAddress. |
select_xpath
Evaluate one XPath 1.0 expression against a document. The expression is passed to the engine exactly as written: no rewriting, no namespace guessing, no extension functions, and nothing from XPath 2.0 or later. resultType separates a node-set from a string, number or boolean, so an empty node-set, an empty string, false and 0 all survive as themselves; a number carries numberKind so NaN and infinity are never a silent null. Node-set members are addressed where an address exists; a prolog comment and a namespace node carry unaddressable instead. Evaluation may materialise the whole node-set, so maxResults bounds the response, not the cost.
Annotations: read-only, idempotent, closed world.
| Argument | Type | Required | Description |
|---|---|---|---|
filePath | string | yes | Document path relative to the root, as returned by list_documents. |
xpath | string (1–4096 chars) | yes | XPath 1.0 expression. |
namespaces | array of object (≤ 32 items) | Prefix bindings for the expression. A prefix used but not bound is an error; the expression is never rewritten to guess one. | |
namespaces[].prefix | string, pattern "^[A-Za-z_][A-Za-z0-9_.-]*$" | yes | Prefix as written in the expression. Use the alias describe_document returned. |
namespaces[].uri | string (≥ 1 chars) | yes | Namespace URI the prefix stands for. |
maxResults | integer (1–200) | Maximum node-set members in one page, default 50. The response byte budget may stop the page earlier. Ignored for a string, number or boolean result. | |
cursor | string | nextCursor from a previous select_xpath response. The expression is evaluated again, so continuing costs what the first call cost. |
project_records
Turn a repeated element into rows and named columns. Values are returned as written: no trimming, no number or date conversion. A cell says which of four things happened: present, empty when the value exists and is the empty string, missing when the address matches nothing, and multiple when several nodes match and no policy chose one. Rows carry occurrence rather than a repeated address; a row's canonical address is itemParentAddress plus itemName at that occurrence.
Annotations: read-only, idempotent, closed world.
| Argument | Type | Required | Description |
|---|---|---|---|
filePath | string | yes | Document path relative to the root, as returned by list_documents. |
itemAddress | object | yes | The record set: singular ancestors plus one repeated child name. This is not an XPath expression and the wildcard applies to the repeated child only. |
itemAddress.ancestors | array of object (1–128 items) | yes | Singular path to the element that holds the records, from the document element inclusive. |
itemAddress.ancestors[].namespaceUri | string | yes | Namespace URI of the element. Empty string means no namespace. |
itemAddress.ancestors[].localName | string (≥ 1 chars) | yes | Local name of the element. |
itemAddress.ancestors[].occurrence | integer (≥ 1) | 1-based position among element siblings sharing this expanded name, default 1. | |
itemAddress.name | object | yes | Expanded name of the repeated child. Every child of the holder with this name is one record. |
itemAddress.name.namespaceUri | string | yes | Namespace URI of the element. Empty string means no namespace. |
itemAddress.name.localName | string (≥ 1 chars) | yes | Local name of the element. |
columns | array of object (1–32 items) | yes | Columns to read from each record. where, groupBy and metrics name a column by its label. |
columns[].label | string (1–64 chars) | yes | Name for this column in the response. Must be unique. |
columns[].ancestors | array of object (≤ 16 items) | Singular path from the record element, default the record itself. | |
columns[].ancestors[].namespaceUri | string | yes | Namespace URI of the element. Empty string means no namespace. |
columns[].ancestors[].localName | string (≥ 1 chars) | yes | Local name of the element. |
columns[].ancestors[].occurrence | integer (≥ 1) | 1-based position among element siblings sharing this expanded name, default 1. | |
columns[].name | object | Terminal child name. Every child with this name is a candidate, which is what onMultiple decides about. Omit to read the addressed element itself. | |
columns[].name.namespaceUri | string | yes | Namespace URI of the element. Empty string means no namespace. |
columns[].name.localName | string (≥ 1 chars) | yes | Local name of the element. |
columns[].value | one of the variants below | text (default) joins the element's own text and CDATA children without descending, and marks the cell mixed when the element also has element children; attribute reads one attribute; name reads the local name. | |
columns[].value (from: "text").from | "text" | yes | |
columns[].value (from: "attribute").from | "attribute" | yes | |
columns[].value (from: "attribute").namespaceUri | string | yes | Namespace URI of the attribute. Empty string means no namespace, which is where an unprefixed attribute lives. |
columns[].value (from: "attribute").localName | string (≥ 1 chars) | yes | Local name of the attribute. |
columns[].value (from: "name").from | "name" | yes | |
columns[].onMultiple | "error" | "list" | "first" | Several matches in one record: error (default) marks that cell multiple with a count and no value, list returns the values, first takes the first. No policy silently picks one. | |
where | array of object (≤ 16 items) | Row filter over declared columns. Comparisons are textual: a multiple cell never matches one, and no value is converted to a number. | |
where[].column | string (≥ 1 chars) | yes | Label of a declared column. |
where[].op | "eq" | "ne" | "contains" | "startsWith" | "endsWith" | "in" | "isEmpty" | "isNotEmpty" | "isMissing" | "isPresent" | yes | eq, ne, contains, startsWith and endsWith compare value as text; in matches any of values; isMissing and isPresent test whether the column's address matched; isEmpty and isNotEmpty test for the empty string. The last four take no operand. |
where[].value | string | Operand of eq, ne, contains, startsWith and endsWith, compared as text. | |
where[].values | array of string (1–64 items) | Operands of in: the cell matches if it equals any of them. | |
match | "all" | "any" | Combine conditions with all (default) or any. | |
caseSensitive | boolean | Case-sensitive comparison, default true. XML names and values are case-sensitive; false lowercases both sides and does not fold accents. | |
maxRows | integer (1–200) | Maximum rows in one page, default 50. The response byte budget may stop the page earlier. | |
cursor | string | nextCursor from a previous project_records response. Cannot be combined with different options. |
aggregate_document
Count and summarise a repeated element in one call, instead of paging the records. count needs no column and is always available. sum, avg, min and max require numericMode: binary64, which is an explicit acceptance that values become binary64 doubles: a value with more digits than that holds is refused rather than quietly changed, and values that cannot be represented exactly are counted in rounded. groupCount and matchedItems cover the whole scan even when maxGroups cuts the returned groups.
Annotations: read-only, idempotent, closed world.
| Argument | Type | Required | Description |
|---|---|---|---|
filePath | string | yes | Document path relative to the root, as returned by list_documents. |
itemAddress | object | yes | The record set: singular ancestors plus one repeated child name. This is not an XPath expression and the wildcard applies to the repeated child only. |
itemAddress.ancestors | array of object (1–128 items) | yes | Singular path to the element that holds the records, from the document element inclusive. |
itemAddress.ancestors[].namespaceUri | string | yes | Namespace URI of the element. Empty string means no namespace. |
itemAddress.ancestors[].localName | string (≥ 1 chars) | yes | Local name of the element. |
itemAddress.ancestors[].occurrence | integer (≥ 1) | 1-based position among element siblings sharing this expanded name, default 1. | |
itemAddress.name | object | yes | Expanded name of the repeated child. Every child of the holder with this name is one record. |
itemAddress.name.namespaceUri | string | yes | Namespace URI of the element. Empty string means no namespace. |
itemAddress.name.localName | string (≥ 1 chars) | yes | Local name of the element. |
columns | array of object (1–32 items) | yes | Columns to read from each record. where, groupBy and metrics name a column by its label. |
columns[].label | string (1–64 chars) | yes | Name for this column in the response. Must be unique. |
columns[].ancestors | array of object (≤ 16 items) | Singular path from the record element, default the record itself. | |
columns[].ancestors[].namespaceUri | string | yes | Namespace URI of the element. Empty string means no namespace. |
columns[].ancestors[].localName | string (≥ 1 chars) | yes | Local name of the element. |
columns[].ancestors[].occurrence | integer (≥ 1) | 1-based position among element siblings sharing this expanded name, default 1. | |
columns[].name | object | Terminal child name. Every child with this name is a candidate, which is what onMultiple decides about. Omit to read the addressed element itself. | |
columns[].name.namespaceUri | string | yes | Namespace URI of the element. Empty string means no namespace. |
columns[].name.localName | string (≥ 1 chars) | yes | Local name of the element. |
columns[].value | one of the variants below | text (default) joins the element's own text and CDATA children without descending, and marks the cell mixed when the element also has element children; attribute reads one attribute; name reads the local name. | |
columns[].value (from: "text").from | "text" | yes | |
columns[].value (from: "attribute").from | "attribute" | yes | |
columns[].value (from: "attribute").namespaceUri | string | yes | Namespace URI of the attribute. Empty string means no namespace, which is where an unprefixed attribute lives. |
columns[].value (from: "attribute").localName | string (≥ 1 chars) | yes | Local name of the attribute. |
columns[].value (from: "name").from | "name" | yes | |
columns[].onMultiple | "error" | "list" | "first" | Several matches in one record: error (default) marks that cell multiple with a count and no value, list returns the values, first takes the first. No policy silently picks one. | |
groupBy | array of string (≥ 1 chars) (≤ 16 items) | Labels of declared columns to group by. Omit for one whole-set total. | |
metrics | array of object (1–16 items) | yes | Values to compute. Each metric becomes one output column after the groupBy columns. |
metrics[].fn | "count" | "countValues" | "countDistinct" | "sum" | "avg" | "min" | "max" | yes | count counts records and needs no column. countValues counts records whose column matched, an empty value included; countDistinct counts its distinct values. sum, avg, min and max require numericMode: binary64. |
metrics[].column | string (≥ 1 chars) | Label of a declared column. Required for every metric except count. | |
where | array of object (≤ 16 items) | Row filter over declared columns. Comparisons are textual: a multiple cell never matches one, and no value is converted to a number. | |
where[].column | string (≥ 1 chars) | yes | Label of a declared column. |
where[].op | "eq" | "ne" | "contains" | "startsWith" | "endsWith" | "in" | "isEmpty" | "isNotEmpty" | "isMissing" | "isPresent" | yes | eq, ne, contains, startsWith and endsWith compare value as text; in matches any of values; isMissing and isPresent test whether the column's address matched; isEmpty and isNotEmpty test for the empty string. The last four take no operand. |
where[].value | string | Operand of eq, ne, contains, startsWith and endsWith, compared as text. | |
where[].values | array of string (1–64 items) | Operands of in: the cell matches if it equals any of them. | |
match | "all" | "any" | Combine conditions with all (default) or any. | |
caseSensitive | boolean | Case-sensitive comparison, default true. XML names and values are case-sensitive; false lowercases both sides and does not fold accents. | |
numericMode | "off" | "binary64" | off (default) offers only the counting metrics. binary64 enables sum, avg, min and max with double precision. | |
orderBy | "group" | "metric" | Order groups by group key (default) or by one metric. | |
orderByMetric | integer (≥ 1) | One-based index into metrics, default 1. | |
descending | boolean | Descending order, default false. | |
maxGroups | integer (1–200) | Maximum groups returned, default 50. groupCount still reports every group the scan found. |