@superdoc-dev/sdk 1.8.0-next.9 → 1.8.0

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.
@@ -82,7 +82,7 @@
82
82
  },
83
83
  {
84
84
  "name": "superdoc_edit",
85
- "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.",
85
+ "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.",
86
86
  "parameters": {
87
87
  "type": "object",
88
88
  "properties": {
@@ -969,7 +969,7 @@
969
969
  },
970
970
  {
971
971
  "name": "superdoc_create",
972
- "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.",
972
+ "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.",
973
973
  "parameters": {
974
974
  "type": "object",
975
975
  "properties": {
@@ -1115,7 +1115,7 @@
1115
1115
  },
1116
1116
  "text": {
1117
1117
  "type": "string",
1118
- "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."
1118
+ "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."
1119
1119
  },
1120
1120
  "input": {
1121
1121
  "type": "object",
@@ -1160,7 +1160,7 @@
1160
1160
  },
1161
1161
  {
1162
1162
  "name": "superdoc_list",
1163
- "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.\n\nCREATE & CONVERT:\n• \"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).\n• \"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).\n• \"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.\n• \"detach\" convert a list item back to a plain paragraph. Pass target:{listItem}.\n\nITEMS & NESTING:\n• \"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.\n• \"indent\" / \"outdent\" bump the target item's nesting level by one (0-8 range). Pass target:{listItem}.\n• \"set_level\" jump the target item to an explicit level. Pass target:{listItem} + level:0..8.\n\nNUMBERING (ordered lists):\n• \"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.\n• \"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.\n\nSEQUENCE SHAPE (merge / split):\n• \"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.\n• \"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.",
1163
+ "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.\n\nCREATE & CONVERT:\n• \"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).\n• \"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).\n• \"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.\n• \"detach\": convert a list item back to a plain paragraph. Pass target:{listItem}.\n\nITEMS & NESTING:\n• \"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.\n• \"indent\" / \"outdent\": bump the target item's nesting level by one (0-8 range). Pass target:{listItem}.\n• \"set_level\": jump the target item to an explicit level. Pass target:{listItem} + level:0..8.\n\nNUMBERING (ordered lists):\n• \"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.\n• \"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.\n\nSEQUENCE SHAPE (merge / split):\n• \"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.\n• \"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.",
1164
1164
  "parameters": {
1165
1165
  "type": "object",
1166
1166
  "properties": {
@@ -1242,7 +1242,7 @@
1242
1242
  },
1243
1243
  "mode": {
1244
1244
  "type": "string",
1245
- "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'.",
1245
+ "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'.",
1246
1246
  "enum": [
1247
1247
  "empty",
1248
1248
  "fromParagraphs"
@@ -1585,6 +1585,153 @@
1585
1585
  "range"
1586
1586
  ]
1587
1587
  }
1588
+ },
1589
+ "story": {
1590
+ "oneOf": [
1591
+ {
1592
+ "type": "object",
1593
+ "properties": {
1594
+ "kind": {
1595
+ "const": "story",
1596
+ "type": "string"
1597
+ },
1598
+ "storyType": {
1599
+ "const": "body",
1600
+ "type": "string"
1601
+ }
1602
+ },
1603
+ "required": [
1604
+ "kind",
1605
+ "storyType"
1606
+ ]
1607
+ },
1608
+ {
1609
+ "type": "object",
1610
+ "properties": {
1611
+ "kind": {
1612
+ "const": "story",
1613
+ "type": "string"
1614
+ },
1615
+ "storyType": {
1616
+ "const": "headerFooterSlot",
1617
+ "type": "string"
1618
+ },
1619
+ "section": {
1620
+ "type": "object",
1621
+ "properties": {
1622
+ "kind": {
1623
+ "const": "section",
1624
+ "type": "string"
1625
+ },
1626
+ "sectionId": {
1627
+ "type": "string"
1628
+ }
1629
+ },
1630
+ "required": [
1631
+ "kind",
1632
+ "sectionId"
1633
+ ]
1634
+ },
1635
+ "headerFooterKind": {
1636
+ "enum": [
1637
+ "header",
1638
+ "footer"
1639
+ ]
1640
+ },
1641
+ "variant": {
1642
+ "enum": [
1643
+ "default",
1644
+ "first",
1645
+ "even"
1646
+ ]
1647
+ },
1648
+ "resolution": {
1649
+ "enum": [
1650
+ "effective",
1651
+ "explicit"
1652
+ ]
1653
+ },
1654
+ "onWrite": {
1655
+ "enum": [
1656
+ "materializeIfInherited",
1657
+ "editResolvedPart",
1658
+ "error"
1659
+ ]
1660
+ }
1661
+ },
1662
+ "required": [
1663
+ "kind",
1664
+ "storyType",
1665
+ "section",
1666
+ "headerFooterKind",
1667
+ "variant"
1668
+ ]
1669
+ },
1670
+ {
1671
+ "type": "object",
1672
+ "properties": {
1673
+ "kind": {
1674
+ "const": "story",
1675
+ "type": "string"
1676
+ },
1677
+ "storyType": {
1678
+ "const": "headerFooterPart",
1679
+ "type": "string"
1680
+ },
1681
+ "refId": {
1682
+ "type": "string"
1683
+ }
1684
+ },
1685
+ "required": [
1686
+ "kind",
1687
+ "storyType",
1688
+ "refId"
1689
+ ]
1690
+ },
1691
+ {
1692
+ "type": "object",
1693
+ "properties": {
1694
+ "kind": {
1695
+ "const": "story",
1696
+ "type": "string"
1697
+ },
1698
+ "storyType": {
1699
+ "const": "footnote",
1700
+ "type": "string"
1701
+ },
1702
+ "noteId": {
1703
+ "type": "string"
1704
+ }
1705
+ },
1706
+ "required": [
1707
+ "kind",
1708
+ "storyType",
1709
+ "noteId"
1710
+ ]
1711
+ },
1712
+ {
1713
+ "type": "object",
1714
+ "properties": {
1715
+ "kind": {
1716
+ "const": "story",
1717
+ "type": "string"
1718
+ },
1719
+ "storyType": {
1720
+ "const": "endnote",
1721
+ "type": "string"
1722
+ },
1723
+ "noteId": {
1724
+ "type": "string"
1725
+ }
1726
+ },
1727
+ "required": [
1728
+ "kind",
1729
+ "storyType",
1730
+ "noteId"
1731
+ ]
1732
+ }
1733
+ ],
1734
+ "description": "Story scope. Defaults to document body when omitted. Use {kind:'story', storyType:'body'} for body, or other storyType values for headers, footers, footnotes, endnotes."
1588
1735
  }
1589
1736
  },
1590
1737
  "required": [
@@ -1605,9 +1752,10 @@
1605
1752
  },
1606
1753
  "status": {
1607
1754
  "type": "string",
1608
- "description": "Set comment status. Use 'resolved' to mark as resolved. Only for action 'update'. Omit for other actions.",
1755
+ "description": "Set comment status. Use 'resolved' to resolve a comment, or 'active' to reopen a previously resolved comment (lifecycle inverse). Only for action 'update'. Omit for other actions.",
1609
1756
  "enum": [
1610
- "resolved"
1757
+ "resolved",
1758
+ "active"
1611
1759
  ]
1612
1760
  },
1613
1761
  "isInternal": {
@@ -66,7 +66,7 @@
66
66
  "type": "function",
67
67
  "function": {
68
68
  "name": "superdoc_edit",
69
- "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.",
69
+ "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.",
70
70
  "parameters": {
71
71
  "type": "object",
72
72
  "properties": {
@@ -917,7 +917,7 @@
917
917
  "type": "function",
918
918
  "function": {
919
919
  "name": "superdoc_create",
920
- "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.",
920
+ "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.",
921
921
  "parameters": {
922
922
  "type": "object",
923
923
  "properties": {
@@ -1063,7 +1063,7 @@
1063
1063
  },
1064
1064
  "text": {
1065
1065
  "type": "string",
1066
- "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."
1066
+ "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."
1067
1067
  },
1068
1068
  "input": {
1069
1069
  "type": "object",
@@ -1093,7 +1093,7 @@
1093
1093
  "type": "function",
1094
1094
  "function": {
1095
1095
  "name": "superdoc_list",
1096
- "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.\n\nCREATE & CONVERT:\n• \"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).\n• \"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).\n• \"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.\n• \"detach\" convert a list item back to a plain paragraph. Pass target:{listItem}.\n\nITEMS & NESTING:\n• \"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.\n• \"indent\" / \"outdent\" bump the target item's nesting level by one (0-8 range). Pass target:{listItem}.\n• \"set_level\" jump the target item to an explicit level. Pass target:{listItem} + level:0..8.\n\nNUMBERING (ordered lists):\n• \"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.\n• \"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.\n\nSEQUENCE SHAPE (merge / split):\n• \"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.\n• \"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.",
1096
+ "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.\n\nCREATE & CONVERT:\n• \"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).\n• \"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).\n• \"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.\n• \"detach\": convert a list item back to a plain paragraph. Pass target:{listItem}.\n\nITEMS & NESTING:\n• \"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.\n• \"indent\" / \"outdent\": bump the target item's nesting level by one (0-8 range). Pass target:{listItem}.\n• \"set_level\": jump the target item to an explicit level. Pass target:{listItem} + level:0..8.\n\nNUMBERING (ordered lists):\n• \"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.\n• \"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.\n\nSEQUENCE SHAPE (merge / split):\n• \"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.\n• \"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.",
1097
1097
  "parameters": {
1098
1098
  "type": "object",
1099
1099
  "properties": {
@@ -1175,7 +1175,7 @@
1175
1175
  },
1176
1176
  "mode": {
1177
1177
  "type": "string",
1178
- "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'.",
1178
+ "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'.",
1179
1179
  "enum": [
1180
1180
  "empty",
1181
1181
  "fromParagraphs"
@@ -1494,6 +1494,153 @@
1494
1494
  "range"
1495
1495
  ]
1496
1496
  }
1497
+ },
1498
+ "story": {
1499
+ "oneOf": [
1500
+ {
1501
+ "type": "object",
1502
+ "properties": {
1503
+ "kind": {
1504
+ "const": "story",
1505
+ "type": "string"
1506
+ },
1507
+ "storyType": {
1508
+ "const": "body",
1509
+ "type": "string"
1510
+ }
1511
+ },
1512
+ "required": [
1513
+ "kind",
1514
+ "storyType"
1515
+ ]
1516
+ },
1517
+ {
1518
+ "type": "object",
1519
+ "properties": {
1520
+ "kind": {
1521
+ "const": "story",
1522
+ "type": "string"
1523
+ },
1524
+ "storyType": {
1525
+ "const": "headerFooterSlot",
1526
+ "type": "string"
1527
+ },
1528
+ "section": {
1529
+ "type": "object",
1530
+ "properties": {
1531
+ "kind": {
1532
+ "const": "section",
1533
+ "type": "string"
1534
+ },
1535
+ "sectionId": {
1536
+ "type": "string"
1537
+ }
1538
+ },
1539
+ "required": [
1540
+ "kind",
1541
+ "sectionId"
1542
+ ]
1543
+ },
1544
+ "headerFooterKind": {
1545
+ "enum": [
1546
+ "header",
1547
+ "footer"
1548
+ ]
1549
+ },
1550
+ "variant": {
1551
+ "enum": [
1552
+ "default",
1553
+ "first",
1554
+ "even"
1555
+ ]
1556
+ },
1557
+ "resolution": {
1558
+ "enum": [
1559
+ "effective",
1560
+ "explicit"
1561
+ ]
1562
+ },
1563
+ "onWrite": {
1564
+ "enum": [
1565
+ "materializeIfInherited",
1566
+ "editResolvedPart",
1567
+ "error"
1568
+ ]
1569
+ }
1570
+ },
1571
+ "required": [
1572
+ "kind",
1573
+ "storyType",
1574
+ "section",
1575
+ "headerFooterKind",
1576
+ "variant"
1577
+ ]
1578
+ },
1579
+ {
1580
+ "type": "object",
1581
+ "properties": {
1582
+ "kind": {
1583
+ "const": "story",
1584
+ "type": "string"
1585
+ },
1586
+ "storyType": {
1587
+ "const": "headerFooterPart",
1588
+ "type": "string"
1589
+ },
1590
+ "refId": {
1591
+ "type": "string"
1592
+ }
1593
+ },
1594
+ "required": [
1595
+ "kind",
1596
+ "storyType",
1597
+ "refId"
1598
+ ]
1599
+ },
1600
+ {
1601
+ "type": "object",
1602
+ "properties": {
1603
+ "kind": {
1604
+ "const": "story",
1605
+ "type": "string"
1606
+ },
1607
+ "storyType": {
1608
+ "const": "footnote",
1609
+ "type": "string"
1610
+ },
1611
+ "noteId": {
1612
+ "type": "string"
1613
+ }
1614
+ },
1615
+ "required": [
1616
+ "kind",
1617
+ "storyType",
1618
+ "noteId"
1619
+ ]
1620
+ },
1621
+ {
1622
+ "type": "object",
1623
+ "properties": {
1624
+ "kind": {
1625
+ "const": "story",
1626
+ "type": "string"
1627
+ },
1628
+ "storyType": {
1629
+ "const": "endnote",
1630
+ "type": "string"
1631
+ },
1632
+ "noteId": {
1633
+ "type": "string"
1634
+ }
1635
+ },
1636
+ "required": [
1637
+ "kind",
1638
+ "storyType",
1639
+ "noteId"
1640
+ ]
1641
+ }
1642
+ ],
1643
+ "description": "Story scope. Defaults to document body when omitted. Use {kind:'story', storyType:'body'} for body, or other storyType values for headers, footers, footnotes, endnotes."
1497
1644
  }
1498
1645
  },
1499
1646
  "required": [
@@ -1514,9 +1661,10 @@
1514
1661
  },
1515
1662
  "status": {
1516
1663
  "type": "string",
1517
- "description": "Set comment status. Use 'resolved' to mark as resolved. Only for action 'update'. Omit for other actions.",
1664
+ "description": "Set comment status. Use 'resolved' to resolve a comment, or 'active' to reopen a previously resolved comment (lifecycle inverse). Only for action 'update'. Omit for other actions.",
1518
1665
  "enum": [
1519
- "resolved"
1666
+ "resolved",
1667
+ "active"
1520
1668
  ]
1521
1669
  },
1522
1670
  "isInternal": {