@mondaydotcomorg/agent-toolkit 5.10.2 → 5.10.3

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.
@@ -1732,7 +1732,7 @@
1732
1732
  }
1733
1733
  }
1734
1734
  }
1735
- `;function Kc(e){if(e)return e}function Jc(e){if(e)return e}function Xc(e){if(e)return{bold:e.bold,italic:e.italic,underline:e.underline,strike:e.strike,code:e.code,link:e.link,color:e.color,background:e.background}}function Zc(e){return e.map((e=>{if("mention"in e.insert){const t=Number(e.insert.mention.id);if(Number.isNaN(t))throw new Error(`Invalid mention id: "${e.insert.mention.id}" is not a valid numeric ID`);return{insert:{blot:{mention:{id:String(t),type:e.insert.mention.type}}}}}return"column_value"in e.insert?{insert:{blot:{column_value:{item_id:String(e.insert.column_value.item_id),column_id:e.insert.column_value.column_id}}}}:{insert:{text:e.insert.text},attributes:Xc(e.attributes)}}))}function eu(e){return e.map((e=>{if("mention"in e.insert){const t=Number(e.insert.mention.id);if(Number.isNaN(t))throw new Error(`Invalid mention id: "${e.insert.mention.id}" is not a valid numeric ID`);return{insert:{mention:{id:t,type:e.insert.mention.type}}}}return"column_value"in e.insert?{insert:{macro:{type:"COLUMN_VALUE",macroId:a.randomUUID(),macroData:{itemId:Number(e.insert.column_value.item_id),columnId:e.insert.column_value.column_id}}}}:{insert:e.insert.text,attributes:Xc(e.attributes)}}))}function tu(e,t){const a=e.attributes||{},i=a.comments||[];return{...e,attributes:{...a,comments:[...i,t]}}}function au(e,t,a,i){const n=a+i;let o=0;const r=[];for(const i of e){const e=i.insert;if(null==e)throw new Error(`Unexpected delta op at position ${o}: op has no 'insert' field. Block content may be from an unsupported block type.`);const d=o,p=d+("string"==typeof e?e.length:1),s=Math.max(d,a),l=Math.min(p,n);s>=l?r.push(i):"string"!=typeof e?r.push(tu(i,t)):(s>d&&r.push({...i,insert:e.slice(0,s-d)}),r.push(tu({...i,insert:e.slice(s-d,l-d)},t)),l<p&&r.push({...i,insert:e.slice(l-d)})),o=p}return r}const iu=o.z.object({bold:o.z.boolean().optional(),italic:o.z.boolean().optional(),underline:o.z.boolean().optional(),strike:o.z.boolean().optional(),code:o.z.boolean().optional(),link:o.z.string().optional(),color:o.z.string().optional(),background:o.z.string().optional()}).optional(),nu=o.z.object({mention:o.z.object({id:o.z.union([o.z.string(),o.z.number()]).describe("User, doc, or board ID. Get user IDs from list_users_and_teams."),type:o.z.enum(["USER","DOC","BOARD"]).default("USER").describe("Mention type. USER is most common.")}).describe("Mention blot — tags a user, doc, or board inline. Do not set attributes on mention ops.")}),ou=o.z.object({column_value:o.z.object({item_id:o.z.union([o.z.string(),o.z.number()]).describe("The board item ID."),column_id:o.z.string().describe('The column ID (e.g. "status", "date4"). Get column IDs from get_board_schema.')}).describe("Column value blot — embeds a live board column value inline in the doc.")}),ru=o.z.object({insert:o.z.union([o.z.object({text:o.z.string()}),nu,ou]).describe('Content to insert. Use {text: "..."} for plain text, {mention: {id, type}} to tag a user/doc/board, or {column_value: {item_id, column_id}} to embed a live column value. The last operation in the array must be {text: "\\n"}.'),attributes:iu.describe("Optional formatting: bold, italic, underline, strike, code, link, color, background. Not applicable to mention or column_value ops.")}),du=o.z.object({block_content_type:o.z.literal("text"),delta_format:o.z.array(ru).min(1).describe('Array of delta operations. Last op must be {insert: {text: "\\n"}}.'),alignment:o.z.enum(["LEFT","RIGHT","CENTER"]).optional(),direction:o.z.enum(["LTR","RTL"]).optional()}),pu=o.z.object({block_content_type:o.z.literal("code"),delta_format:o.z.array(ru).min(1).describe('Array of delta operations. Last op must be {insert: {text: "\\n"}}.'),language:o.z.string().optional().describe('Programming language (e.g. "javascript", "python").')}),su=o.z.object({block_content_type:o.z.literal("list_item"),delta_format:o.z.array(ru).min(1).describe('Array of delta operations. Last op must be {insert: {text: "\\n"}}.'),checked:o.z.boolean().optional().describe("Check state for CHECK_LIST items."),indentation:o.z.number().int().min(0).optional().describe("Nesting level (0 = no indent).")}),lu=o.z.discriminatedUnion("block_content_type",[du,pu,su]),mu=o.z.object({block_type:o.z.literal("text"),text_block_type:o.z.enum(["NORMAL_TEXT","LARGE_TITLE","MEDIUM_TITLE","SMALL_TITLE","QUOTE"]).optional().describe("Block subtype. LARGE_TITLE=H1, MEDIUM_TITLE=H2, SMALL_TITLE=H3."),delta_format:o.z.array(ru).min(1).describe('Array of delta operations. Last op must be {insert: {text: "\\n"}}.'),alignment:o.z.enum(["LEFT","RIGHT","CENTER"]).optional(),direction:o.z.enum(["LTR","RTL"]).optional()}),cu=o.z.object({block_type:o.z.literal("list_item"),list_block_type:o.z.enum(["BULLETED_LIST","NUMBERED_LIST","CHECK_LIST"]).optional().describe("List type. Defaults to BULLETED_LIST."),delta_format:o.z.array(ru).min(1).describe('Array of delta operations. Last op must be {insert: {text: "\\n"}}.'),indentation:o.z.number().int().min(0).optional().describe("Nesting level (0 = no indent).")}),uu=o.z.object({block_type:o.z.literal("code"),delta_format:o.z.array(ru).min(1).describe('Array of delta operations. Last op must be {insert: {text: "\\n"}}.'),language:o.z.string().optional().describe('Programming language (e.g. "javascript", "python").')}),hu=o.z.object({block_type:o.z.literal("divider")}),fu=o.z.object({block_type:o.z.literal("page_break")}),_u=o.z.object({block_type:o.z.literal("image"),public_url:o.z.string().url().optional().describe("Publicly accessible image URL. Provide either public_url or asset_id."),asset_id:o.z.union([o.z.number().int(),o.z.string().regex(/^\d+$/).transform(Number)]).optional().describe("monday.com asset ID for the image. The image block will reference the asset directly. Provide either public_url or asset_id."),width:o.z.number().int().min(1).optional().describe("Width in pixels.")}),vu=o.z.object({block_type:o.z.literal("video"),raw_url:o.z.string().url().describe("Video URL (YouTube, Vimeo, or direct video URL)."),width:o.z.number().int().min(1).optional().describe("Width in pixels.")}),bu=o.z.object({block_type:o.z.literal("notice_box"),theme:o.z.enum(["INFO","TIPS","WARNING","GENERAL"]).describe("Visual style of the notice box.")}),gu=o.z.object({block_type:o.z.literal("table"),row_count:o.z.number().int().min(1).max(25).describe("Number of rows (1–25)."),column_count:o.z.number().int().min(1).max(10).describe("Number of columns (1–10)."),width:o.z.number().int().optional().describe("Table width in pixels."),column_style:o.z.array(o.z.object({width:o.z.number().int()})).optional().describe("Column widths. Array length must match column_count. Widths must sum to 100.")}),yu=o.z.object({block_type:o.z.literal("layout"),column_count:o.z.number().int().min(2).max(6).describe("Number of columns (2–6)."),column_style:o.z.array(o.z.object({width:o.z.number().int()})).optional().describe("Column widths. Array length must match column_count. Widths must sum to 100.")}),wu=o.z.discriminatedUnion("block_type",[mu,cu,uu,hu,fu,_u,vu,bu,gu,yu]),Iu=o.z.object({operation_type:o.z.literal("set_name"),name:o.z.string().min(1).describe("New document name.")}),Tu=o.z.object({operation_type:o.z.literal("add_markdown_content"),markdown:o.z.string().describe("Markdown content to convert and append (or insert) as blocks."),after_block_id:o.z.string().optional().describe("Insert after this block ID. Omit to append at end. Block IDs come from read_docs.")}),Eu=o.z.object({operation_type:o.z.literal("update_block"),block_id:o.z.string().describe("ID of the block to update. Get block IDs from read_docs."),content:lu.describe("New content for the block. Use block_content_type to select: text (updates text/heading/quote content), code (updates code content), list_item (updates bullets/numbered/todo content). Cannot change block subtype — use replace_block for that.")}),Nu=o.z.object({operation_type:o.z.literal("create_block"),after_block_id:o.z.string().optional().describe("Insert after this block ID. Omit to append at end. Block IDs come from read_docs."),parent_block_id:o.z.string().optional().describe("Parent block ID for nested blocks. Only works for notice_box containers — use the notice_box block ID directly. Table/layout cell nesting is NOT supported by the API. IMPORTANT: A notice_box created in the same call cannot be referenced — use a separate call first to create it, then a second call to nest content inside it."),block:wu.describe("The block to create. Use block_type to select the block type.")}),Su=o.z.object({operation_type:o.z.literal("delete_block"),block_id:o.z.string().describe("ID of the block to permanently delete. Works for all block types including BOARD, WIDGET, DOC embed, GIPHY.")}),Du=o.z.object({operation_type:o.z.literal("replace_block"),block_id:o.z.string().describe("ID of the block to delete."),after_block_id:o.z.string().optional().describe("Insert replacement after this block ID. Provide the ID of the block that precedes the deleted block."),parent_block_id:o.z.string().optional().describe("Parent block ID for the replacement block."),block:wu.describe("The new block to create in place of the deleted one.")}),Au=o.z.object({operation_type:o.z.literal("add_comment"),body:o.z.string().min(1).describe("The comment text. Use HTML tags for formatting (not markdown). Do not use @ to mention users — use mentions_list instead."),parent_update_id:o.z.number().optional().describe("The ID of an existing comment (update) to reply to. Omit to create a new top-level comment. Get comment IDs from read_docs with include_comments: true."),mentions_list:o.z.string().optional().describe('Optional JSON array of mentions: [{"id": "123", "type": "User"}, {"id": "456", "type": "Team"}]. Valid types: User, Team, Board, Project.'),block_id:o.z.union([o.z.string(),o.z.array(o.z.string()).min(1)]).optional().describe("Block ID (string) or array of block IDs to anchor the comment to. When an array is provided, the same comment highlights all specified blocks. Only works on text-content blocks (text, code, list_item, title, quote) — not on divider, table, layout, notice_box, image, video, or giphy. Get block IDs from read_docs with include_blocks: true. Omit to create a general doc-level comment. Pair with selection_from + selection_length (single block_id only) to comment on a specific text range."),selection_from:o.z.number().int().min(0).optional().describe("Start character offset (0-indexed) of the selected text within the block. Requires block_id. Omit to comment on the entire block."),selection_length:o.z.number().int().min(1).optional().describe("Number of characters in the text selection. Requires block_id and selection_from. Only works for text, code, and list_item blocks that have a delta format.")}),ku=o.z.discriminatedUnion("operation_type",[Iu,Tu,Eu,Nu,Su,Du,Au]),Ou={doc_id:o.z.string().min(1).optional().describe("The document ID (the id field from read_docs). Takes priority over object_id if both are provided."),object_id:o.z.string().min(1).optional().describe("The document object ID (the object_id field from read_docs, visible in the document URL). Resolved to doc_id."),operations:o.z.array(ku).min(1).max(25).describe('Ordered list of operations to perform. Executed sequentially. Stops at first failure.\n\nOperation types:\n- set_name: Rename the document.\n- add_markdown_content: Append markdown as blocks (simplest for text/lists/tables).\n- update_block: Change content of an existing text/code/list/divider block.\n- create_block: Create a new block at a specific position (supports text, list_item, code, divider, page_break, image, video, notice_box, table, layout).\n- delete_block: Permanently remove a block. Works for ALL block types including BOARD, WIDGET, DOC embed, GIPHY.\n- replace_block: Delete a block and create a new one in its place. Use for: changing image/video source, table restructure, notice_box theme change.\n- add_comment: Create a new comment or reply on the document. Use parent_update_id to reply to an existing comment. Format text with HTML. Uses the doc\'s backing board item.\n\nWHEN TO USE WHICH:\n- Adding new text sections → add_markdown_content\n- Adding asset-based images → create_block with block_type "image" and asset_id (add_markdown_content does NOT support asset images)\n- Mixed content with asset images → alternate add_markdown_content (for text) and create_block (for each image) in sequence\n- Editing existing text block → update_block\n- Changing an image URL → replace_block (image URL is immutable after creation)\n- Changing video URL → replace_block\n- Restructuring a table → replace_block\n- BOARD/WIDGET/DOC/GIPHY blocks → delete_block only (no public API to create these)\n\nNESTING CONTENT IN CONTAINERS:\n- notice_box: Fully supported. Create the notice_box first, then in a separate call create child blocks with parent_block_id set to the notice_box ID. You cannot reference a block ID created in the same call.\n- table: Cell-level API nesting is NOT supported. To create a table with content, use add_markdown_content with a markdown table (e.g. "| H1 | H2 |\\n| --- | --- |\\n| A | B |"). This creates a pre-populated table in one shot. Empty tables created via create_block cannot have their cells populated through the API.\n- layout: Cell-level API nesting is NOT supported and there is no markdown equivalent. Layouts can only be created empty via create_block. No workaround exists to populate layout columns through the API.\nDeleting a container does NOT delete its children — delete children first for clean removal.\n\nBlock IDs are available in the blocks array returned by read_docs.')};const $u=fp`
1735
+ `;function Kc(e){if(e)return e}function Jc(e){if(e)return e}function Xc(e){if(e)return{bold:e.bold,italic:e.italic,underline:e.underline,strike:e.strike,code:e.code,link:e.link,color:e.color,background:e.background}}function Zc(e){return e.map((e=>{if("mention"in e.insert){const t=Number(e.insert.mention.id);if(Number.isNaN(t))throw new Error(`Invalid mention id: "${e.insert.mention.id}" is not a valid numeric ID`);return{insert:{blot:{mention:{id:String(t),type:e.insert.mention.type}}}}}return"column_value"in e.insert?{insert:{blot:{column_value:{item_id:String(e.insert.column_value.item_id),column_id:e.insert.column_value.column_id}}}}:{insert:{text:e.insert.text},attributes:Xc(e.attributes)}}))}function eu(e){return e.map((e=>{if("mention"in e.insert){const t=Number(e.insert.mention.id);if(Number.isNaN(t))throw new Error(`Invalid mention id: "${e.insert.mention.id}" is not a valid numeric ID`);return{insert:{mention:{id:t,type:e.insert.mention.type}}}}return"column_value"in e.insert?{insert:{macro:{type:"COLUMN_VALUE",macroId:a.randomUUID(),macroData:{itemId:Number(e.insert.column_value.item_id),columnId:e.insert.column_value.column_id}}}}:{insert:e.insert.text,attributes:Xc(e.attributes)}}))}function tu(e,t){const a=e.attributes||{},i=a.comments||[];return{...e,attributes:{...a,comments:[...i,t]}}}function au(e,t,a,i){const n=a+i;let o=0;const r=[];for(const i of e){const e=i.insert;if(null==e)throw new Error(`Unexpected delta op at position ${o}: op has no 'insert' field. Block content may be from an unsupported block type.`);const d=o,p=d+("string"==typeof e?e.length:1),s=Math.max(d,a),l=Math.min(p,n);s>=l?r.push(i):"string"!=typeof e?r.push(tu(i,t)):(s>d&&r.push({...i,insert:e.slice(0,s-d)}),r.push(tu({...i,insert:e.slice(s-d,l-d)},t)),l<p&&r.push({...i,insert:e.slice(l-d)})),o=p}return r}const iu=o.z.object({bold:o.z.boolean().optional(),italic:o.z.boolean().optional(),underline:o.z.boolean().optional(),strike:o.z.boolean().optional(),code:o.z.boolean().optional(),link:o.z.string().optional(),color:o.z.string().optional(),background:o.z.string().optional()}).optional(),nu=o.z.object({mention:o.z.object({id:o.z.union([o.z.string(),o.z.number()]).describe("User, doc, or board ID. Get user IDs from list_users_and_teams."),type:o.z.enum(["USER","DOC","BOARD"]).default("USER").describe("Mention type. USER is most common.")}).describe("Mention blot — tags a user, doc, or board inline. Do not set attributes on mention ops.")}),ou=o.z.object({column_value:o.z.object({item_id:o.z.union([o.z.string(),o.z.number()]).describe("The board item ID."),column_id:o.z.string().describe('The column ID (e.g. "status", "date4"). Get column IDs from get_board_schema.')}).describe("Column value blot — embeds a live board column value inline in the doc.")}),ru=o.z.object({insert:o.z.union([o.z.string().transform((e=>({text:e}))),o.z.object({text:o.z.string()}),nu,ou]).describe('Content to insert. Use {text: "..."} for plain text, {mention: {id, type}} to tag a user/doc/board, or {column_value: {item_id, column_id}} to embed a live column value. The last operation in the array must be {text: "\\n"}.'),attributes:iu.describe("Optional formatting: bold, italic, underline, strike, code, link, color, background. Not applicable to mention or column_value ops.")}),du=o.z.object({block_content_type:o.z.literal("text"),delta_format:o.z.array(ru).min(1).describe('Array of delta operations. Last op must be {insert: {text: "\\n"}}.'),alignment:o.z.enum(["LEFT","RIGHT","CENTER"]).optional(),direction:o.z.enum(["LTR","RTL"]).optional()}),pu=o.z.object({block_content_type:o.z.literal("code"),delta_format:o.z.array(ru).min(1).describe('Array of delta operations. Last op must be {insert: {text: "\\n"}}.'),language:o.z.string().optional().describe('Programming language (e.g. "javascript", "python").')}),su=o.z.object({block_content_type:o.z.literal("list_item"),delta_format:o.z.array(ru).min(1).describe('Array of delta operations. Last op must be {insert: {text: "\\n"}}.'),checked:o.z.boolean().optional().describe("Check state for CHECK_LIST items."),indentation:o.z.number().int().min(0).optional().describe("Nesting level (0 = no indent).")}),lu=o.z.discriminatedUnion("block_content_type",[du,pu,su]),mu=o.z.object({block_type:o.z.literal("text"),text_block_type:o.z.enum(["NORMAL_TEXT","LARGE_TITLE","MEDIUM_TITLE","SMALL_TITLE","QUOTE"]).optional().describe("Block subtype. LARGE_TITLE=H1, MEDIUM_TITLE=H2, SMALL_TITLE=H3."),delta_format:o.z.array(ru).min(1).describe('Array of delta operations. Last op must be {insert: {text: "\\n"}}.'),alignment:o.z.enum(["LEFT","RIGHT","CENTER"]).optional(),direction:o.z.enum(["LTR","RTL"]).optional()}),cu=o.z.object({block_type:o.z.literal("list_item"),list_block_type:o.z.enum(["BULLETED_LIST","NUMBERED_LIST","CHECK_LIST"]).optional().describe("List type. Defaults to BULLETED_LIST."),delta_format:o.z.array(ru).min(1).describe('Array of delta operations. Last op must be {insert: {text: "\\n"}}.'),indentation:o.z.number().int().min(0).optional().describe("Nesting level (0 = no indent).")}),uu=o.z.object({block_type:o.z.literal("code"),delta_format:o.z.array(ru).min(1).describe('Array of delta operations. Last op must be {insert: {text: "\\n"}}.'),language:o.z.string().optional().describe('Programming language (e.g. "javascript", "python").')}),hu=o.z.object({block_type:o.z.literal("divider")}),fu=o.z.object({block_type:o.z.literal("page_break")}),_u=o.z.object({block_type:o.z.literal("image"),public_url:o.z.string().url().optional().describe("Publicly accessible image URL. Provide either public_url or asset_id."),asset_id:o.z.union([o.z.number().int(),o.z.string().regex(/^\d+$/).transform(Number)]).optional().describe("monday.com asset ID for the image. The image block will reference the asset directly. Provide either public_url or asset_id."),width:o.z.number().int().min(1).optional().describe("Width in pixels.")}),vu=o.z.object({block_type:o.z.literal("video"),raw_url:o.z.string().url().describe("Video URL (YouTube, Vimeo, or direct video URL)."),width:o.z.number().int().min(1).optional().describe("Width in pixels.")}),bu=o.z.object({block_type:o.z.literal("notice_box"),theme:o.z.enum(["INFO","TIPS","WARNING","GENERAL"]).describe("Visual style of the notice box.")}),gu=o.z.object({block_type:o.z.literal("table"),row_count:o.z.number().int().min(1).max(25).describe("Number of rows (1–25)."),column_count:o.z.number().int().min(1).max(10).describe("Number of columns (1–10)."),width:o.z.number().int().optional().describe("Table width in pixels."),column_style:o.z.array(o.z.object({width:o.z.number().int()})).optional().describe("Column widths. Array length must match column_count. Widths must sum to 100.")}),yu=o.z.object({block_type:o.z.literal("layout"),column_count:o.z.number().int().min(2).max(6).describe("Number of columns (2–6)."),column_style:o.z.array(o.z.object({width:o.z.number().int()})).optional().describe("Column widths. Array length must match column_count. Widths must sum to 100.")}),wu=o.z.discriminatedUnion("block_type",[mu,cu,uu,hu,fu,_u,vu,bu,gu,yu]),Iu=o.z.object({operation_type:o.z.literal("set_name"),name:o.z.string().min(1).describe("New document name.")}),Tu=o.z.object({operation_type:o.z.literal("add_markdown_content"),markdown:o.z.string().describe("Markdown content to convert and append (or insert) as blocks."),after_block_id:o.z.string().optional().describe("Insert after this block ID. Omit to append at end. Block IDs come from read_docs.")}),Eu=o.z.object({operation_type:o.z.literal("update_block"),block_id:o.z.string().describe("ID of the block to update. Get block IDs from read_docs."),content:lu.describe("New content for the block. Use block_content_type to select: text (updates text/heading/quote content), code (updates code content), list_item (updates bullets/numbered/todo content). Cannot change block subtype — use replace_block for that.")}),Nu=o.z.object({operation_type:o.z.literal("create_block"),after_block_id:o.z.string().optional().describe("Insert after this block ID. Omit to append at end. Block IDs come from read_docs."),parent_block_id:o.z.string().optional().describe("Parent block ID for nested blocks. Only works for notice_box containers — use the notice_box block ID directly. Table/layout cell nesting is NOT supported by the API. IMPORTANT: A notice_box created in the same call cannot be referenced — use a separate call first to create it, then a second call to nest content inside it."),block:wu.describe("The block to create. Use block_type to select the block type.")}),Su=o.z.object({operation_type:o.z.literal("delete_block"),block_id:o.z.string().describe("ID of the block to permanently delete. Works for all block types including BOARD, WIDGET, DOC embed, GIPHY.")}),Du=o.z.object({operation_type:o.z.literal("replace_block"),block_id:o.z.string().describe("ID of the block to delete."),after_block_id:o.z.string().optional().describe("Insert replacement after this block ID. Provide the ID of the block that precedes the deleted block."),parent_block_id:o.z.string().optional().describe("Parent block ID for the replacement block."),block:wu.describe("The new block to create in place of the deleted one.")}),Au=o.z.object({operation_type:o.z.literal("add_comment"),body:o.z.string().min(1).describe("The comment text. Use HTML tags for formatting (not markdown). Do not use @ to mention users — use mentions_list instead."),parent_update_id:o.z.number().optional().describe("The ID of an existing comment (update) to reply to. Omit to create a new top-level comment. Get comment IDs from read_docs with include_comments: true."),mentions_list:o.z.string().optional().describe('Optional JSON array of mentions: [{"id": "123", "type": "User"}, {"id": "456", "type": "Team"}]. Valid types: User, Team, Board, Project.'),block_id:o.z.union([o.z.string(),o.z.array(o.z.string()).min(1)]).optional().describe("Block ID (string) or array of block IDs to anchor the comment to. When an array is provided, the same comment highlights all specified blocks. Only works on text-content blocks (text, code, list_item, title, quote) — not on divider, table, layout, notice_box, image, video, or giphy. Get block IDs from read_docs with include_blocks: true. Omit to create a general doc-level comment. Pair with selection_from + selection_length (single block_id only) to comment on a specific text range."),selection_from:o.z.number().int().min(0).optional().describe("Start character offset (0-indexed) of the selected text within the block. Requires block_id. Omit to comment on the entire block."),selection_length:o.z.number().int().min(1).optional().describe("Number of characters in the text selection. Requires block_id and selection_from. Only works for text, code, and list_item blocks that have a delta format.")}),ku=o.z.discriminatedUnion("operation_type",[Iu,Tu,Eu,Nu,Su,Du,Au]),Ou={doc_id:o.z.string().min(1).optional().describe("The document ID (the id field from read_docs). Takes priority over object_id if both are provided."),object_id:o.z.string().min(1).optional().describe("The document object ID (the object_id field from read_docs, visible in the document URL). Resolved to doc_id."),operations:o.z.array(ku).min(1).max(25).describe('Ordered list of operations to perform. Executed sequentially. Stops at first failure.\n\nOperation types:\n- set_name: Rename the document.\n- add_markdown_content: Append markdown as blocks (simplest for text/lists/tables).\n- update_block: Change content of an existing text/code/list/divider block.\n- create_block: Create a new block at a specific position (supports text, list_item, code, divider, page_break, image, video, notice_box, table, layout).\n- delete_block: Permanently remove a block. Works for ALL block types including BOARD, WIDGET, DOC embed, GIPHY.\n- replace_block: Delete a block and create a new one in its place. Use for: changing image/video source, table restructure, notice_box theme change.\n- add_comment: Create a new comment or reply on the document. Use parent_update_id to reply to an existing comment. Format text with HTML. Uses the doc\'s backing board item.\n\nWHEN TO USE WHICH:\n- Adding new text sections → add_markdown_content\n- Adding asset-based images → create_block with block_type "image" and asset_id (add_markdown_content does NOT support asset images)\n- Mixed content with asset images → alternate add_markdown_content (for text) and create_block (for each image) in sequence\n- Editing existing text block → update_block\n- Changing an image URL → replace_block (image URL is immutable after creation)\n- Changing video URL → replace_block\n- Restructuring a table → replace_block\n- BOARD/WIDGET/DOC/GIPHY blocks → delete_block only (no public API to create these)\n\nNESTING CONTENT IN CONTAINERS:\n- notice_box: Fully supported. Create the notice_box first, then in a separate call create child blocks with parent_block_id set to the notice_box ID. You cannot reference a block ID created in the same call.\n- table: Cell-level API nesting is NOT supported. To create a table with content, use add_markdown_content with a markdown table (e.g. "| H1 | H2 |\\n| --- | --- |\\n| A | B |"). This creates a pre-populated table in one shot. Empty tables created via create_block cannot have their cells populated through the API.\n- layout: Cell-level API nesting is NOT supported and there is no markdown equivalent. Layouts can only be created empty via create_block. No workaround exists to populate layout columns through the API.\nDeleting a container does NOT delete its children — delete children first for clean removal.\n\nBlock IDs are available in the blocks array returned by read_docs.')};const $u=fp`
1736
1736
  mutation CreateDashboard(
1737
1737
  $name: String!
1738
1738
  $workspace_id: ID!