Locate text in a Word document and return bound locators.
Use describe("docx.inspect.find") when your code needs the complete live JSON Schemas.
At a glance
| Property | Value |
|---|---|
| Package | @runstamp/docx |
| Domain / verb | docx / inspect |
| Customer jobs | read, review |
| Deterministic | Yes |
| Side effects | none |
Availability
| Local | SDK | CLI | MCP | Managed API |
|---|---|---|---|---|
| public ga | public ga | public ga | public ga | public ga |
Managed API route: POST /api/v2/operations/docx/inspect/find. Managed execution requires a free-trial workspace or an active Platform or Enterprise workspace, and an environment-bound API key.
Input and result
| Schema | Required fields | Optional fields |
|---|---|---|
| Input | document, query | caseSensitive, visibility |
| Options | none | deterministic, deterministicSeed, timeoutMs, locale, lossPolicy, limits, operation |
| Result value | output, artifacts | none |
Every success also carries losses, diagnostics, and a hash-bound receipt.
Defaults, limits, and format constraints
Defaults
| Path | Default |
|---|---|
$.deterministic | default=true |
$.lossPolicy | default="collect" |
Formats and profiles
| Path | Constraint |
|---|---|
$.document.oneOf[0].schemaVersion | const=1 |
$.document.oneOf[1].schemaVersion | const=1 |
$.document.oneOf[1].mediaType | const="application/vnd.openxmlformats-officedocument.wordprocessingml.document" |
Other limits
| Path | Constraint |
|---|---|
$.document.oneOf[0].artifactId | minLength=1 |
$.document.oneOf[0].sourceSha256 | pattern="^[0-9a-f]{64}$" |
$.document.oneOf[0].inspection.sha256 | pattern="^[0-9a-f]{64}$" |
$.document.oneOf[0].inspection.byteLength | minimum=0 |
$.document.oneOf[0].inspection.entryCount | minimum=0 |
$.document.oneOf[0].inspection.uncompressedBytes | minimum=0 |
$.document.oneOf[0].inspection.features.sections | minimum=0 |
$.document.oneOf[0].inspection.features.paragraphs | minimum=0 |
$.document.oneOf[0].inspection.features.runs | minimum=0 |
$.document.oneOf[0].inspection.features.tables | minimum=0 |
$.document.oneOf[0].inspection.features.styles | minimum=0 |
$.document.oneOf[0].inspection.features.numberingDefinitions | minimum=0 |
$.document.oneOf[0].inspection.features.headers | minimum=0 |
$.document.oneOf[0].inspection.features.footers | minimum=0 |
$.document.oneOf[0].inspection.features.footnotes | minimum=0 |
$.document.oneOf[0].inspection.features.endnotes | minimum=0 |
$.document.oneOf[0].inspection.features.comments | minimum=0 |
$.document.oneOf[0].inspection.features.trackedInsertions | minimum=0 |
$.document.oneOf[0].inspection.features.trackedDeletions | minimum=0 |
$.document.oneOf[0].inspection.features.hyperlinks | minimum=0 |
$.document.oneOf[0].inspection.warnings[].code | pattern="^[A-Z][A-Z0-9_]{2,127}$" |
$.document.oneOf[0].inspection.warnings[].message | minLength=1 |
$.document.oneOf[0].inspection.warnings[].locator.artifactId | minLength=1maxLength=256 |
$.document.oneOf[0].inspection.warnings[].locator.value | minItems=8maxItems=8 |
$.document.oneOf[0].inspection.warnings[].locator.value[].anyOf[1] | minimum=0 |
$.document.oneOf[0].inspection.losses[].code | pattern="^[A-Z][A-Z0-9_]{2,127}$" |
$.document.oneOf[0].inspection.losses[].message | minLength=1 |
$.document.oneOf[0].inspection.losses[].locator.artifactId | minLength=1maxLength=256 |
$.document.oneOf[0].inspection.losses[].locator.value | minItems=8 |
Showing 32 of 90 constraints. Use describe() or the machine-readable reference for the complete schema.
Invoke
const input = await fetch("https://runstamp.com/demo-evidence/operation-evidence/docx/docx.inspect.find/input.json").then((response) => response.json());
const result = await runstamp.run("docx.inspect.find", input);
if (!result.ok) throw new Error(`${result.error.code}: ${result.error.remediation}`);
console.log(result.value, result.losses, result.diagnostics, result.receipt);curl -fsS https://runstamp.com/demo-evidence/operation-evidence/docx/docx.inspect.find/input.json -o input.json
npx -p @runstamp/sdk runstamp ops invoke docx.inspect.find --input input.json{
"tool": "runstamp_invoke_operation",
"arguments": {
"operation": "docx.inspect.find",
"input": "<JSON from https://runstamp.com/demo-evidence/operation-evidence/docx/docx.inspect.find/input.json>",
"execution_mode": "local"
}
}Errors and losses
Declared errors (18)
docx/INVALID_INPUTdocx/RESOURCE_LIMITdocx/TIMEOUTdocx/DOCX_INVALID_PACKAGEdocx/DOCX_ENCRYPTED_INPUTdocx/DOCX_ARCHIVE_LIMITdocx/DOCX_UNSAFE_ARCHIVE_PATHdocx/DOCX_XML_LIMITdocx/DOCX_INVALID_LOCATORdocx/DOCX_STALE_LOCATORdocx/DOCX_PRESERVATION_NOT_VERIFIEDdocx/DOCX_OPERATION_FAILEDdocx/SCHEMA_REJECTEDcommon/SCHEMA_REJECTEDcommon/OPERATION_CANCELLEDcommon/OPERATION_TIMEOUTcommon/CONTRACT_VIOLATIONdocx/LOSS_POLICY_VIOLATED
Declared losses (1)
docx/DOCX_OPAQUE_PART_PRESERVED
SDK AbortSignal, CLI exit 130, and MCP cancellation return the typed common/OPERATION_CANCELLED failure envelope.
Verified example and exact contract
- Fixture:
icp-workflow(Rendered Q2 business review). - Example input — SHA-256
33e4b49d9afc7a213bde2a82bd24f953bb67353396169bf7fca40065cdb1114f. - Example result — SHA-256
06d3ecfca524fab92a0da1871b4359023648025cf6d20c52714bba04d9926b3b. - Verified result SHA-256:
e0d802bcf640652f8360343f1450b448cec08734dbd0a8c6b6da134714b24317. - Qualification lane:
10-pptx-docx.
Contract fingerprints
- Descriptor:
67e179fac4c953282d26b5668463ec676fa9a461863a26327d281964bd574de1. - Input schema:
e98d4e4819bd810e279b8edd3e254b29e23c09d7c6d8212888e698e0939372b1. - Options schema:
5701b00d86b43b05a2fd0fbf371e751251acc6e0b48458ab0e53fc46484120a0. - Result value schema:
58f445d2b2a1590addbda49ee545ff9e35d35bbdaae16cd01bb31e450df768bd.
The machine-readable operation reference publishes the complete schemas, qualification results, and evidence bindings for every operation.