stetdocdocs

MCP tools

View as markdown

Each tool is a command of the CLI, and each description is the one tools/list sends. Every tool also returns its result as JSON in structuredContent.

ToolDescriptionArguments
unpackWrite a working copy of a .docx. Not needed to edit: replace, comment and edit change a .docx in one call. Unpack only to edit the files with your own tools, then pack.input (required), output, refresh
packWrite a working copy's edits into the .docx as tracked changes, validated. On stale_target, unpack again rather than force.dir (required), author, date, detail, done, force, no_track, output
viewRead a .docx: pages of about 3000 tokens (pass after: the page's next), the outline of a long body, a range, clauses, revisions, comments, or find: a line per matching paragraph with its ref, the cheap way to locate text. Use one of outline, range, clause, revisions, comments, story; find also goes with range, story or revisions.input (required), after, all, author, budget, clause, comments, context, depth, find, full, kind, mode, no_notes, open, outline, range, resolved, revisions, story
inspectShow a block's effective formatting and where it comes from, or the styles, numbering or sections.input (required), target (required)
editChange a .docx in one call: all its operations and comments together, applied all or none. A refused call changes nothing and says why, so never dry-run first. Refs (p42, t3, c3) come from view. A .docx needs no base, unpack, pack or check: it goes to NAME.edited.docx unless output or in_place says where, and it is validated as written. Op fields: skills_get name operations. For text changes or comments, replace and comment need no refs.input (required), author, base, batch, date, detail, dry_run, in_place, manual, manual_color, no_track, ops, ops_file, output, quotes, scope
replaceReplace text in a .docx as tracked changes in one call, no refs needed: put every change in pairs. Each old must be in the document once, or nothing is written and the error lists each place: retry with all: true for every one, a range, or a longer old. Empty new deletes. Goes to NAME.edited.docx unless output or in_place; it is validated as written, so no check or dry run is needed.input (required), pairs (required), all, author, clause, date, detail, dry_run, expect, ignore_case, in_place, manual, manual_color, output, quotes, range
commentComment on text in a .docx in one call, no refs needed: anchor and text for one, comments for several, all or none. Each anchor must be there once, as for replace (all: true for every one). Goes to NAME.edited.docx unless output or in_place. To reply or resolve, use edit.input (required), all, anchor, author, clause, comments, date, detail, dry_run, expect, ignore_case, in_place, output, quotes, range, text
compareWrite a redline of two documents as tracked changes.original (required), output (required), revised (required), author, date
checkOnly for a .docx stetdoc did not write, or hand edits of a working copy: stetdoc validates what it writes.input (required), all, author, date, strict
lookupFind a defined term, a cross-reference, or what refers to a clause.input (required), query (required)
skills_getThe guide: core (workflow, rules), operations (op fields), errors (what each code means).full, name

unpack

Write a working copy of a .docx. Not needed to edit: replace, comment and edit change a .docx in one call. Unpack only to edit the files with your own tools, then pack.

ArgumentTypeRequiredMeaning
inputstringyesThe .docx, or with refresh a working copy.
outputstringnoThe working copy to write, instead of NAME.stet beside the .docx.
refreshbooleannoRender a working copy again, dropping unpacked hand edits.

pack

Write a working copy's edits into the .docx as tracked changes, validated. On stale_target, unpack again rather than force.

ArgumentTypeRequiredMeaning
dirstringyesThe working copy.
authorstringnoThe author, if not the server's.
datestringnoYYYY-MM-DDTHH:MM:SS.
detailbooleannoThe whole receipt, not a summary of about 2 KB.
donebooleannoRemove the working copy once the .docx is written.
forcebooleannoOverwrite an output this working copy did not write.
no_trackbooleannoUntracked: only for a document not under review.
outputstringnoThe .docx to write, instead of NAME.edited.docx.

view

Read a .docx: pages of about 3000 tokens (pass after: the page's next), the outline of a long body, a range, clauses, revisions, comments, or find: a line per matching paragraph with its ref, the cheap way to locate text. Use one of outline, range, clause, revisions, comments, story; find also goes with range, story or revisions.

ArgumentTypeRequiredMeaning
inputstringyesThe .docx, or a working copy.
afterstringnoThe next of the previous page.
allbooleannoEverything on one page.
authorstringnoWith revisions or comments: only this author.
budgetintegernoThe page size in tokens; 0 is everything.
clausearray of stringsnoThe blocks of these clauses, such as 12.3.
commentsbooleannoThe comment threads.
contextintegernoWith find or revisions: whole blocks, with N on each side.
depthintegernoWith outline: the deepest level.
findarray of stringsnoParagraphs holding any of these texts, one line each with its ref.
fullbooleannoWith revisions: the whole changed text.
kindstringnoWith revisions: insert, delete, move or format.
modeone of final, original, redlinenoHow tracked changes show. Default redline.
no_notesbooleannoLeave out the margin notes.
openbooleannoWith comments: only open threads.
outlinebooleannoThe headings only.
rangestringnoThe blocks from one ref to another, such as p40..p60.
resolvedbooleannoWith comments: only resolved threads.
revisionsbooleannoThe tracked changes, one line each.
storyone of body, notes, headers, commentsnoOne story whole, or with find, only its matches.

inspect

Show a block's effective formatting and where it comes from, or the styles, numbering or sections.

ArgumentTypeRequiredMeaning
inputstringyesThe .docx, or a working copy.
targetstringyesA ref (p42, t3, r17), or styles, numbering or sections.

edit

Change a .docx in one call: all its operations and comments together, applied all or none. A refused call changes nothing and says why, so never dry-run first. Refs (p42, t3, c3) come from view. A .docx needs no base, unpack, pack or check: it goes to NAME.edited.docx unless output or in_place says where, and it is validated as written. Op fields: skills_get name operations. For text changes or comments, replace and comment need no refs.

ArgumentTypeRequiredMeaning
inputstringyesThe .docx, or a working copy.
authorstringnoThe author, if not the server's.
basestringnoThe base token of the view or receipt the refs come from: for a working copy, not a .docx.
batchstringnoThe operations as block text or JSON, instead of ops.
datestringnoYYYY-MM-DDTHH:MM:SS.
detailbooleannoThe whole receipt, not a summary of about 2 KB.
dry_runbooleannoWrite nothing. Rarely needed: a refusal writes nothing.
in_placebooleannoWrite back to the input: only a file the user asked to update or this task wrote.
manualbooleannoStrike and underline, not tracked: only if the user asks.
manual_colorbooleannoAs manual, in red and blue.
no_trackbooleannoUntracked: only for a document not under review.
opsarray of objectsnoThe operations, in order, all applied or none.
ops_filestringnoA file holding the batch, instead of ops.
outputstringnoThe .docx to write, instead of NAME.edited.docx.
quotesone of match, as-typednoQuotes. Default match.
scopearray of stringsnoRefuse the batch if it changes anything outside these refs, such as p40..p60.

replace

Replace text in a .docx as tracked changes in one call, no refs needed: put every change in pairs. Each old must be in the document once, or nothing is written and the error lists each place: retry with all: true for every one, a range, or a longer old. Empty new deletes. Goes to NAME.edited.docx unless output or in_place; it is validated as written, so no check or dry run is needed.

ArgumentTypeRequiredMeaning
inputstringyesThe .docx, or a working copy.
pairsarray of {new, old}yesEach old text and the new text it becomes.
allbooleannoReplace every occurrence of each old.
authorstringnoThe author, if not the server's.
clausearray of stringsnoLook only in these clauses, such as 11.1.
datestringnoYYYY-MM-DDTHH:MM:SS.
detailbooleannoThe whole receipt, not a summary of about 2 KB.
dry_runbooleannoWrite nothing. Rarely needed: a refusal writes nothing.
expectintegernoEvery occurrence, only if there are exactly N.
ignore_casebooleannoMatch whatever the case.
in_placebooleannoWrite back to the input: only a file the user asked to update or this task wrote.
manualbooleannoStrike and underline, not tracked: only if the user asks.
manual_colorbooleannoAs manual, in red and blue.
outputstringnoThe .docx to write, instead of NAME.edited.docx.
quotesone of match, as-typednoQuotes. Default match.
rangestringnoLook only in these blocks, such as p40..p60.

comment

Comment on text in a .docx in one call, no refs needed: anchor and text for one, comments for several, all or none. Each anchor must be there once, as for replace (all: true for every one). Goes to NAME.edited.docx unless output or in_place. To reply or resolve, use edit.

ArgumentTypeRequiredMeaning
inputstringyesThe .docx, or a working copy.
allbooleannoComment on every occurrence of each anchor.
anchorstringnoThe text to comment on.
authorstringnoThe author, if not the server's.
clausearray of stringsnoLook only in these clauses, such as 11.1.
commentsarray of {anchor, text}noSeveral comments, each an anchor and a text.
datestringnoYYYY-MM-DDTHH:MM:SS.
detailbooleannoThe whole receipt, not a summary of about 2 KB.
dry_runbooleannoWrite nothing. Rarely needed: a refusal writes nothing.
expectintegernoEvery occurrence, only if there are exactly N.
ignore_casebooleannoMatch whatever the case.
in_placebooleannoWrite back to the input: only a file the user asked to update or this task wrote.
outputstringnoThe .docx to write, instead of NAME.edited.docx.
quotesone of match, as-typednoQuotes. Default match.
rangestringnoLook only in these blocks, such as p40..p60.
textstringnoThe comment.

compare

Write a redline of two documents as tracked changes.

ArgumentTypeRequiredMeaning
originalstringyesThe original document.
outputstringyesThe redline to write.
revisedstringyesThe revised document.
authorstringnoThe author, if not the server's.
datestringnoYYYY-MM-DDTHH:MM:SS.

check

Only for a .docx stetdoc did not write, or hand edits of a working copy: stetdoc validates what it writes.

ArgumentTypeRequiredMeaning
inputstringyesThe .docx, or a working copy.
allbooleannoList up to 200 findings, not 20.
authorstringnoThe author, if not the server's.
datestringnoYYYY-MM-DDTHH:MM:SS.
strictbooleannoFail on any violation, old ones too.

lookup

Find a defined term, a cross-reference, or what refers to a clause.

ArgumentTypeRequiredMeaning
inputstringyesThe .docx, or a working copy.
querystringyesA ref, a clause number or a defined term.

skills_get

The guide: core (workflow, rules), operations (op fields), errors (what each code means).

ArgumentTypeRequiredMeaning
fullbooleannoEvery part of the skill.
namestringnocore (the default), operations or errors.