Skip to main content

Crate oxml_mcp

Crate oxml_mcp 

Source
Expand description

oxml-mcp — a Model Context Protocol server for XML.

Four tools: query, validate, check, and inspect. The protocol is handled by rmcp, the official MCP SDK; this crate supplies the tools and the text a model reads.

Why a model wants this: an LLM asked to pull a value out of a large XML document otherwise has to read the whole thing into its context and pattern-match by eye. An XPath tool turns that into a question with an exact answer, and the document never needs to fit in the context window.

The four operations are plain functions – query, validate, check, inspect – and XmlServer is the handler that exposes them as MCP tools. Each answer is returned twice: as text for the model, and as a structured value for a client that wants to read it without parsing prose.

Structs§

CheckOutput
A well-formed document.
DocumentArgs
Arguments of xml_check and xml_inspect.
InspectOutput
The shape of a document.
QueryArgs
Arguments of xml_query.
QueryOutput
What an XPath expression selected.
ValidateArgs
Arguments of xml_validate.
ValidateOutput
The outcome of validating a document against a schema.
Violation
One schema violation.
XmlServer
The MCP server: the four tools over rmcp.

Functions§

check
Check whether a document is well-formed.
inspect
Summarise a document’s structure.
query
Evaluate an XPath 1.0 expression against a document.
validate
Validate a document against an XML Schema.