@superdoc-dev/mcp 0.3.0-next.30 → 0.3.0-next.32
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +68 -68
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -51837,7 +51837,7 @@ var init_remark_gfm_BhnWr3yf_es = __esm(() => {
|
|
|
51837
51837
|
emptyOptions2 = {};
|
|
51838
51838
|
});
|
|
51839
51839
|
|
|
51840
|
-
// ../../packages/superdoc/dist/chunks/SuperConverter-
|
|
51840
|
+
// ../../packages/superdoc/dist/chunks/SuperConverter-25gYGkyK.es.js
|
|
51841
51841
|
function getExtensionConfigField(extension$1, field, context = { name: "" }) {
|
|
51842
51842
|
const fieldValue = extension$1.config[field];
|
|
51843
51843
|
if (typeof fieldValue === "function")
|
|
@@ -58147,7 +58147,7 @@ function executeCreateContentControl(adapter, input, options) {
|
|
|
58147
58147
|
value: input.lockMode
|
|
58148
58148
|
});
|
|
58149
58149
|
if (input.at !== undefined && input.target !== undefined)
|
|
58150
|
-
throw new DocumentApiValidationError("INVALID_INPUT", `create.contentControl: "at" and "target" are mutually exclusive
|
|
58150
|
+
throw new DocumentApiValidationError("INVALID_INPUT", `create.contentControl: "at" and "target" are mutually exclusive: provide one or neither.`, { field: "at" });
|
|
58151
58151
|
if (input.target !== undefined)
|
|
58152
58152
|
validateCCTarget(input.target, "create.contentControl");
|
|
58153
58153
|
if (input.at !== undefined && !isSelectionTarget(input.at))
|
|
@@ -104302,7 +104302,7 @@ var isRegExp = (value) => {
|
|
|
104302
104302
|
state.kern = kernNode.attributes["w:val"];
|
|
104303
104303
|
}
|
|
104304
104304
|
}, SuperConverter;
|
|
104305
|
-
var
|
|
104305
|
+
var init_SuperConverter_25gYGkyK_es = __esm(() => {
|
|
104306
104306
|
init_rolldown_runtime_Bg48TavK_es();
|
|
104307
104307
|
init_jszip_C49i9kUs_es();
|
|
104308
104308
|
init_xml_js_CqGKpaft_es();
|
|
@@ -107350,7 +107350,7 @@ var init_SuperConverter_DklB_kc9_es = __esm(() => {
|
|
|
107350
107350
|
},
|
|
107351
107351
|
find: {
|
|
107352
107352
|
memberPath: "find",
|
|
107353
|
-
description: "Search the document for text or node matches using SDM/1 selectors. Returns discovery-grade results
|
|
107353
|
+
description: "Search the document for text or node matches using SDM/1 selectors. Returns discovery-grade results: for mutation targeting, use query.match instead.",
|
|
107354
107354
|
expectedResult: "Returns an SDFindResult envelope ({ total, limit, offset, items }). Each item is an SDNodeResult ({ node, address }).",
|
|
107355
107355
|
requiresDocumentContext: true,
|
|
107356
107356
|
metadata: readOperation({
|
|
@@ -107446,7 +107446,7 @@ var init_SuperConverter_DklB_kc9_es = __esm(() => {
|
|
|
107446
107446
|
},
|
|
107447
107447
|
extract: {
|
|
107448
107448
|
memberPath: "extract",
|
|
107449
|
-
description: "Extract all document content with stable IDs for RAG pipelines. Returns blocks with full text, comments, and tracked changes
|
|
107449
|
+
description: "Extract all document content with stable IDs for RAG pipelines. Returns blocks with full text, comments, and tracked changes: each with an ID compatible with scrollToElement().",
|
|
107450
107450
|
expectedResult: "Returns an ExtractResult with blocks (nodeId, type, text, headingLevel), comments (entityId, text, anchoredText, blockId, status, author), tracked changes (entityId, type, excerpt, author, date), and revision.",
|
|
107451
107451
|
requiresDocumentContext: true,
|
|
107452
107452
|
metadata: readOperation(),
|
|
@@ -108446,7 +108446,7 @@ var init_SuperConverter_DklB_kc9_es = __esm(() => {
|
|
|
108446
108446
|
},
|
|
108447
108447
|
"lists.create": {
|
|
108448
108448
|
memberPath: "lists.create",
|
|
108449
|
-
description: 'Create a new list from one or more paragraphs. Supports optional preset or style for new sequences. When sequence.mode is "continuePrevious", preset and style are not allowed
|
|
108449
|
+
description: 'Create a new list from one or more paragraphs. Supports optional preset or style for new sequences. When sequence.mode is "continuePrevious", preset and style are not allowed: the new items inherit formatting from the previous sequence.',
|
|
108450
108450
|
expectedResult: "Returns a ListsCreateResult with the new listId and the first item address.",
|
|
108451
108451
|
requiresDocumentContext: true,
|
|
108452
108452
|
metadata: mutationOperation({
|
|
@@ -108599,7 +108599,7 @@ var init_SuperConverter_DklB_kc9_es = __esm(() => {
|
|
|
108599
108599
|
},
|
|
108600
108600
|
"lists.merge": {
|
|
108601
108601
|
memberPath: "lists.merge",
|
|
108602
|
-
description: 'Compound: merge two adjacent list sequences into one. Reassigns numId on the absorbed sequence (no strict abstractNumId check
|
|
108602
|
+
description: 'Compound: merge two adjacent list sequences into one. Reassigns numId on the absorbed sequence (no strict abstractNumId check: absorbed items adopt the absorbing definition) and deletes empty paragraphs between the two sequences. Use this instead of lists.join for the user-facing "merge these lists" intent.',
|
|
108603
108603
|
expectedResult: "Returns a ListsMergeResult with the merged listId, absorbedCount, and removedEmptyBlocks count.",
|
|
108604
108604
|
requiresDocumentContext: true,
|
|
108605
108605
|
metadata: mutationOperation({
|
|
@@ -109074,7 +109074,7 @@ var init_SuperConverter_DklB_kc9_es = __esm(() => {
|
|
|
109074
109074
|
},
|
|
109075
109075
|
"lists.setLevelNumberStyle": {
|
|
109076
109076
|
memberPath: "lists.setLevelNumberStyle",
|
|
109077
|
-
description: 'Set the numbering style (e.g. decimal, lowerLetter, upperRoman) for a specific list level. Rejects "bullet"
|
|
109077
|
+
description: 'Set the numbering style (e.g. decimal, lowerLetter, upperRoman) for a specific list level. Rejects "bullet": use setLevelBullet instead. Sequence-local: clones shared definitions.',
|
|
109078
109078
|
expectedResult: "Returns a ListsMutateItemResult receipt; reports NO_OP if the value already matches.",
|
|
109079
109079
|
requiresDocumentContext: true,
|
|
109080
109080
|
metadata: mutationOperation({
|
|
@@ -109145,7 +109145,7 @@ var init_SuperConverter_DklB_kc9_es = __esm(() => {
|
|
|
109145
109145
|
},
|
|
109146
109146
|
"lists.setLevelLayout": {
|
|
109147
109147
|
memberPath: "lists.setLevelLayout",
|
|
109148
|
-
description: "Set the layout properties (alignment, indentation, trailing character, tab stop) for a specific list level. Accepts partial updates
|
|
109148
|
+
description: "Set the layout properties (alignment, indentation, trailing character, tab stop) for a specific list level. Accepts partial updates: omitted fields are left unchanged. Sequence-local: clones shared definitions.",
|
|
109149
109149
|
expectedResult: "Returns a ListsMutateItemResult receipt; reports NO_OP if all values already match.",
|
|
109150
109150
|
requiresDocumentContext: true,
|
|
109151
109151
|
metadata: mutationOperation({
|
|
@@ -115410,7 +115410,7 @@ var init_SuperConverter_DklB_kc9_es = __esm(() => {
|
|
|
115410
115410
|
items: objectSchema({
|
|
115411
115411
|
nodeId: {
|
|
115412
115412
|
type: "string",
|
|
115413
|
-
description: "Stable block ID
|
|
115413
|
+
description: "Stable block ID: pass to scrollToElement() for navigation."
|
|
115414
115414
|
},
|
|
115415
115415
|
type: {
|
|
115416
115416
|
type: "string",
|
|
@@ -115503,7 +115503,7 @@ var init_SuperConverter_DklB_kc9_es = __esm(() => {
|
|
|
115503
115503
|
items: objectSchema({
|
|
115504
115504
|
entityId: {
|
|
115505
115505
|
type: "string",
|
|
115506
|
-
description: "Comment entity ID
|
|
115506
|
+
description: "Comment entity ID: pass to scrollToElement() for navigation."
|
|
115507
115507
|
},
|
|
115508
115508
|
text: {
|
|
115509
115509
|
type: "string",
|
|
@@ -115987,7 +115987,7 @@ var init_SuperConverter_DklB_kc9_es = __esm(() => {
|
|
|
115987
115987
|
},
|
|
115988
115988
|
text: {
|
|
115989
115989
|
type: "string",
|
|
115990
|
-
description: "Paragraph text content. Each call creates ONE paragraph. For multiple items (e.g. list items), call superdoc_create separately for each item
|
|
115990
|
+
description: "Paragraph text content. Each call creates ONE paragraph. For multiple items (e.g. list items), call superdoc_create separately for each item: do NOT use newlines to put multiple items in one paragraph."
|
|
115991
115991
|
}
|
|
115992
115992
|
}), createParagraphResultSchemaFor("create.paragraph"), createParagraphFailureSchemaFor("create.paragraph"), objectSchema({
|
|
115993
115993
|
in: storyLocatorSchema,
|
|
@@ -141903,7 +141903,7 @@ var init_SuperConverter_DklB_kc9_es = __esm(() => {
|
|
|
141903
141903
|
};
|
|
141904
141904
|
});
|
|
141905
141905
|
|
|
141906
|
-
// ../../packages/superdoc/dist/chunks/create-headless-toolbar-
|
|
141906
|
+
// ../../packages/superdoc/dist/chunks/create-headless-toolbar-B93DeWrb.es.js
|
|
141907
141907
|
function parseSizeUnit(val = "0") {
|
|
141908
141908
|
const length = val.toString() || "0";
|
|
141909
141909
|
const value = Number.parseFloat(length);
|
|
@@ -144539,8 +144539,8 @@ var CSS_DIMENSION_REGEX, DOM_SIZE_UNITS, Extension = class Extension2 {
|
|
|
144539
144539
|
}
|
|
144540
144540
|
};
|
|
144541
144541
|
};
|
|
144542
|
-
var
|
|
144543
|
-
|
|
144542
|
+
var init_create_headless_toolbar_B93DeWrb_es = __esm(() => {
|
|
144543
|
+
init_SuperConverter_25gYGkyK_es();
|
|
144544
144544
|
init_constants_DrU4EASo_es();
|
|
144545
144545
|
init_dist_B8HfvhaK_es();
|
|
144546
144546
|
CSS_DIMENSION_REGEX = /[\d-.]+(\w+)$/;
|
|
@@ -198749,7 +198749,7 @@ var init_remark_gfm_eZN6yzWQ_es = __esm(() => {
|
|
|
198749
198749
|
init_remark_gfm_BhnWr3yf_es();
|
|
198750
198750
|
});
|
|
198751
198751
|
|
|
198752
|
-
// ../../packages/superdoc/dist/chunks/src-
|
|
198752
|
+
// ../../packages/superdoc/dist/chunks/src-B4HBe1_K.es.js
|
|
198753
198753
|
function deleteProps(obj, propOrProps) {
|
|
198754
198754
|
const props = typeof propOrProps === "string" ? [propOrProps] : propOrProps;
|
|
198755
198755
|
const removeNested = (target, pathParts, index2 = 0) => {
|
|
@@ -289981,12 +289981,12 @@ menclose::after {
|
|
|
289981
289981
|
return;
|
|
289982
289982
|
console.log(...args$1);
|
|
289983
289983
|
}, HEADER_FOOTER_INIT_BUDGET_MS = 200, MAX_ZOOM_WARNING_THRESHOLD = 10, MAX_SELECTION_RECTS_PER_USER = 100, SEMANTIC_RESIZE_DEBOUNCE_MS = 120, MIN_SEMANTIC_CONTENT_WIDTH_PX = 1, GLOBAL_PERFORMANCE, PresentationEditor, ICONS, TEXTS, tableActionsOptions;
|
|
289984
|
-
var
|
|
289984
|
+
var init_src_B4HBe1_K_es = __esm(() => {
|
|
289985
289985
|
init_rolldown_runtime_Bg48TavK_es();
|
|
289986
|
-
|
|
289986
|
+
init_SuperConverter_25gYGkyK_es();
|
|
289987
289987
|
init_jszip_C49i9kUs_es();
|
|
289988
289988
|
init_uuid_qzgm05fK_es();
|
|
289989
|
-
|
|
289989
|
+
init_create_headless_toolbar_B93DeWrb_es();
|
|
289990
289990
|
init_constants_DrU4EASo_es();
|
|
289991
289991
|
init_dist_B8HfvhaK_es();
|
|
289992
289992
|
init_unified_Dsuw2be5_es();
|
|
@@ -327379,11 +327379,11 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
327379
327379
|
];
|
|
327380
327380
|
});
|
|
327381
327381
|
|
|
327382
|
-
// ../../packages/superdoc/dist/chunks/create-super-doc-ui-
|
|
327382
|
+
// ../../packages/superdoc/dist/chunks/create-super-doc-ui-HQsnQdt0.es.js
|
|
327383
327383
|
var ALL_TOOLBAR_COMMAND_IDS, EMPTY_ACTIVE_IDS;
|
|
327384
|
-
var
|
|
327385
|
-
|
|
327386
|
-
|
|
327384
|
+
var init_create_super_doc_ui_HQsnQdt0_es = __esm(() => {
|
|
327385
|
+
init_SuperConverter_25gYGkyK_es();
|
|
327386
|
+
init_create_headless_toolbar_B93DeWrb_es();
|
|
327387
327387
|
ALL_TOOLBAR_COMMAND_IDS = Object.keys(createToolbarRegistry());
|
|
327388
327388
|
EMPTY_ACTIVE_IDS = Object.freeze([]);
|
|
327389
327389
|
});
|
|
@@ -327401,16 +327401,16 @@ var init_zipper_BxRAi0_5_es = __esm(() => {
|
|
|
327401
327401
|
|
|
327402
327402
|
// ../../packages/superdoc/dist/super-editor.es.js
|
|
327403
327403
|
var init_super_editor_es = __esm(() => {
|
|
327404
|
-
|
|
327405
|
-
|
|
327404
|
+
init_src_B4HBe1_K_es();
|
|
327405
|
+
init_SuperConverter_25gYGkyK_es();
|
|
327406
327406
|
init_jszip_C49i9kUs_es();
|
|
327407
327407
|
init_xml_js_CqGKpaft_es();
|
|
327408
|
-
|
|
327408
|
+
init_create_headless_toolbar_B93DeWrb_es();
|
|
327409
327409
|
init_constants_DrU4EASo_es();
|
|
327410
327410
|
init_dist_B8HfvhaK_es();
|
|
327411
327411
|
init_unified_Dsuw2be5_es();
|
|
327412
327412
|
init_DocxZipper_CUX64E5K_es();
|
|
327413
|
-
|
|
327413
|
+
init_create_super_doc_ui_HQsnQdt0_es();
|
|
327414
327414
|
init_ui_CGB3qmy3_es();
|
|
327415
327415
|
init_eventemitter3_BJrNoN9D_es();
|
|
327416
327416
|
init_errors_C_DoKMoN_es();
|
|
@@ -328926,7 +328926,7 @@ var init_operation_definitions = __esm(() => {
|
|
|
328926
328926
|
},
|
|
328927
328927
|
edit: {
|
|
328928
328928
|
toolName: "superdoc_edit",
|
|
328929
|
-
description: "The primary tool for inserting content into documents. " + 'ALWAYS use action "insert" with type "markdown" to create headings, paragraphs, or any block content
|
|
328929
|
+
description: "The primary tool for inserting content into documents. " + 'ALWAYS use action "insert" with type "markdown" to create headings, paragraphs, or any block content: this is faster and creates proper document structure in one call. Do NOT use superdoc_create for headings or paragraphs. ' + "The markdown parser creates headings from # markers (# = Heading1, ## = Heading2), bold from **text**, italic from *text*, and numbered/bullet lists. " + 'Position markdown inserts with "target" (a BlockNodeAddress like {kind:"block", nodeType, nodeId}) and "placement" (before, after, insideStart, insideEnd). Without a target, content appends at the end of the document. ' + "IMPORTANT: After a markdown insert, analyze the document context (what kind of document, how titles and body text are styled) and follow up with ONE superdoc_mutations call to format inserted blocks so they look like they belong. " + 'Each format.apply step accepts "inline" (fontFamily, fontSize, bold, underline, color), "alignment", and "scope" in the same step. ' + 'Use scope: "block" so formatting covers the entire paragraph. ' + "Copy the exact property values from the existing get_content blocks (fontFamily, fontSize, color, alignment, bold, underline). Do NOT invent values: use what the blocks show. " + 'Also supports replace, delete, and undo/redo. For replace and delete, pass a "ref" from superdoc_search or superdoc_get_content blocks. ' + "A search ref covers only the matched substring; a block ref covers the entire block text, so use block refs when rewriting or shortening whole paragraphs. " + 'For multi-step redlines or whole-clause rewrites, prefer superdoc_mutations with where:{by:"block", nodeType, nodeId} from superdoc_get_content action "blocks" includeText:true rather than relying on text selectors. ' + "Refs expire after any mutation; always re-search before the next edit. " + "For 2+ edits that must succeed or fail atomically, use superdoc_mutations instead. " + 'Supports "dryRun" to preview changes and "changeMode: tracked" to record edits as tracked changes (not supported for markdown/html inserts). ' + 'Do NOT build "target" objects manually when a ref is available; prefer "ref" for simpler, more reliable targeting.',
|
|
328930
328930
|
inputExamples: [
|
|
328931
328931
|
{
|
|
328932
328932
|
action: "insert",
|
|
@@ -328955,7 +328955,7 @@ More content with **bold** and *italic*.`
|
|
|
328955
328955
|
},
|
|
328956
328956
|
create: {
|
|
328957
328957
|
toolName: "superdoc_create",
|
|
328958
|
-
description: 'IMPORTANT: For headings and paragraphs, use superdoc_edit with type "markdown" instead
|
|
328958
|
+
description: 'IMPORTANT: For headings and paragraphs, use superdoc_edit with type "markdown" instead: it is faster, creates proper styles, and handles positioning via target + placement. ' + "Only use superdoc_create for tables or when markdown cannot express the content. " + "Creates a single paragraph, heading, or table. Returns nodeId and ref for the created block. " + "After creating, the returned ref is valid for ONE immediate superdoc_format call. For subsequent operations, re-fetch blocks with superdoc_get_content to get fresh refs (refs expire after any mutation). " + 'When the user asks for a "heading", use action "heading" with a level (default 1). Use action "paragraph" for regular body text. ' + 'Position with "at": {kind:"documentEnd"} (default), {kind:"documentStart"}, or {kind:"after"/"before", target:{kind:"block", nodeType, nodeId}} for relative placement. ' + 'When creating multiple items in sequence, use the previous response nodeId as the next "at" target to maintain correct ordering. ' + 'Do NOT use newlines in "text" to create multiple paragraphs; call this tool separately for each one.',
|
|
328959
328959
|
inputExamples: [
|
|
328960
328960
|
{ action: "paragraph", text: "New paragraph content.", at: { kind: "documentEnd" } },
|
|
328961
328961
|
{
|
|
@@ -329002,26 +329002,26 @@ More content with **bold** and *italic*.`
|
|
|
329002
329002
|
table: { toolName: "superdoc_table", description: "Table structure and cell operations" },
|
|
329003
329003
|
list: {
|
|
329004
329004
|
toolName: "superdoc_list",
|
|
329005
|
-
description: "Create and manipulate bullet and numbered lists. " + 'Most actions require a list-item target: {kind:"block", nodeType:"listItem", nodeId:"<id>"}. ' + 'Exceptions: "create" and "attach" operate on paragraph targets (they turn paragraphs into list items). ' + `Find nodeIds via superdoc_get_content({action:"blocks"})
|
|
329005
|
+
description: "Create and manipulate bullet and numbered lists. " + 'Most actions require a list-item target: {kind:"block", nodeType:"listItem", nodeId:"<id>"}. ' + 'Exceptions: "create" and "attach" operate on paragraph targets (they turn paragraphs into list items). ' + `Find nodeIds via superdoc_get_content({action:"blocks"}): pick listItem blocks for most actions, paragraph blocks for create/attach.
|
|
329006
329006
|
` + `
|
|
329007
329007
|
` + `CREATE & CONVERT:
|
|
329008
|
-
` + '• "create"
|
|
329009
|
-
` + `• "attach"
|
|
329010
|
-
` + `• "set_type"
|
|
329011
|
-
` + `• "detach"
|
|
329008
|
+
` + '• "create": make a NEW list from paragraphs. Two modes: ' + 'mode:"empty" with at:{kind:"block", nodeType:"paragraph", nodeId} converts a single paragraph; ' + 'mode:"fromParagraphs" with target:{from:{...paragraph block address}, to:{...paragraph block address}} converts a range: ALL paragraphs between from and to become items, so make sure no other content sits between them. ' + 'Pass a preset ("disc"|"circle"|"square"|"dash" for bullets; "decimal"|"decimalParenthesis"|"lowerLetter"|"upperLetter"|"lowerRoman"|"upperRoman" for ordered) or a custom style. ' + `Use "create" to start a fresh list: NOT to extend an existing one (use "attach" for that).
|
|
329009
|
+
` + `• "attach": add paragraphs to an EXISTING list, inheriting its numbering definition. Pass target:{paragraph block address} (or {from, to} range of paragraphs) + attachTo:{kind:"block", nodeType:"listItem", nodeId:"<any item in destination list>"} + optional level:0..8. Use this to extend a list or as the second half of a merge workflow (see "join" below).
|
|
329010
|
+
` + `• "set_type": convert an existing list between ordered and bullet. Pass target:{listItem} + kind:"ordered" or "bullet". Adjacent compatible sequences are merged automatically to preserve continuous numbering.
|
|
329011
|
+
` + `• "detach": convert a list item back to a plain paragraph. Pass target:{listItem}.
|
|
329012
329012
|
` + `
|
|
329013
329013
|
` + `ITEMS & NESTING:
|
|
329014
|
-
` + `• "insert"
|
|
329015
|
-
` + `• "indent" / "outdent"
|
|
329016
|
-
` + `• "set_level"
|
|
329014
|
+
` + `• "insert": add a new list item adjacent to an existing item in the same list. Pass target:{listItem} + position:"before"|"after" + optional text. Use this (NOT superdoc_create) to add items to an existing list.
|
|
329015
|
+
` + `• "indent" / "outdent": bump the target item's nesting level by one (0-8 range). Pass target:{listItem}.
|
|
329016
|
+
` + `• "set_level": jump the target item to an explicit level. Pass target:{listItem} + level:0..8.
|
|
329017
329017
|
` + `
|
|
329018
329018
|
` + `NUMBERING (ordered lists):
|
|
329019
|
-
` + `• "set_value"
|
|
329020
|
-
` + `• "continue_previous"
|
|
329019
|
+
` + `• "set_value": restart numbering at the target. Pass target:{listItem} + value:<number> (e.g. value:1 to start over) or value:null to clear a previous override. Mid-sequence targets are atomically split off into their own sequence.
|
|
329020
|
+
` + `• "continue_previous": make the target's sequence continue numbering from the nearest compatible previous sequence (same abstract definition). Pass target:{listItem of the sequence you want to renumber}. Fails with NO_COMPATIBLE_PREVIOUS or INCOMPATIBLE_DEFINITIONS if no matching prior sequence exists.
|
|
329021
329021
|
` + `
|
|
329022
329022
|
` + `SEQUENCE SHAPE (merge / split):
|
|
329023
|
-
` + `• "merge"
|
|
329024
|
-
` + `• "split"
|
|
329023
|
+
` + `• "merge": merge the target's sequence with an adjacent one into one continuous list. Pass target:{listItem} + direction:"withPrevious" or "withNext". Absorbed items adopt the absorbing sequence's numbering definition, and empty paragraphs between the two sequences are removed so numbering flows continuously.
|
|
329024
|
+
` + `• "split": split the target's sequence at the target item into two independent lists. The target and everything after become a new sequence that restarts numbering at 1. Pass target:{listItem}; add restartNumbering:false to keep the count continuing instead of restarting.`,
|
|
329025
329025
|
inputExamples: [
|
|
329026
329026
|
{
|
|
329027
329027
|
action: "create",
|
|
@@ -329242,7 +329242,7 @@ More content with **bold** and *italic*.`
|
|
|
329242
329242
|
},
|
|
329243
329243
|
find: {
|
|
329244
329244
|
memberPath: "find",
|
|
329245
|
-
description: "Search the document for text or node matches using SDM/1 selectors. Returns discovery-grade results
|
|
329245
|
+
description: "Search the document for text or node matches using SDM/1 selectors. Returns discovery-grade results: for mutation targeting, use query.match instead.",
|
|
329246
329246
|
expectedResult: "Returns an SDFindResult envelope ({ total, limit, offset, items }). Each item is an SDNodeResult ({ node, address }).",
|
|
329247
329247
|
requiresDocumentContext: true,
|
|
329248
329248
|
metadata: readOperation2({
|
|
@@ -329339,7 +329339,7 @@ More content with **bold** and *italic*.`
|
|
|
329339
329339
|
},
|
|
329340
329340
|
extract: {
|
|
329341
329341
|
memberPath: "extract",
|
|
329342
|
-
description: "Extract all document content with stable IDs for RAG pipelines. Returns blocks with full text, comments, and tracked changes
|
|
329342
|
+
description: "Extract all document content with stable IDs for RAG pipelines. Returns blocks with full text, comments, and tracked changes: each with an ID compatible with scrollToElement().",
|
|
329343
329343
|
expectedResult: "Returns an ExtractResult with blocks (nodeId, type, text, headingLevel), comments (entityId, text, anchoredText, blockId, status, author), tracked changes (entityId, type, excerpt, author, date), and revision.",
|
|
329344
329344
|
requiresDocumentContext: true,
|
|
329345
329345
|
metadata: readOperation2(),
|
|
@@ -330252,7 +330252,7 @@ More content with **bold** and *italic*.`
|
|
|
330252
330252
|
},
|
|
330253
330253
|
"lists.create": {
|
|
330254
330254
|
memberPath: "lists.create",
|
|
330255
|
-
description: 'Create a new list from one or more paragraphs. Supports optional preset or style for new sequences. When sequence.mode is "continuePrevious", preset and style are not allowed
|
|
330255
|
+
description: 'Create a new list from one or more paragraphs. Supports optional preset or style for new sequences. When sequence.mode is "continuePrevious", preset and style are not allowed: the new items inherit formatting from the previous sequence.',
|
|
330256
330256
|
expectedResult: "Returns a ListsCreateResult with the new listId and the first item address.",
|
|
330257
330257
|
requiresDocumentContext: true,
|
|
330258
330258
|
metadata: mutationOperation2({
|
|
@@ -330384,7 +330384,7 @@ More content with **bold** and *italic*.`
|
|
|
330384
330384
|
},
|
|
330385
330385
|
"lists.merge": {
|
|
330386
330386
|
memberPath: "lists.merge",
|
|
330387
|
-
description: 'Compound: merge two adjacent list sequences into one. Reassigns numId on the absorbed sequence (no strict abstractNumId check
|
|
330387
|
+
description: 'Compound: merge two adjacent list sequences into one. Reassigns numId on the absorbed sequence (no strict abstractNumId check: absorbed items adopt the absorbing definition) and deletes empty paragraphs between the two sequences. Use this instead of lists.join for the user-facing "merge these lists" intent.',
|
|
330388
330388
|
expectedResult: "Returns a ListsMergeResult with the merged listId, absorbedCount, and removedEmptyBlocks count.",
|
|
330389
330389
|
requiresDocumentContext: true,
|
|
330390
330390
|
metadata: mutationOperation2({
|
|
@@ -330741,7 +330741,7 @@ More content with **bold** and *italic*.`
|
|
|
330741
330741
|
},
|
|
330742
330742
|
"lists.setLevelNumberStyle": {
|
|
330743
330743
|
memberPath: "lists.setLevelNumberStyle",
|
|
330744
|
-
description: 'Set the numbering style (e.g. decimal, lowerLetter, upperRoman) for a specific list level. Rejects "bullet"
|
|
330744
|
+
description: 'Set the numbering style (e.g. decimal, lowerLetter, upperRoman) for a specific list level. Rejects "bullet": use setLevelBullet instead. Sequence-local: clones shared definitions.',
|
|
330745
330745
|
expectedResult: "Returns a ListsMutateItemResult receipt; reports NO_OP if the value already matches.",
|
|
330746
330746
|
requiresDocumentContext: true,
|
|
330747
330747
|
metadata: mutationOperation2({
|
|
@@ -330786,7 +330786,7 @@ More content with **bold** and *italic*.`
|
|
|
330786
330786
|
},
|
|
330787
330787
|
"lists.setLevelLayout": {
|
|
330788
330788
|
memberPath: "lists.setLevelLayout",
|
|
330789
|
-
description: "Set the layout properties (alignment, indentation, trailing character, tab stop) for a specific list level. Accepts partial updates
|
|
330789
|
+
description: "Set the layout properties (alignment, indentation, trailing character, tab stop) for a specific list level. Accepts partial updates: omitted fields are left unchanged. Sequence-local: clones shared definitions.",
|
|
330790
330790
|
expectedResult: "Returns a ListsMutateItemResult receipt; reports NO_OP if all values already match.",
|
|
330791
330791
|
requiresDocumentContext: true,
|
|
330792
330792
|
metadata: mutationOperation2({
|
|
@@ -337383,7 +337383,7 @@ var init_schemas4 = __esm(() => {
|
|
|
337383
337383
|
blocks: {
|
|
337384
337384
|
type: "array",
|
|
337385
337385
|
items: objectSchema2({
|
|
337386
|
-
nodeId: { type: "string", description: "Stable block ID
|
|
337386
|
+
nodeId: { type: "string", description: "Stable block ID: pass to scrollToElement() for navigation." },
|
|
337387
337387
|
type: {
|
|
337388
337388
|
type: "string",
|
|
337389
337389
|
description: "Block type: paragraph, heading, listItem, image, tableOfContents."
|
|
@@ -337440,7 +337440,7 @@ var init_schemas4 = __esm(() => {
|
|
|
337440
337440
|
items: objectSchema2({
|
|
337441
337441
|
entityId: {
|
|
337442
337442
|
type: "string",
|
|
337443
|
-
description: "Comment entity ID
|
|
337443
|
+
description: "Comment entity ID: pass to scrollToElement() for navigation."
|
|
337444
337444
|
},
|
|
337445
337445
|
text: { type: "string", description: "Comment body text." },
|
|
337446
337446
|
anchoredText: { type: "string", description: "The document text the comment is anchored to." },
|
|
@@ -337951,7 +337951,7 @@ var init_schemas4 = __esm(() => {
|
|
|
337951
337951
|
},
|
|
337952
337952
|
text: {
|
|
337953
337953
|
type: "string",
|
|
337954
|
-
description: "Paragraph text content. Each call creates ONE paragraph. For multiple items (e.g. list items), call superdoc_create separately for each item
|
|
337954
|
+
description: "Paragraph text content. Each call creates ONE paragraph. For multiple items (e.g. list items), call superdoc_create separately for each item: do NOT use newlines to put multiple items in one paragraph."
|
|
337955
337955
|
}
|
|
337956
337956
|
}),
|
|
337957
337957
|
output: createParagraphResultSchemaFor2("create.paragraph"),
|
|
@@ -338243,7 +338243,7 @@ var init_schemas4 = __esm(() => {
|
|
|
338243
338243
|
properties: {
|
|
338244
338244
|
mode: {
|
|
338245
338245
|
enum: ["empty", "fromParagraphs"],
|
|
338246
|
-
description: "Required. 'fromParagraphs' converts existing paragraphs into list items
|
|
338246
|
+
description: "Required. 'fromParagraphs' converts existing paragraphs into list items: each paragraph becomes one item, so create one paragraph per item first. 'empty' creates a new empty list at 'at'."
|
|
338247
338247
|
},
|
|
338248
338248
|
at: {
|
|
338249
338249
|
...ref3("BlockAddress"),
|
|
@@ -345619,7 +345619,7 @@ function executeCreateContentControl2(adapter, input2, options) {
|
|
|
345619
345619
|
throw new DocumentApiValidationError3("INVALID_INPUT", `create.contentControl lockMode must be one of: ${[...VALID_LOCK_MODES2].join(", ")}.`, { field: "lockMode", value: input2.lockMode });
|
|
345620
345620
|
}
|
|
345621
345621
|
if (input2.at !== undefined && input2.target !== undefined) {
|
|
345622
|
-
throw new DocumentApiValidationError3("INVALID_INPUT", `create.contentControl: "at" and "target" are mutually exclusive
|
|
345622
|
+
throw new DocumentApiValidationError3("INVALID_INPUT", `create.contentControl: "at" and "target" are mutually exclusive: provide one or neither.`, { field: "at" });
|
|
345623
345623
|
}
|
|
345624
345624
|
if (input2.target !== undefined) {
|
|
345625
345625
|
validateCCTarget2(input2.target, "create.contentControl");
|
|
@@ -458306,7 +458306,7 @@ var init_catalog = __esm(() => {
|
|
|
458306
458306
|
},
|
|
458307
458307
|
{
|
|
458308
458308
|
toolName: "superdoc_edit",
|
|
458309
|
-
description: 'The primary tool for inserting content into documents. ALWAYS use action "insert" with type "markdown" to create headings, paragraphs, or any block content
|
|
458309
|
+
description: 'The primary tool for inserting content into documents. ALWAYS use action "insert" with type "markdown" to create headings, paragraphs, or any block content: this is faster and creates proper document structure in one call. Do NOT use superdoc_create for headings or paragraphs. The markdown parser creates headings from # markers (# = Heading1, ## = Heading2), bold from **text**, italic from *text*, and numbered/bullet lists. Position markdown inserts with "target" (a BlockNodeAddress like {kind:"block", nodeType, nodeId}) and "placement" (before, after, insideStart, insideEnd). Without a target, content appends at the end of the document. IMPORTANT: After a markdown insert, analyze the document context (what kind of document, how titles and body text are styled) and follow up with ONE superdoc_mutations call to format inserted blocks so they look like they belong. Each format.apply step accepts "inline" (fontFamily, fontSize, bold, underline, color), "alignment", and "scope" in the same step. Use scope: "block" so formatting covers the entire paragraph. Copy the exact property values from the existing get_content blocks (fontFamily, fontSize, color, alignment, bold, underline). Do NOT invent values: use what the blocks show. Also supports replace, delete, and undo/redo. For replace and delete, pass a "ref" from superdoc_search or superdoc_get_content blocks. A search ref covers only the matched substring; a block ref covers the entire block text, so use block refs when rewriting or shortening whole paragraphs. For multi-step redlines or whole-clause rewrites, prefer superdoc_mutations with where:{by:"block", nodeType, nodeId} from superdoc_get_content action "blocks" includeText:true rather than relying on text selectors. Refs expire after any mutation; always re-search before the next edit. For 2+ edits that must succeed or fail atomically, use superdoc_mutations instead. Supports "dryRun" to preview changes and "changeMode: tracked" to record edits as tracked changes (not supported for markdown/html inserts). Do NOT build "target" objects manually when a ref is available; prefer "ref" for simpler, more reliable targeting.',
|
|
458310
458310
|
inputSchema: {
|
|
458311
458311
|
type: "object",
|
|
458312
458312
|
properties: {
|
|
@@ -459289,7 +459289,7 @@ var init_catalog = __esm(() => {
|
|
|
459289
459289
|
},
|
|
459290
459290
|
{
|
|
459291
459291
|
toolName: "superdoc_create",
|
|
459292
|
-
description: 'IMPORTANT: For headings and paragraphs, use superdoc_edit with type "markdown" instead
|
|
459292
|
+
description: 'IMPORTANT: For headings and paragraphs, use superdoc_edit with type "markdown" instead: it is faster, creates proper styles, and handles positioning via target + placement. Only use superdoc_create for tables or when markdown cannot express the content. Creates a single paragraph, heading, or table. Returns nodeId and ref for the created block. After creating, the returned ref is valid for ONE immediate superdoc_format call. For subsequent operations, re-fetch blocks with superdoc_get_content to get fresh refs (refs expire after any mutation). When the user asks for a "heading", use action "heading" with a level (default 1). Use action "paragraph" for regular body text. Position with "at": {kind:"documentEnd"} (default), {kind:"documentStart"}, or {kind:"after"/"before", target:{kind:"block", nodeType, nodeId}} for relative placement. When creating multiple items in sequence, use the previous response nodeId as the next "at" target to maintain correct ordering. Do NOT use newlines in "text" to create multiple paragraphs; call this tool separately for each one.',
|
|
459293
459293
|
inputSchema: {
|
|
459294
459294
|
type: "object",
|
|
459295
459295
|
properties: {
|
|
@@ -459435,7 +459435,7 @@ var init_catalog = __esm(() => {
|
|
|
459435
459435
|
},
|
|
459436
459436
|
text: {
|
|
459437
459437
|
type: "string",
|
|
459438
|
-
description: "Paragraph text content. Each call creates ONE paragraph. For multiple items (e.g. list items), call superdoc_create separately for each item
|
|
459438
|
+
description: "Paragraph text content. Each call creates ONE paragraph. For multiple items (e.g. list items), call superdoc_create separately for each item: do NOT use newlines to put multiple items in one paragraph."
|
|
459439
459439
|
},
|
|
459440
459440
|
input: {
|
|
459441
459441
|
type: "object",
|
|
@@ -459484,26 +459484,26 @@ var init_catalog = __esm(() => {
|
|
|
459484
459484
|
},
|
|
459485
459485
|
{
|
|
459486
459486
|
toolName: "superdoc_list",
|
|
459487
|
-
description: `Create and manipulate bullet and numbered lists. Most actions require a list-item target: {kind:"block", nodeType:"listItem", nodeId:"<id>"}. Exceptions: "create" and "attach" operate on paragraph targets (they turn paragraphs into list items). Find nodeIds via superdoc_get_content({action:"blocks"})
|
|
459487
|
+
description: `Create and manipulate bullet and numbered lists. Most actions require a list-item target: {kind:"block", nodeType:"listItem", nodeId:"<id>"}. Exceptions: "create" and "attach" operate on paragraph targets (they turn paragraphs into list items). Find nodeIds via superdoc_get_content({action:"blocks"}): pick listItem blocks for most actions, paragraph blocks for create/attach.
|
|
459488
459488
|
|
|
459489
459489
|
CREATE & CONVERT:
|
|
459490
|
-
• "create"
|
|
459491
|
-
• "attach"
|
|
459492
|
-
• "set_type"
|
|
459493
|
-
• "detach"
|
|
459490
|
+
• "create": make a NEW list from paragraphs. Two modes: mode:"empty" with at:{kind:"block", nodeType:"paragraph", nodeId} converts a single paragraph; mode:"fromParagraphs" with target:{from:{...paragraph block address}, to:{...paragraph block address}} converts a range: ALL paragraphs between from and to become items, so make sure no other content sits between them. Pass a preset ("disc"|"circle"|"square"|"dash" for bullets; "decimal"|"decimalParenthesis"|"lowerLetter"|"upperLetter"|"lowerRoman"|"upperRoman" for ordered) or a custom style. Use "create" to start a fresh list: NOT to extend an existing one (use "attach" for that).
|
|
459491
|
+
• "attach": add paragraphs to an EXISTING list, inheriting its numbering definition. Pass target:{paragraph block address} (or {from, to} range of paragraphs) + attachTo:{kind:"block", nodeType:"listItem", nodeId:"<any item in destination list>"} + optional level:0..8. Use this to extend a list or as the second half of a merge workflow (see "join" below).
|
|
459492
|
+
• "set_type": convert an existing list between ordered and bullet. Pass target:{listItem} + kind:"ordered" or "bullet". Adjacent compatible sequences are merged automatically to preserve continuous numbering.
|
|
459493
|
+
• "detach": convert a list item back to a plain paragraph. Pass target:{listItem}.
|
|
459494
459494
|
|
|
459495
459495
|
ITEMS & NESTING:
|
|
459496
|
-
• "insert"
|
|
459497
|
-
• "indent" / "outdent"
|
|
459498
|
-
• "set_level"
|
|
459496
|
+
• "insert": add a new list item adjacent to an existing item in the same list. Pass target:{listItem} + position:"before"|"after" + optional text. Use this (NOT superdoc_create) to add items to an existing list.
|
|
459497
|
+
• "indent" / "outdent": bump the target item's nesting level by one (0-8 range). Pass target:{listItem}.
|
|
459498
|
+
• "set_level": jump the target item to an explicit level. Pass target:{listItem} + level:0..8.
|
|
459499
459499
|
|
|
459500
459500
|
NUMBERING (ordered lists):
|
|
459501
|
-
• "set_value"
|
|
459502
|
-
• "continue_previous"
|
|
459501
|
+
• "set_value": restart numbering at the target. Pass target:{listItem} + value:<number> (e.g. value:1 to start over) or value:null to clear a previous override. Mid-sequence targets are atomically split off into their own sequence.
|
|
459502
|
+
• "continue_previous": make the target's sequence continue numbering from the nearest compatible previous sequence (same abstract definition). Pass target:{listItem of the sequence you want to renumber}. Fails with NO_COMPATIBLE_PREVIOUS or INCOMPATIBLE_DEFINITIONS if no matching prior sequence exists.
|
|
459503
459503
|
|
|
459504
459504
|
SEQUENCE SHAPE (merge / split):
|
|
459505
|
-
• "merge"
|
|
459506
|
-
• "split"
|
|
459505
|
+
• "merge": merge the target's sequence with an adjacent one into one continuous list. Pass target:{listItem} + direction:"withPrevious" or "withNext". Absorbed items adopt the absorbing sequence's numbering definition, and empty paragraphs between the two sequences are removed so numbering flows continuously.
|
|
459506
|
+
• "split": split the target's sequence at the target item into two independent lists. The target and everything after become a new sequence that restarts numbering at 1. Pass target:{listItem}; add restartNumbering:false to keep the count continuing instead of restarting.`,
|
|
459507
459507
|
inputSchema: {
|
|
459508
459508
|
type: "object",
|
|
459509
459509
|
properties: {
|
|
@@ -459585,7 +459585,7 @@ SEQUENCE SHAPE (merge / split):
|
|
|
459585
459585
|
},
|
|
459586
459586
|
mode: {
|
|
459587
459587
|
type: "string",
|
|
459588
|
-
description: "Required. 'fromParagraphs' converts existing paragraphs into list items
|
|
459588
|
+
description: "Required. 'fromParagraphs' converts existing paragraphs into list items: each paragraph becomes one item, so create one paragraph per item first. 'empty' creates a new empty list at 'at'. Required for action 'create'.",
|
|
459589
459589
|
enum: [
|
|
459590
459590
|
"empty",
|
|
459591
459591
|
"fromParagraphs"
|