You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The OOXML spec, explained by people who actually implemented it.
@@ -23,16 +23,41 @@ We faced this at SuperDoc — building a document engine on native OOXML with no
23
23
24
24
## MCP Server
25
25
26
-
Ask questions in natural language and get answers grounded in the spec, or query the schema graph for precise structural answers.
26
+
Ask questions in natural language and get answers grounded in the spec, or query the schema graph for precise structural answers. Works with Claude Code, Codex CLI, Cursor, and any MCP-compatible client.
27
+
28
+
**Claude Code**
29
+
30
+
```bash
31
+
claude mcp add --transport http ooxml https://api.ooxml.dev/mcp
32
+
```
33
+
34
+
**Codex CLI**
27
35
28
36
```bash
29
-
claude mcp add --transport http ecma-spec https://api.ooxml.dev/mcp
/** Shape of an MCP tool definition. Shared with OOXML_TOOL_DEFS so a future
41
+
* field added to one (annotations, outputSchema, etc.) widens both arrays. */
42
+
exportinterfaceToolDef{
43
+
name: string;
44
+
description: string;
45
+
inputSchema: {
46
+
type: "object";
47
+
properties: Record<string,unknown>;
48
+
required?: string[];
49
+
};
50
+
}
51
+
40
52
// Tool definitions
41
-
constTOOLS=[
53
+
exportconstTOOLS: ToolDef[]=[
42
54
{
43
-
name: "search_ecma_spec",
55
+
name: "ooxml_search",
44
56
description:
45
57
"Semantic search across the ECMA-376 (Office Open XML) specification. Returns relevant sections based on natural language queries about WordprocessingML, SpreadsheetML, PresentationML, and more.",
46
58
inputSchema: {
@@ -61,7 +73,7 @@ const TOOLS = [
61
73
},
62
74
},
63
75
{
64
-
name: "get_section",
76
+
name: "ooxml_section",
65
77
description:
66
78
"Get a specific section of the ECMA-376 specification by section ID (e.g., '17.3.2' for paragraph properties).",
67
79
inputSchema: {
@@ -77,7 +89,7 @@ const TOOLS = [
77
89
},
78
90
},
79
91
{
80
-
name: "list_parts",
92
+
name: "ooxml_parts",
81
93
description: "List ECMA-376 specification parts and their top-level sections.",
82
94
inputSchema: {
83
95
type: "object"asconst,
@@ -124,11 +136,11 @@ function handleInitialize(id: number | string | null): JsonRpcResponse {
124
136
tools: {},
125
137
},
126
138
serverInfo: {
127
-
name: "ecma-spec",
139
+
name: "ooxml",
128
140
version: "0.1.0",
129
141
},
130
142
instructions:
131
-
"ECMA-376 (Office Open XML) specification search server. Use search_ecma_spec for semantic search, get_section for specific sections, or list_parts to browse the spec structure.",
143
+
"OOXML (ECMA-376 / Office Open XML) reference server. Two tool families: prose search over the spec PDFs (ooxml_search, ooxml_section, ooxml_parts) and deterministic schema lookup over the parsed XSDs (ooxml_element, ooxml_type, ooxml_children, ooxml_attributes, ooxml_enum, ooxml_namespace).",
132
144
},
133
145
};
134
146
}
@@ -173,7 +185,7 @@ async function handleToolsCall(
173
185
}
174
186
175
187
switch(name){
176
-
case"search_ecma_spec": {
188
+
case"ooxml_search": {
177
189
constquery=args?.queryasstring;
178
190
constpart=args?.partasnumber|undefined;
179
191
constlimit=Math.min((args?.limitasnumber)||5,20);
@@ -194,7 +206,7 @@ async function handleToolsCall(
194
206
break;
195
207
}
196
208
197
-
case"get_section": {
209
+
case"ooxml_section": {
198
210
constsectionId=args?.section_idasstring;
199
211
constpart=args?.partasnumber|undefined;
200
212
@@ -213,7 +225,7 @@ async function handleToolsCall(
0 commit comments