mcp-server-ooxml
v0.0.7MCP server and agent skill giving AI agents offline, structured access to the ECMA-376 (Office Open XML) schema
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
ooxml_element Look up an OOXML element or attribute
The canonical record for a name: what kind of thing it is, the type it declares, its namespace in the requested profile, and which profiles it exists in. Start here when you have a name and need to know what it is. Returns several symbols when the name is declared in more than one place — that is normal in OOXML, where the same element name is declared locally inside many types and can carry a different type in each. If nothing matches, the reason distinguishes an unknown name from one that exists only in the other profile, because those need opposite next steps.
| Parameter | Type | Description |
|---|---|---|
qname * | string | A qualified name. Accepts w:tblPr, wml:tblPr, {namespace-uri}tblPr, or a bare tblPr. A bare or ambiguous name returns every match rather than guessing. |
profile | string | Which ECMA-376 profile to answer for. Default "transitional" — that is what Word, Excel and PowerPoint actually write, so it is almost always the right one. "strict" is the ISO profile: same vocabul… |
ooxml_children What may go inside this element, and in what order
The legal content model: the sequence/choice/all tree with each node's own cardinality, plus a flat list in schema order for the common case. This is the tool for "can I put this here, and where". Inheritance is resolved — for an extended type the base's children come first, and each entry names the type that contributed it. Group references are expanded in place, which matters because many DrawingML types have no direct children at all and consist entirely of a group reference. Cardinalities are the reference site's: min/max of -1 means unbounded. Accepts an element or a type name.
| Parameter | Type | Description |
|---|---|---|
qname * | string | A qualified name. Accepts w:tblPr, wml:tblPr, {namespace-uri}tblPr, or a bare tblPr. A bare or ambiguous name returns every match rather than guessing. |
profile | string | Which ECMA-376 profile to answer for. Default "transitional" — that is what Word, Excel and PowerPoint actually write, so it is almost always the right one. "strict" is the ISO profile: same vocabul… |
ooxml_attributes Attributes of an element or type
Every attribute the type accepts, including ones inherited from a base type and ones reached through attributeGroup references, all expanded and resolved. Each carries its use (optional/required/prohibited), its resolved type, any default or fixed value, and whether it is written with a namespace prefix — that last one varies across OOXML and getting it wrong produces a document that looks right and does not load. An empty list is a real answer: plenty of OOXML types carry their properties as child elements instead.
| Parameter | Type | Description |
|---|---|---|
qname * | string | A qualified name. Accepts w:tblPr, wml:tblPr, {namespace-uri}tblPr, or a bare tblPr. A bare or ambiguous name returns every match rather than guessing. |
profile | string | Which ECMA-376 profile to answer for. Default "transitional" — that is what Word, Excel and PowerPoint actually write, so it is almost always the right one. "strict" is the ISO profile: same vocabul… |
ooxml_values The legal value space of a simple type
What may actually be written: the base type, enumeration values, facets (pattern, minInclusive, maxInclusive, length and friends), and union members resolved recursively. Use this when writing a value rather than reading one — it is the difference between "it restricts xsd:string" and the pattern the string has to match. Also handles the measure types, which are unions, and reports inline union alternatives that have no name of their own. Accepts a simple type, or an element/attribute whose type you want.
| Parameter | Type | Description |
|---|---|---|
qname * | string | A qualified name. Accepts w:tblPr, wml:tblPr, {namespace-uri}tblPr, or a bare tblPr. A bare or ambiguous name returns every match rather than guessing. |
profile | string | Which ECMA-376 profile to answer for. Default "transitional" — that is what Word, Excel and PowerPoint actually write, so it is almost always the right one. "strict" is the ISO profile: same vocabul… |
ooxml_enum Enumeration values of a simple type
Just the enumerated values, in schema order. Narrower and cheaper than ooxml_values when you already know the type is an enumeration. If it is not enumerated this says so and points at ooxml_values rather than returning an empty list that reads like "no legal values".
| Parameter | Type | Description |
|---|---|---|
qname * | string | A qualified name. Accepts w:tblPr, wml:tblPr, {namespace-uri}tblPr, or a bare tblPr. A bare or ambiguous name returns every match rather than guessing. |
profile | string | Which ECMA-376 profile to answer for. Default "transitional" — that is what Word, Excel and PowerPoint actually write, so it is almost always the right one. "strict" is the ISO profile: same vocabul… |
ooxml_type Describe a complexType or simpleType
What a type derives from and by what relation (extension or restriction, and in which content model), plus a summary of its shape — its top-level compositors, how many direct children and group references it has, how many attributes. Use it to orient before asking for the full content model.
| Parameter | Type | Description |
|---|---|---|
qname * | string | A qualified name. Accepts w:tblPr, wml:tblPr, {namespace-uri}tblPr, or a bare tblPr. A bare or ambiguous name returns every match rather than guessing. |
profile | string | Which ECMA-376 profile to answer for. Default "transitional" — that is what Word, Excel and PowerPoint actually write, so it is almost always the right one. "strict" is the ISO profile: same vocabul… |
ooxml_search Find symbols by name substring
Substring match on symbol names, case-insensitive. This is a NAME search and not a semantic one — there are no embeddings here by design, so it will not find "how do I make text bold". Use it when you half-remember a name. For prose-level search over the specification text, this project deliberately does not compete: ooxml.dev does that.
| Parameter | Type | Description |
|---|---|---|
text * | string | A substring of the name, e.g. "tblPr" or "ST_Border". |
limit | integer | Default 40. |
profile | string | Which ECMA-376 profile to answer for. Default "transitional" — that is what Word, Excel and PowerPoint actually write, so it is almost always the right one. "strict" is the ISO profile: same vocabul… |
ooxml_namespace Resolve a namespace, prefix or vocabulary
Maps between namespace URIs, conventional prefixes and vocabularies, in both directions and for both profiles. The common use is working out which profile a document is in from a namespace URI it declares, or which URI to write for a prefix.
| Parameter | Type | Description |
|---|---|---|
query * | string | A namespace URI, a prefix like "w", or a vocabulary like "wml". |
ooxml_diff_profiles Transitional vs Strict for one symbol
What differs between the two profiles for a given name: namespace URI, the children and attributes allowed, enumeration values and union members. Strict is a subset — every difference is something Transitional adds back for legacy compatibility — so this answers "will this still be valid in Strict".
| Parameter | Type | Description |
|---|---|---|
qname * | string | A qualified name. Accepts w:tblPr, wml:tblPr, {namespace-uri}tblPr, or a bare tblPr. A bare or ambiguous name returns every match rather than guessing. |
ooxml_explain Resolve a validation diagnostic against the schema
Takes a schema validation diagnostic and answers the question that always follows it: then what WOULD be legal here. Pass the diagnostic's id, description and xpath — the four fields an ooxml-validate report already gives you. Returns what the finding means plus the legal attributes or the ordered content model at that position. The xpath is used to disambiguate: an element with several content models resolves to the right one from its ancestors. An unrecognised diagnostic id is not an error — it still answers what is legal at that position. With only a pasted message in hand, pass it as `…
| Parameter | Type | Description |
|---|---|---|
description | string | The diagnostic message; quoted names are read from it. |
id | string | The Open XML SDK id, e.g. "Sch_UndeclaredAttribute". |
partUri | string | The part inside the package, echoed back. |
profile | string | Which ECMA-376 profile to answer for. Default "transitional" — that is what Word, Excel and PowerPoint actually write, so it is almost always the right one. "strict" is the ISO profile: same vocabul… |
text | string | The diagnostic as pasted text, when there is no structured report. Use instead of id, description, xpath and partUri, not alongside them. |
xpath | string | Where the problem is, e.g. "/w:document[1]/w:body[1]/w:p[1]". |