xpath_query
Run XPath queries against DOCX document parts with pre-bound namespaces to extract paragraphs, text content, or styled elements.
Instructions
Run XPath against any DOCX part. Pre-bound namespaces: w, w14, r, wp, a, mc.
Examples: xpath="//w:p" — all paragraphs xpath="//w:t/text()" — all text content xpath="//w:p[w:pPr/w:pStyle/@w:val='Heading1']" — Heading 1 paragraphs
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"xpath": "<xpath>"
},
"name": "xpath_query"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| part | No | word/document.xml | |
| xpath | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |