[{"data":1,"prerenderedAt":1570},["ShallowReactive",2],{"navigation_docs_en":3,"-en-getting-started-ai-tools":335,"-en-getting-started-ai-tools-surround":1565},[4,31,61,91,175,256],{"title":5,"icon":6,"path":7,"stem":8,"children":9,"page":30},"Getting Started","i-lucide-rocket","\u002Fen\u002Fgetting-started","en\u002F01.getting-started",[10,14,18,22,26],{"title":11,"path":12,"stem":13},"Introduction","\u002Fen\u002Fgetting-started\u002Fintroduction","en\u002F01.getting-started\u002F01.introduction",{"title":15,"path":16,"stem":17},"Installation","\u002Fen\u002Fgetting-started\u002Finstallation","en\u002F01.getting-started\u002F02.installation",{"title":19,"path":20,"stem":21},"Command Line Interface (CLI)","\u002Fen\u002Fgetting-started\u002Fcommand-line-interface","en\u002F01.getting-started\u002F03.command-line-interface",{"title":23,"path":24,"stem":25},"AI Tools","\u002Fen\u002Fgetting-started\u002Fai-tools","en\u002F01.getting-started\u002F04.ai-tools",{"title":27,"path":28,"stem":29},"AI Integration","\u002Fen\u002Fgetting-started\u002Fai-integration","en\u002F01.getting-started\u002F05.ai-integration",false,{"title":32,"icon":33,"path":34,"stem":35,"children":36,"page":30},"CORE","i-lucide-box","\u002Fen\u002Fcore","en\u002F02.core",[37,41,45,49,53,57],{"title":38,"path":39,"stem":40},"@office-open\u002Fcore","\u002Fen\u002Fcore\u002Foverview","en\u002F02.core\u002F01.overview",{"title":42,"path":43,"stem":44},"Descriptor System","\u002Fen\u002Fcore\u002Fdescriptors","en\u002F02.core\u002F02.descriptors",{"title":46,"path":47,"stem":48},"Values and Validation","\u002Fen\u002Fcore\u002Fvalues","en\u002F02.core\u002F03.values",{"title":50,"path":51,"stem":52},"Unit Converters","\u002Fen\u002Fcore\u002Fconverters","en\u002F02.core\u002F04.converters",{"title":54,"path":55,"stem":56},"Charts","\u002Fen\u002Fcore\u002Fcharts","en\u002F02.core\u002F05.charts",{"title":58,"path":59,"stem":60},"Parser","\u002Fen\u002Fcore\u002Fparser","en\u002F02.core\u002F06.parser",{"title":62,"icon":63,"path":64,"stem":65,"children":66,"page":30},"XML","i-lucide-code-xml","\u002Fen\u002Fxml","en\u002F03.xml",[67,71,75,79,83,87],{"title":68,"path":69,"stem":70},"@office-open\u002Fxml","\u002Fen\u002Fxml\u002Foverview","en\u002F03.xml\u002F01.overview",{"title":72,"path":73,"stem":74},"Parsing","\u002Fen\u002Fxml\u002Fparsing","en\u002F03.xml\u002F02.parsing",{"title":76,"path":77,"stem":78},"Serialization","\u002Fen\u002Fxml\u002Fserialization","en\u002F03.xml\u002F03.serialization",{"title":80,"path":81,"stem":82},"Query Utilities","\u002Fen\u002Fxml\u002Fquery-utilities","en\u002F03.xml\u002F04.query-utilities",{"title":84,"path":85,"stem":86},"XML Escape","\u002Fen\u002Fxml\u002Fescape","en\u002F03.xml\u002F05.escape",{"title":88,"path":89,"stem":90},"Type Reference","\u002Fen\u002Fxml\u002Ftypes","en\u002F03.xml\u002F06.types",{"title":92,"icon":93,"path":94,"stem":95,"children":96,"page":30},"DOCX","i-lucide-file-text","\u002Fen\u002Fdocx","en\u002F04.docx",[97,101,105,109,113,117,121,124,128,132,136,140,144,148,152,156,160,164,168,171],{"title":98,"path":99,"stem":100},"@office-open\u002Fdocx","\u002Fen\u002Fdocx\u002Foverview","en\u002F04.docx\u002F01.overview",{"title":102,"path":103,"stem":104},"Quick Start","\u002Fen\u002Fdocx\u002Fquickstart","en\u002F04.docx\u002F02.quickstart",{"title":106,"path":107,"stem":108},"Text and Paragraphs","\u002Fen\u002Fdocx\u002Ftext-and-paragraphs","en\u002F04.docx\u002F03.text-and-paragraphs",{"title":110,"path":111,"stem":112},"Tables","\u002Fen\u002Fdocx\u002Ftables","en\u002F04.docx\u002F04.tables",{"title":114,"path":115,"stem":116},"Images","\u002Fen\u002Fdocx\u002Fimages","en\u002F04.docx\u002F05.images",{"title":118,"path":119,"stem":120},"Text Boxes","\u002Fen\u002Fdocx\u002Ftextbox","en\u002F04.docx\u002F06.textbox",{"title":54,"path":122,"stem":123},"\u002Fen\u002Fdocx\u002Fcharts","en\u002F04.docx\u002F07.charts",{"title":125,"path":126,"stem":127},"SmartArt","\u002Fen\u002Fdocx\u002Fsmartart","en\u002F04.docx\u002F08.smartart",{"title":129,"path":130,"stem":131},"Media","\u002Fen\u002Fdocx\u002Fmedia","en\u002F04.docx\u002F09.media",{"title":133,"path":134,"stem":135},"Links","\u002Fen\u002Fdocx\u002Flinks","en\u002F04.docx\u002F10.links",{"title":137,"path":138,"stem":139},"Headers and Footers","\u002Fen\u002Fdocx\u002Fheaders-and-footers","en\u002F04.docx\u002F11.headers-and-footers",{"title":141,"path":142,"stem":143},"Equations and Symbols","\u002Fen\u002Fdocx\u002Fequations-and-symbols","en\u002F04.docx\u002F12.equations-and-symbols",{"title":145,"path":146,"stem":147},"Styles and Themes","\u002Fen\u002Fdocx\u002Fstyles-and-themes","en\u002F04.docx\u002F13.styles-and-themes",{"title":149,"path":150,"stem":151},"Page Layout","\u002Fen\u002Fdocx\u002Fpage-layout","en\u002F04.docx\u002F14.page-layout",{"title":153,"path":154,"stem":155},"References","\u002Fen\u002Fdocx\u002Freferences","en\u002F04.docx\u002F15.references",{"title":157,"path":158,"stem":159},"Comments and Revisions","\u002Fen\u002Fdocx\u002Fcomments-and-revisions","en\u002F04.docx\u002F16.comments-and-revisions",{"title":161,"path":162,"stem":163},"Document Properties","\u002Fen\u002Fdocx\u002Fproperties","en\u002F04.docx\u002F17.properties",{"title":165,"path":166,"stem":167},"Export","\u002Fen\u002Fdocx\u002Fexport","en\u002F04.docx\u002F18.export",{"title":72,"path":169,"stem":170},"\u002Fen\u002Fdocx\u002Fparsing","en\u002F04.docx\u002F19.parsing",{"title":172,"path":173,"stem":174},"Patching","\u002Fen\u002Fdocx\u002Fpatch","en\u002F04.docx\u002F20.patch",{"title":176,"icon":177,"path":178,"stem":179,"children":180,"page":30},"PPTX","i-lucide-presentation","\u002Fen\u002Fpptx","en\u002F05.pptx",[181,185,188,192,195,198,201,204,207,210,214,217,220,224,227,231,235,239,243,247,250,253],{"title":182,"path":183,"stem":184},"@office-open\u002Fpptx","\u002Fen\u002Fpptx\u002Foverview","en\u002F05.pptx\u002F01.overview",{"title":102,"path":186,"stem":187},"\u002Fen\u002Fpptx\u002Fquickstart","en\u002F05.pptx\u002F02.quickstart",{"title":189,"path":190,"stem":191},"Shapes and Text","\u002Fen\u002Fpptx\u002Fshapes-and-text","en\u002F05.pptx\u002F03.shapes-and-text",{"title":110,"path":193,"stem":194},"\u002Fen\u002Fpptx\u002Ftables","en\u002F05.pptx\u002F04.tables",{"title":114,"path":196,"stem":197},"\u002Fen\u002Fpptx\u002Fimages","en\u002F05.pptx\u002F05.images",{"title":54,"path":199,"stem":200},"\u002Fen\u002Fpptx\u002Fcharts","en\u002F05.pptx\u002F06.charts",{"title":125,"path":202,"stem":203},"\u002Fen\u002Fpptx\u002Fsmartart","en\u002F05.pptx\u002F07.smartart",{"title":129,"path":205,"stem":206},"\u002Fen\u002Fpptx\u002Fmedia","en\u002F05.pptx\u002F08.media",{"title":133,"path":208,"stem":209},"\u002Fen\u002Fpptx\u002Flinks","en\u002F05.pptx\u002F09.links",{"title":211,"path":212,"stem":213},"Lines and Connectors","\u002Fen\u002Fpptx\u002Flines-and-connectors","en\u002F05.pptx\u002F10.lines-and-connectors",{"title":137,"path":215,"stem":216},"\u002Fen\u002Fpptx\u002Fheaders-and-footers","en\u002F05.pptx\u002F11.headers-and-footers",{"title":141,"path":218,"stem":219},"\u002Fen\u002Fpptx\u002Fequations-and-symbols","en\u002F05.pptx\u002F12.equations-and-symbols",{"title":221,"path":222,"stem":223},"Slide Layout","\u002Fen\u002Fpptx\u002Fslide-layout","en\u002F05.pptx\u002F13.slide-layout",{"title":145,"path":225,"stem":226},"\u002Fen\u002Fpptx\u002Fstyles-and-themes","en\u002F05.pptx\u002F14.styles-and-themes",{"title":228,"path":229,"stem":230},"Effects and Fills","\u002Fen\u002Fpptx\u002Feffects-and-fills","en\u002F05.pptx\u002F15.effects-and-fills",{"title":232,"path":233,"stem":234},"Transitions","\u002Fen\u002Fpptx\u002Ftransitions","en\u002F05.pptx\u002F16.transitions",{"title":236,"path":237,"stem":238},"Animations","\u002Fen\u002Fpptx\u002Fanimations","en\u002F05.pptx\u002F17.animations",{"title":240,"path":241,"stem":242},"Comments","\u002Fen\u002Fpptx\u002Fcomments","en\u002F05.pptx\u002F18.comments",{"title":244,"path":245,"stem":246},"Presentation Properties","\u002Fen\u002Fpptx\u002Fproperties","en\u002F05.pptx\u002F19.properties",{"title":165,"path":248,"stem":249},"\u002Fen\u002Fpptx\u002Fexport","en\u002F05.pptx\u002F20.export",{"title":72,"path":251,"stem":252},"\u002Fen\u002Fpptx\u002Fparsing","en\u002F05.pptx\u002F21.parsing",{"title":172,"path":254,"stem":255},"\u002Fen\u002Fpptx\u002Fpatch","en\u002F05.pptx\u002F22.patch",{"title":257,"icon":258,"path":259,"stem":260,"children":261,"page":30},"XLSX","i-lucide-table-2","\u002Fen\u002Fxlsx","en\u002F06.xlsx",[262,266,269,273,277,281,285,289,292,295,299,303,307,311,314,318,322,326,329,332],{"title":263,"path":264,"stem":265},"@office-open\u002Fxlsx","\u002Fen\u002Fxlsx\u002Foverview","en\u002F06.xlsx\u002F01.overview",{"title":102,"path":267,"stem":268},"\u002Fen\u002Fxlsx\u002Fquickstart","en\u002F06.xlsx\u002F02.quickstart",{"title":270,"path":271,"stem":272},"Cells & Data","\u002Fen\u002Fxlsx\u002Fcells","en\u002F06.xlsx\u002F03.cells",{"title":274,"path":275,"stem":276},"Styles","\u002Fen\u002Fxlsx\u002Fstyles","en\u002F06.xlsx\u002F04.styles",{"title":278,"path":279,"stem":280},"Merge, Columns & Rows","\u002Fen\u002Fxlsx\u002Fmerge-col-row","en\u002F06.xlsx\u002F05.merge-col-row",{"title":282,"path":283,"stem":284},"Hyperlinks","\u002Fen\u002Fxlsx\u002Flinks","en\u002F06.xlsx\u002F06.links",{"title":286,"path":287,"stem":288},"Pivot Tables","\u002Fen\u002Fxlsx\u002Fpivot-tables","en\u002F06.xlsx\u002F07.pivot-tables",{"title":114,"path":290,"stem":291},"\u002Fen\u002Fxlsx\u002Fimages","en\u002F06.xlsx\u002F08.images",{"title":54,"path":293,"stem":294},"\u002Fen\u002Fxlsx\u002Fcharts","en\u002F06.xlsx\u002F09.charts",{"title":296,"path":297,"stem":298},"Page Setup & Headers\u002FFooters","\u002Fen\u002Fxlsx\u002Fpage-setup","en\u002F06.xlsx\u002F10.page-setup",{"title":300,"path":301,"stem":302},"Formulas","\u002Fen\u002Fxlsx\u002Fformulas","en\u002F06.xlsx\u002F11.formulas",{"title":304,"path":305,"stem":306},"Freeze Panes & Auto Filter","\u002Fen\u002Fxlsx\u002Ffreeze-filter","en\u002F06.xlsx\u002F12.freeze-filter",{"title":308,"path":309,"stem":310},"Data Validation","\u002Fen\u002Fxlsx\u002Fvalidation","en\u002F06.xlsx\u002F13.validation",{"title":240,"path":312,"stem":313},"\u002Fen\u002Fxlsx\u002Fcomments","en\u002F06.xlsx\u002F14.comments",{"title":315,"path":316,"stem":317},"Protection","\u002Fen\u002Fxlsx\u002Fprotection","en\u002F06.xlsx\u002F15.protection",{"title":319,"path":320,"stem":321},"Shared Workbook Revisions","\u002Fen\u002Fxlsx\u002Frevisions","en\u002F06.xlsx\u002F16.revisions",{"title":323,"path":324,"stem":325},"Workbook Properties","\u002Fen\u002Fxlsx\u002Fproperties","en\u002F06.xlsx\u002F17.properties",{"title":165,"path":327,"stem":328},"\u002Fen\u002Fxlsx\u002Fexport","en\u002F06.xlsx\u002F18.export",{"title":72,"path":330,"stem":331},"\u002Fen\u002Fxlsx\u002Fparsing","en\u002F06.xlsx\u002F19.parsing",{"title":172,"path":333,"stem":334},"\u002Fen\u002Fxlsx\u002Fpatch","en\u002F06.xlsx\u002F20.patch",{"id":336,"title":23,"body":337,"description":1559,"extension":1560,"links":1561,"meta":1562,"navigation":671,"path":24,"seo":1563,"stem":25,"__hash__":1564},"docs_en\u002Fen\u002F01.getting-started\u002F04.ai-tools.md",{"type":338,"value":339,"toc":1546},"minimark",[340,361,365,445,460,464,467,534,541,545,553,587,590,601,605,749,753,756,759,887,889,1148,1150,1334,1338,1341,1393,1397,1400,1522,1532,1542],[341,342,343,344,348,349,352,353,356,357,360],"p",{},"The ",[345,346,347],"code",{},"office-open"," package provides AI SDK tools that allow AI agents (Claude, GPT, etc.) to generate ",[345,350,351],{},".docx",", ",[345,354,355],{},".pptx",", and ",[345,358,359],{},".xlsx"," files using the Vercel AI SDK.",[362,363,15],"h2",{"id":364},"installation",[366,367,368,396,413,429],"code-group",{},[369,370,376],"pre",{"className":371,"code":372,"filename":373,"language":374,"meta":375,"style":375},"language-bash shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","pnpm add office-open ai\n","pnpm","bash","",[345,377,378],{"__ignoreMap":375},[379,380,383,386,390,393],"span",{"class":381,"line":382},"line",1,[379,384,373],{"class":385},"sBMFI",[379,387,389],{"class":388},"sfazB"," add",[379,391,392],{"class":388}," office-open",[379,394,395],{"class":388}," ai\n",[369,397,400],{"className":371,"code":398,"filename":399,"language":374,"meta":375,"style":375},"npm install office-open ai\n","npm",[345,401,402],{"__ignoreMap":375},[379,403,404,406,409,411],{"class":381,"line":382},[379,405,399],{"class":385},[379,407,408],{"class":388}," install",[379,410,392],{"class":388},[379,412,395],{"class":388},[369,414,417],{"className":371,"code":415,"filename":416,"language":374,"meta":375,"style":375},"yarn add office-open ai\n","yarn",[345,418,419],{"__ignoreMap":375},[379,420,421,423,425,427],{"class":381,"line":382},[379,422,416],{"class":385},[379,424,389],{"class":388},[379,426,392],{"class":388},[379,428,395],{"class":388},[369,430,433],{"className":371,"code":431,"filename":432,"language":374,"meta":375,"style":375},"bun add office-open ai\n","bun",[345,434,435],{"__ignoreMap":375},[379,436,437,439,441,443],{"class":381,"line":382},[379,438,432],{"class":385},[379,440,389],{"class":388},[379,442,392],{"class":388},[379,444,395],{"class":388},[341,446,447,448,455,456,459],{},"Requires the ",[449,450,454],"a",{"href":451,"rel":452},"https:\u002F\u002Fsdk.vercel.ai\u002F",[453],"nofollow","Vercel AI SDK"," (",[345,457,458],{},"ai"," package) v6+.",[362,461,463],{"id":462},"tools","Tools",[341,465,466],{},"Four tools are provided — one per document type plus an on-demand schema lookup:",[468,469,470,483],"table",{},[471,472,473],"thead",{},[474,475,476,480],"tr",{},[477,478,479],"th",{},"Tool",[477,481,482],{},"Description",[484,485,486,500,512,524],"tbody",{},[474,487,488,494],{},[489,490,491],"td",{},[345,492,493],{},"generate-docx",[489,495,496,497,499],{},"Generate a ",[345,498,351],{}," Word document",[474,501,502,507],{},[489,503,504],{},[345,505,506],{},"generate-pptx",[489,508,496,509,511],{},[345,510,355],{}," presentation",[474,513,514,519],{},[489,515,516],{},[345,517,518],{},"generate-xlsx",[489,520,496,521,523],{},[345,522,359],{}," spreadsheet",[474,525,526,531],{},[489,527,528],{},[345,529,530],{},"office-open-schema-lookup",[489,532,533],{},"Fetch the JSON Schema for option definitions on demand",[341,535,536,537,540],{},"Each generate tool validates the input with JSON Schema (ajv) before generating. Validation errors include the instance path (e.g. ",[345,538,539],{},"at \"sections.0.children.1.paragraph.children\"",") so the model can fix and retry.",[362,542,544],{"id":543},"progressive-disclosure","Progressive Disclosure",[341,546,547,548,552],{},"The full format schema is far too large for a tool definition (~675 KB for docx), so the generate tools carry a ",[549,550,551],"strong",{},"skeleton"," input schema: the top-level shape plus the child wrapper keys, with stubs naming the definitions they stand for. The workflow is:",[554,555,556,581,584],"ol",{},[557,558,559,560,562,563,566,567,352,570,352,573,576,577,580],"li",{},"Call ",[345,561,530],{}," with ",[345,564,565],{},"{ type, definitions: [...] }"," for the option types you are about to fill (e.g. ",[345,568,569],{},"ParagraphOptions",[345,571,572],{},"RunOptions",[345,574,575],{},"TableOptions","). Names come from the skeleton stubs, or from ",[345,578,579],{},"npx office-open schema index \u003Ctype>",".",[557,582,583],{},"Fill the options and call the generate tool.",[557,585,586],{},"If validation rejects the input, fix the reported paths and retry — up to five issues are reported per call.",[341,588,589],{},"A lookup returns the requested definitions plus their dependency closure; cataloged domains you did not request stay as expandable stubs, so request each domain root you need. At most 8 definitions per call; unknown names return closest-match suggestions instead of an error.",[341,591,592,593,596,597,600],{},"Provider strict structured-output modes (which require ",[345,594,595],{},"additionalProperties: false"," everywhere) are not supported by the skeleton; validation is owned by the tool's ",[345,598,599],{},"execute"," via ajv.",[362,602,604],{"id":603},"usage","Usage",[369,606,610],{"className":607,"code":608,"language":609,"meta":375,"style":375},"language-ts shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","import { generateText } from \"ai\";\nimport { officeOpenTools } from \"office-open\u002Fai\";\n\nconst result = await generateText({\n  model,\n  prompt: \"Create a quarterly report document\",\n  tools: officeOpenTools,\n});\n","ts",[345,611,612,643,666,673,698,707,726,738],{"__ignoreMap":375},[379,613,614,618,622,626,629,632,635,637,640],{"class":381,"line":382},[379,615,617],{"class":616},"s7zQu","import",[379,619,621],{"class":620},"sMK4o"," {",[379,623,625],{"class":624},"sTEyZ"," generateText",[379,627,628],{"class":620}," }",[379,630,631],{"class":616}," from",[379,633,634],{"class":620}," \"",[379,636,458],{"class":388},[379,638,639],{"class":620},"\"",[379,641,642],{"class":620},";\n",[379,644,646,648,650,653,655,657,659,662,664],{"class":381,"line":645},2,[379,647,617],{"class":616},[379,649,621],{"class":620},[379,651,652],{"class":624}," officeOpenTools",[379,654,628],{"class":620},[379,656,631],{"class":616},[379,658,634],{"class":620},[379,660,661],{"class":388},"office-open\u002Fai",[379,663,639],{"class":620},[379,665,642],{"class":620},[379,667,669],{"class":381,"line":668},3,[379,670,672],{"emptyLinePlaceholder":671},true,"\n",[379,674,676,680,683,686,689,692,695],{"class":381,"line":675},4,[379,677,679],{"class":678},"spNyl","const",[379,681,682],{"class":624}," result ",[379,684,685],{"class":620},"=",[379,687,688],{"class":616}," await",[379,690,625],{"class":691},"s2Zo4",[379,693,694],{"class":624},"(",[379,696,697],{"class":620},"{\n",[379,699,701,704],{"class":381,"line":700},5,[379,702,703],{"class":624},"  model",[379,705,706],{"class":620},",\n",[379,708,710,714,717,719,722,724],{"class":381,"line":709},6,[379,711,713],{"class":712},"swJcz","  prompt",[379,715,716],{"class":620},":",[379,718,634],{"class":620},[379,720,721],{"class":388},"Create a quarterly report document",[379,723,639],{"class":620},[379,725,706],{"class":620},[379,727,729,732,734,736],{"class":381,"line":728},7,[379,730,731],{"class":712},"  tools",[379,733,716],{"class":620},[379,735,652],{"class":624},[379,737,706],{"class":620},[379,739,741,744,747],{"class":381,"line":740},8,[379,742,743],{"class":620},"}",[379,745,746],{"class":624},")",[379,748,642],{"class":620},[362,750,752],{"id":751},"tool-input","Tool Input",[341,754,755],{},"Each tool accepts the document options directly (no wrapping — pass the document structure as-is):",[757,758,493],"h3",{"id":493},[760,761,763],"api-example",{"type":762},"docx",[369,764,769],{"className":765,"code":766,"filename":767,"language":768,"meta":375,"style":375},"language-json shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","{\n  \"sections\": [\n    {\n      \"children\": [{ \"paragraph\": { \"children\": [{ \"text\": \"Hello, World!\", \"bold\": true }] } }]\n    }\n  ]\n}\n","JSON","json",[345,770,771,775,790,795,872,877,882],{"__ignoreMap":375},[379,772,773],{"class":381,"line":382},[379,774,697],{"class":620},[379,776,777,780,783,785,787],{"class":381,"line":645},[379,778,779],{"class":620},"  \"",[379,781,782],{"class":678},"sections",[379,784,639],{"class":620},[379,786,716],{"class":620},[379,788,789],{"class":620}," [\n",[379,791,792],{"class":381,"line":668},[379,793,794],{"class":620},"    {\n",[379,796,797,800,803,805,807,810,812,816,818,820,822,824,826,828,830,832,834,838,840,842,844,847,849,852,854,857,859,861,864,867,869],{"class":381,"line":675},[379,798,799],{"class":620},"      \"",[379,801,802],{"class":385},"children",[379,804,639],{"class":620},[379,806,716],{"class":620},[379,808,809],{"class":620}," [{",[379,811,634],{"class":620},[379,813,815],{"class":814},"sbssI","paragraph",[379,817,639],{"class":620},[379,819,716],{"class":620},[379,821,621],{"class":620},[379,823,634],{"class":620},[379,825,802],{"class":712},[379,827,639],{"class":620},[379,829,716],{"class":620},[379,831,809],{"class":620},[379,833,634],{"class":620},[379,835,837],{"class":836},"su27w","text",[379,839,639],{"class":620},[379,841,716],{"class":620},[379,843,634],{"class":620},[379,845,846],{"class":388},"Hello, World!",[379,848,639],{"class":620},[379,850,851],{"class":620},",",[379,853,634],{"class":620},[379,855,856],{"class":836},"bold",[379,858,639],{"class":620},[379,860,716],{"class":620},[379,862,863],{"class":620}," true",[379,865,866],{"class":620}," }]",[379,868,628],{"class":620},[379,870,871],{"class":620}," }]\n",[379,873,874],{"class":381,"line":700},[379,875,876],{"class":620},"    }\n",[379,878,879],{"class":381,"line":709},[379,880,881],{"class":620},"  ]\n",[379,883,884],{"class":381,"line":728},[379,885,886],{"class":620},"}\n",[757,888,506],{"id":506},[760,890,892],{"type":891},"pptx",[369,893,895],{"className":765,"code":894,"filename":767,"language":768,"meta":375,"style":375},"{\n  \"title\": \"My Presentation\",\n  \"slides\": [\n    {\n      \"children\": [\n        {\n          \"shape\": {\n            \"x\": 100,\n            \"y\": 100,\n            \"width\": 760,\n            \"height\": 340,\n            \"textBody\": {\n              \"paragraphs\": [{ \"children\": [{ \"text\": \"Hello, World!\", \"size\": 32 }] }]\n            }\n          }\n        }\n      ]\n    }\n  ]\n}\n",[345,896,897,901,921,934,938,950,955,970,987,1003,1020,1037,1051,1109,1115,1121,1127,1133,1138,1143],{"__ignoreMap":375},[379,898,899],{"class":381,"line":382},[379,900,697],{"class":620},[379,902,903,905,908,910,912,914,917,919],{"class":381,"line":645},[379,904,779],{"class":620},[379,906,907],{"class":678},"title",[379,909,639],{"class":620},[379,911,716],{"class":620},[379,913,634],{"class":620},[379,915,916],{"class":388},"My Presentation",[379,918,639],{"class":620},[379,920,706],{"class":620},[379,922,923,925,928,930,932],{"class":381,"line":668},[379,924,779],{"class":620},[379,926,927],{"class":678},"slides",[379,929,639],{"class":620},[379,931,716],{"class":620},[379,933,789],{"class":620},[379,935,936],{"class":381,"line":675},[379,937,794],{"class":620},[379,939,940,942,944,946,948],{"class":381,"line":700},[379,941,799],{"class":620},[379,943,802],{"class":385},[379,945,639],{"class":620},[379,947,716],{"class":620},[379,949,789],{"class":620},[379,951,952],{"class":381,"line":709},[379,953,954],{"class":620},"        {\n",[379,956,957,960,963,965,967],{"class":381,"line":728},[379,958,959],{"class":620},"          \"",[379,961,962],{"class":814},"shape",[379,964,639],{"class":620},[379,966,716],{"class":620},[379,968,969],{"class":620}," {\n",[379,971,972,975,978,980,982,985],{"class":381,"line":740},[379,973,974],{"class":620},"            \"",[379,976,977],{"class":712},"x",[379,979,639],{"class":620},[379,981,716],{"class":620},[379,983,984],{"class":814}," 100",[379,986,706],{"class":620},[379,988,990,992,995,997,999,1001],{"class":381,"line":989},9,[379,991,974],{"class":620},[379,993,994],{"class":712},"y",[379,996,639],{"class":620},[379,998,716],{"class":620},[379,1000,984],{"class":814},[379,1002,706],{"class":620},[379,1004,1006,1008,1011,1013,1015,1018],{"class":381,"line":1005},10,[379,1007,974],{"class":620},[379,1009,1010],{"class":712},"width",[379,1012,639],{"class":620},[379,1014,716],{"class":620},[379,1016,1017],{"class":814}," 760",[379,1019,706],{"class":620},[379,1021,1023,1025,1028,1030,1032,1035],{"class":381,"line":1022},11,[379,1024,974],{"class":620},[379,1026,1027],{"class":712},"height",[379,1029,639],{"class":620},[379,1031,716],{"class":620},[379,1033,1034],{"class":814}," 340",[379,1036,706],{"class":620},[379,1038,1040,1042,1045,1047,1049],{"class":381,"line":1039},12,[379,1041,974],{"class":620},[379,1043,1044],{"class":712},"textBody",[379,1046,639],{"class":620},[379,1048,716],{"class":620},[379,1050,969],{"class":620},[379,1052,1054,1057,1060,1062,1064,1066,1068,1070,1072,1074,1076,1078,1081,1083,1085,1087,1089,1091,1093,1095,1098,1100,1102,1105,1107],{"class":381,"line":1053},13,[379,1055,1056],{"class":620},"              \"",[379,1058,1059],{"class":836},"paragraphs",[379,1061,639],{"class":620},[379,1063,716],{"class":620},[379,1065,809],{"class":620},[379,1067,634],{"class":620},[379,1069,802],{"class":691},[379,1071,639],{"class":620},[379,1073,716],{"class":620},[379,1075,809],{"class":620},[379,1077,634],{"class":620},[379,1079,837],{"class":1080},"sfNiH",[379,1082,639],{"class":620},[379,1084,716],{"class":620},[379,1086,634],{"class":620},[379,1088,846],{"class":388},[379,1090,639],{"class":620},[379,1092,851],{"class":620},[379,1094,634],{"class":620},[379,1096,1097],{"class":1080},"size",[379,1099,639],{"class":620},[379,1101,716],{"class":620},[379,1103,1104],{"class":814}," 32",[379,1106,866],{"class":620},[379,1108,871],{"class":620},[379,1110,1112],{"class":381,"line":1111},14,[379,1113,1114],{"class":620},"            }\n",[379,1116,1118],{"class":381,"line":1117},15,[379,1119,1120],{"class":620},"          }\n",[379,1122,1124],{"class":381,"line":1123},16,[379,1125,1126],{"class":620},"        }\n",[379,1128,1130],{"class":381,"line":1129},17,[379,1131,1132],{"class":620},"      ]\n",[379,1134,1136],{"class":381,"line":1135},18,[379,1137,876],{"class":620},[379,1139,1141],{"class":381,"line":1140},19,[379,1142,881],{"class":620},[379,1144,1146],{"class":381,"line":1145},20,[379,1147,886],{"class":620},[757,1149,518],{"id":518},[760,1151,1153],{"type":1152},"xlsx",[369,1154,1156],{"className":765,"code":1155,"filename":767,"language":768,"meta":375,"style":375},"{\n  \"worksheets\": [\n    {\n      \"name\": \"Sheet1\",\n      \"rows\": [\n        { \"cells\": [{ \"value\": \"Name\" }, { \"value\": \"Score\" }] },\n        { \"cells\": [{ \"value\": \"Alice\" }, { \"value\": 95 }] }\n      ]\n    }\n  ]\n}\n",[345,1157,1158,1162,1175,1179,1199,1212,1269,1318,1322,1326,1330],{"__ignoreMap":375},[379,1159,1160],{"class":381,"line":382},[379,1161,697],{"class":620},[379,1163,1164,1166,1169,1171,1173],{"class":381,"line":645},[379,1165,779],{"class":620},[379,1167,1168],{"class":678},"worksheets",[379,1170,639],{"class":620},[379,1172,716],{"class":620},[379,1174,789],{"class":620},[379,1176,1177],{"class":381,"line":668},[379,1178,794],{"class":620},[379,1180,1181,1183,1186,1188,1190,1192,1195,1197],{"class":381,"line":675},[379,1182,799],{"class":620},[379,1184,1185],{"class":385},"name",[379,1187,639],{"class":620},[379,1189,716],{"class":620},[379,1191,634],{"class":620},[379,1193,1194],{"class":388},"Sheet1",[379,1196,639],{"class":620},[379,1198,706],{"class":620},[379,1200,1201,1203,1206,1208,1210],{"class":381,"line":700},[379,1202,799],{"class":620},[379,1204,1205],{"class":385},"rows",[379,1207,639],{"class":620},[379,1209,716],{"class":620},[379,1211,789],{"class":620},[379,1213,1214,1217,1219,1222,1224,1226,1228,1230,1233,1235,1237,1239,1242,1244,1247,1249,1251,1253,1255,1257,1259,1262,1264,1266],{"class":381,"line":709},[379,1215,1216],{"class":620},"        {",[379,1218,634],{"class":620},[379,1220,1221],{"class":814},"cells",[379,1223,639],{"class":620},[379,1225,716],{"class":620},[379,1227,809],{"class":620},[379,1229,634],{"class":620},[379,1231,1232],{"class":712},"value",[379,1234,639],{"class":620},[379,1236,716],{"class":620},[379,1238,634],{"class":620},[379,1240,1241],{"class":388},"Name",[379,1243,639],{"class":620},[379,1245,1246],{"class":620}," },",[379,1248,621],{"class":620},[379,1250,634],{"class":620},[379,1252,1232],{"class":712},[379,1254,639],{"class":620},[379,1256,716],{"class":620},[379,1258,634],{"class":620},[379,1260,1261],{"class":388},"Score",[379,1263,639],{"class":620},[379,1265,866],{"class":620},[379,1267,1268],{"class":620}," },\n",[379,1270,1271,1273,1275,1277,1279,1281,1283,1285,1287,1289,1291,1293,1296,1298,1300,1302,1304,1306,1308,1310,1313,1315],{"class":381,"line":728},[379,1272,1216],{"class":620},[379,1274,634],{"class":620},[379,1276,1221],{"class":814},[379,1278,639],{"class":620},[379,1280,716],{"class":620},[379,1282,809],{"class":620},[379,1284,634],{"class":620},[379,1286,1232],{"class":712},[379,1288,639],{"class":620},[379,1290,716],{"class":620},[379,1292,634],{"class":620},[379,1294,1295],{"class":388},"Alice",[379,1297,639],{"class":620},[379,1299,1246],{"class":620},[379,1301,621],{"class":620},[379,1303,634],{"class":620},[379,1305,1232],{"class":712},[379,1307,639],{"class":620},[379,1309,716],{"class":620},[379,1311,1312],{"class":814}," 95",[379,1314,866],{"class":620},[379,1316,1317],{"class":620}," }\n",[379,1319,1320],{"class":381,"line":740},[379,1321,1132],{"class":620},[379,1323,1324],{"class":381,"line":989},[379,1325,876],{"class":620},[379,1327,1328],{"class":381,"line":1005},[379,1329,881],{"class":620},[379,1331,1332],{"class":381,"line":1022},[379,1333,886],{"class":620},[362,1335,1337],{"id":1336},"tool-output","Tool Output",[341,1339,1340],{},"Each tool returns a base64-encoded file:",[369,1342,1344],{"className":765,"code":1343,"language":768,"meta":375,"style":375},"{\n  \"base64\": \"...\",\n  \"mimeType\": \"application\u002Fvnd.openxmlformats-officedocument.wordprocessingml.document\"\n}\n",[345,1345,1346,1350,1370,1389],{"__ignoreMap":375},[379,1347,1348],{"class":381,"line":382},[379,1349,697],{"class":620},[379,1351,1352,1354,1357,1359,1361,1363,1366,1368],{"class":381,"line":645},[379,1353,779],{"class":620},[379,1355,1356],{"class":678},"base64",[379,1358,639],{"class":620},[379,1360,716],{"class":620},[379,1362,634],{"class":620},[379,1364,1365],{"class":388},"...",[379,1367,639],{"class":620},[379,1369,706],{"class":620},[379,1371,1372,1374,1377,1379,1381,1383,1386],{"class":381,"line":668},[379,1373,779],{"class":620},[379,1375,1376],{"class":678},"mimeType",[379,1378,639],{"class":620},[379,1380,716],{"class":620},[379,1382,634],{"class":620},[379,1384,1385],{"class":388},"application\u002Fvnd.openxmlformats-officedocument.wordprocessingml.document",[379,1387,1388],{"class":620},"\"\n",[379,1390,1391],{"class":381,"line":675},[379,1392,886],{"class":620},[362,1394,1396],{"id":1395},"json-schemas","JSON Schemas",[341,1398,1399],{},"The full schemas and the slicing API are exported for custom use:",[369,1401,1403],{"className":607,"code":1402,"language":609,"meta":375,"style":375},"import {\n  docxSchema,\n  pptxSchema,\n  xlsxSchema,\n  validateDocumentInput,\n  sliceDocumentSchema,\n  SCHEMA_ENTRIES,\n} from \"office-open\u002Fschemas\";\n\n\u002F\u002F Extract the dependency closure of specific option types:\nconst slice = sliceDocumentSchema(\"docx\", [\"ParagraphOptions\", \"RunOptions\"]);\n",[345,1404,1405,1411,1418,1425,1432,1439,1446,1453,1468,1472,1478],{"__ignoreMap":375},[379,1406,1407,1409],{"class":381,"line":382},[379,1408,617],{"class":616},[379,1410,969],{"class":620},[379,1412,1413,1416],{"class":381,"line":645},[379,1414,1415],{"class":624},"  docxSchema",[379,1417,706],{"class":620},[379,1419,1420,1423],{"class":381,"line":668},[379,1421,1422],{"class":624},"  pptxSchema",[379,1424,706],{"class":620},[379,1426,1427,1430],{"class":381,"line":675},[379,1428,1429],{"class":624},"  xlsxSchema",[379,1431,706],{"class":620},[379,1433,1434,1437],{"class":381,"line":700},[379,1435,1436],{"class":624},"  validateDocumentInput",[379,1438,706],{"class":620},[379,1440,1441,1444],{"class":381,"line":709},[379,1442,1443],{"class":624},"  sliceDocumentSchema",[379,1445,706],{"class":620},[379,1447,1448,1451],{"class":381,"line":728},[379,1449,1450],{"class":624},"  SCHEMA_ENTRIES",[379,1452,706],{"class":620},[379,1454,1455,1457,1459,1461,1464,1466],{"class":381,"line":740},[379,1456,743],{"class":620},[379,1458,631],{"class":616},[379,1460,634],{"class":620},[379,1462,1463],{"class":388},"office-open\u002Fschemas",[379,1465,639],{"class":620},[379,1467,642],{"class":620},[379,1469,1470],{"class":381,"line":989},[379,1471,672],{"emptyLinePlaceholder":671},[379,1473,1474],{"class":381,"line":1005},[379,1475,1477],{"class":1476},"sHwdD","\u002F\u002F Extract the dependency closure of specific option types:\n",[379,1479,1480,1482,1485,1487,1490,1492,1494,1496,1498,1500,1503,1505,1507,1509,1511,1513,1515,1517,1520],{"class":381,"line":1022},[379,1481,679],{"class":678},[379,1483,1484],{"class":624}," slice ",[379,1486,685],{"class":620},[379,1488,1489],{"class":691}," sliceDocumentSchema",[379,1491,694],{"class":624},[379,1493,639],{"class":620},[379,1495,762],{"class":388},[379,1497,639],{"class":620},[379,1499,851],{"class":620},[379,1501,1502],{"class":624}," [",[379,1504,639],{"class":620},[379,1506,569],{"class":388},[379,1508,639],{"class":620},[379,1510,851],{"class":620},[379,1512,634],{"class":620},[379,1514,572],{"class":388},[379,1516,639],{"class":620},[379,1518,1519],{"class":624},"])",[379,1521,642],{"class":620},[341,1523,1524,1525,352,1528,1531],{},"The same lookup is available on the CLI (",[345,1526,1527],{},"npx office-open schema index docx",[345,1529,1530],{},"npx office-open schema slice docx ParagraphOptions",").",[341,1533,1534,1535,352,1537,356,1539,1541],{},"For full schema details, refer to the ",[449,1536,92],{"href":99},[449,1538,176],{"href":183},[449,1540,257],{"href":264}," documentation.",[1543,1544,1545],"style",{},"html pre.shiki code .sBMFI, html code.shiki .sBMFI{--shiki-light:#E2931D;--shiki-default:#FFCB6B;--shiki-dark:#FFCB6B}html pre.shiki code .sfazB, html code.shiki .sfazB{--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D}html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .s7zQu, html code.shiki .s7zQu{--shiki-light:#39ADB5;--shiki-light-font-style:italic;--shiki-default:#89DDFF;--shiki-default-font-style:italic;--shiki-dark:#89DDFF;--shiki-dark-font-style:italic}html pre.shiki code .sMK4o, html code.shiki .sMK4o{--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF}html pre.shiki code .sTEyZ, html code.shiki .sTEyZ{--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8}html pre.shiki code .spNyl, html code.shiki .spNyl{--shiki-light:#9C3EDA;--shiki-default:#C792EA;--shiki-dark:#C792EA}html pre.shiki code .s2Zo4, html code.shiki .s2Zo4{--shiki-light:#6182B8;--shiki-default:#82AAFF;--shiki-dark:#82AAFF}html pre.shiki code .swJcz, html code.shiki .swJcz{--shiki-light:#E53935;--shiki-default:#F07178;--shiki-dark:#F07178}html pre.shiki code .sbssI, html code.shiki .sbssI{--shiki-light:#F76D47;--shiki-default:#F78C6C;--shiki-dark:#F78C6C}html pre.shiki code .su27w, html code.shiki .su27w{--shiki-light:#916B53;--shiki-default:#916B53;--shiki-dark:#916B53}html pre.shiki code .sfNiH, html code.shiki .sfNiH{--shiki-light:#FF5370;--shiki-default:#FF9CAC;--shiki-dark:#FF9CAC}html pre.shiki code .sHwdD, html code.shiki .sHwdD{--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#546E7A;--shiki-default-font-style:italic;--shiki-dark:#676E95;--shiki-dark-font-style:italic}",{"title":375,"searchDepth":645,"depth":645,"links":1547},[1548,1549,1550,1551,1552,1557,1558],{"id":364,"depth":645,"text":15},{"id":462,"depth":645,"text":463},{"id":543,"depth":645,"text":544},{"id":603,"depth":645,"text":604},{"id":751,"depth":645,"text":752,"children":1553},[1554,1555,1556],{"id":493,"depth":668,"text":493},{"id":506,"depth":668,"text":506},{"id":518,"depth":668,"text":518},{"id":1336,"depth":645,"text":1337},{"id":1395,"depth":645,"text":1396},"Use AI SDK tools to generate Office documents from AI agents","md",null,{},{"title":23,"description":1559},"KiewIUyCkY-ix4mB8NyC2IwByqEIgdvK69lUsQBwzR4",[1566,1568],{"title":19,"path":20,"stem":21,"description":1567,"children":-1},"Generate Office files from the command line using JSON",{"title":27,"path":28,"stem":29,"description":1569,"children":-1},"Use Office Open with AI agents via MCP, Skills, and LLMs.txt",1787501500998]