Tools

Generated from the tools/list answer (server name sezzlee-xml) of @sezzlee/xml-mcp 0.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.

ArgumentTypeRequiredDescription
subdirectorystringFolder under the root to list.
patternstringGlob over the relative path, for example build/*.csproj.
maxResultsinteger (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.

ArgumentTypeRequiredDescription
filePathstringyesDocument path relative to the root, as returned by list_documents.
maxPathsinteger (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.

ArgumentTypeRequiredDescription
filePathstringyesDocument path relative to the root, as returned by list_documents.
addressarray 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[].namespaceUristringyesNamespace URI of the element. Empty string means no namespace.
address[].localNamestring (≥ 1 chars)yesLocal name of the element.
address[].occurrenceinteger (≥ 1)1-based position among element siblings sharing this expanded name, default 1.
maxDepthinteger (0–128)Levels below the addressed node to descend, default unlimited within the depth ceiling. 0 returns that node alone.
maxNodesinteger (1–200)Maximum records in one page, default 50. The response byte budget may stop the page earlier.
cursorstringnextCursor 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.

ArgumentTypeRequiredDescription
filePathstringyesDocument path relative to the root, as returned by list_documents.
querystring (≥ 1 chars)yesLiteral 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.
scopeAddressarray of object (≤ 128 items)Restrict the scan to this element's subtree.
scopeAddress[].namespaceUristringyesNamespace URI of the element. Empty string means no namespace.
scopeAddress[].localNamestring (≥ 1 chars)yesLocal name of the element.
scopeAddress[].occurrenceinteger (≥ 1)1-based position among element siblings sharing this expanded name, default 1.
maxResultsinteger (1–200)Maximum matches in one page, default 50.
cursorstringnextCursor 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.

ArgumentTypeRequiredDescription
filePathstringyesDocument path relative to the root, as returned by list_documents.
xpathstring (1–4096 chars)yesXPath 1.0 expression.
namespacesarray 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[].prefixstring, pattern "^[A-Za-z_][A-Za-z0-9_.-]*$"yesPrefix as written in the expression. Use the alias describe_document returned.
namespaces[].uristring (≥ 1 chars)yesNamespace URI the prefix stands for.
maxResultsinteger (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.
cursorstringnextCursor 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.

ArgumentTypeRequiredDescription
filePathstringyesDocument path relative to the root, as returned by list_documents.
itemAddressobjectyesThe 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.ancestorsarray of object (1–128 items)yesSingular path to the element that holds the records, from the document element inclusive.
itemAddress.ancestors[].namespaceUristringyesNamespace URI of the element. Empty string means no namespace.
itemAddress.ancestors[].localNamestring (≥ 1 chars)yesLocal name of the element.
itemAddress.ancestors[].occurrenceinteger (≥ 1)1-based position among element siblings sharing this expanded name, default 1.
itemAddress.nameobjectyesExpanded name of the repeated child. Every child of the holder with this name is one record.
itemAddress.name.namespaceUristringyesNamespace URI of the element. Empty string means no namespace.
itemAddress.name.localNamestring (≥ 1 chars)yesLocal name of the element.
columnsarray of object (1–32 items)yesColumns to read from each record. where, groupBy and metrics name a column by its label.
columns[].labelstring (1–64 chars)yesName for this column in the response. Must be unique.
columns[].ancestorsarray of object (≤ 16 items)Singular path from the record element, default the record itself.
columns[].ancestors[].namespaceUristringyesNamespace URI of the element. Empty string means no namespace.
columns[].ancestors[].localNamestring (≥ 1 chars)yesLocal name of the element.
columns[].ancestors[].occurrenceinteger (≥ 1)1-based position among element siblings sharing this expanded name, default 1.
columns[].nameobjectTerminal 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.namespaceUristringyesNamespace URI of the element. Empty string means no namespace.
columns[].name.localNamestring (≥ 1 chars)yesLocal name of the element.
columns[].valueone of the variants belowtext (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").namespaceUristringyesNamespace URI of the attribute. Empty string means no namespace, which is where an unprefixed attribute lives.
columns[].value (from: "attribute").localNamestring (≥ 1 chars)yesLocal 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.
wherearray 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[].columnstring (≥ 1 chars)yesLabel of a declared column.
where[].op"eq" | "ne" | "contains" | "startsWith" | "endsWith" | "in" | "isEmpty" | "isNotEmpty" | "isMissing" | "isPresent"yeseq, 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[].valuestringOperand of eq, ne, contains, startsWith and endsWith, compared as text.
where[].valuesarray 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.
caseSensitivebooleanCase-sensitive comparison, default true. XML names and values are case-sensitive; false lowercases both sides and does not fold accents.
maxRowsinteger (1–200)Maximum rows in one page, default 50. The response byte budget may stop the page earlier.
cursorstringnextCursor 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.

ArgumentTypeRequiredDescription
filePathstringyesDocument path relative to the root, as returned by list_documents.
itemAddressobjectyesThe 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.ancestorsarray of object (1–128 items)yesSingular path to the element that holds the records, from the document element inclusive.
itemAddress.ancestors[].namespaceUristringyesNamespace URI of the element. Empty string means no namespace.
itemAddress.ancestors[].localNamestring (≥ 1 chars)yesLocal name of the element.
itemAddress.ancestors[].occurrenceinteger (≥ 1)1-based position among element siblings sharing this expanded name, default 1.
itemAddress.nameobjectyesExpanded name of the repeated child. Every child of the holder with this name is one record.
itemAddress.name.namespaceUristringyesNamespace URI of the element. Empty string means no namespace.
itemAddress.name.localNamestring (≥ 1 chars)yesLocal name of the element.
columnsarray of object (1–32 items)yesColumns to read from each record. where, groupBy and metrics name a column by its label.
columns[].labelstring (1–64 chars)yesName for this column in the response. Must be unique.
columns[].ancestorsarray of object (≤ 16 items)Singular path from the record element, default the record itself.
columns[].ancestors[].namespaceUristringyesNamespace URI of the element. Empty string means no namespace.
columns[].ancestors[].localNamestring (≥ 1 chars)yesLocal name of the element.
columns[].ancestors[].occurrenceinteger (≥ 1)1-based position among element siblings sharing this expanded name, default 1.
columns[].nameobjectTerminal 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.namespaceUristringyesNamespace URI of the element. Empty string means no namespace.
columns[].name.localNamestring (≥ 1 chars)yesLocal name of the element.
columns[].valueone of the variants belowtext (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").namespaceUristringyesNamespace URI of the attribute. Empty string means no namespace, which is where an unprefixed attribute lives.
columns[].value (from: "attribute").localNamestring (≥ 1 chars)yesLocal 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.
groupByarray of string (≥ 1 chars) (≤ 16 items)Labels of declared columns to group by. Omit for one whole-set total.
metricsarray of object (1–16 items)yesValues to compute. Each metric becomes one output column after the groupBy columns.
metrics[].fn"count" | "countValues" | "countDistinct" | "sum" | "avg" | "min" | "max"yescount 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[].columnstring (≥ 1 chars)Label of a declared column. Required for every metric except count.
wherearray 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[].columnstring (≥ 1 chars)yesLabel of a declared column.
where[].op"eq" | "ne" | "contains" | "startsWith" | "endsWith" | "in" | "isEmpty" | "isNotEmpty" | "isMissing" | "isPresent"yeseq, 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[].valuestringOperand of eq, ne, contains, startsWith and endsWith, compared as text.
where[].valuesarray 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.
caseSensitivebooleanCase-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.
orderByMetricinteger (≥ 1)One-based index into metrics, default 1.
descendingbooleanDescending order, default false.
maxGroupsinteger (1–200)Maximum groups returned, default 50. groupCount still reports every group the scan found.