document_open
Open a demo document or workbook
Open one of the demo files by name: documents footnotes, comments, forms, rtl, wild-horse, workshop, offer, tools; workbooks workbook, functions, macros, queries, gep, vba-web, sqlite, order-desk, onrr, cashflow, pivot, chart, notes, check, xtools. Default is footnotes. For your own file use document_open_file. Opens a separate editor cabin for this session.
输入参数slug必填
document_open_file
Open your own Word document or Excel workbook
Open YOUR file in a private editor cabin for this session: a .docx/.doc/.odt document or an .xlsx/.xlsm/.xlsb/.xls/.ods workbook, up to 50 MB. Give exactly one of: url (https link the server can fetch), base64 (file bytes; then name with the extension is required). Nothing in the file is executed. The file is kept for 24 hours and then deleted. After opening, use document_* tools for a document or sheet_* / macro_* / query_* / workbook_inspect for a workbook; sheet_propose_edits → sheet_apply and document_propose_replacement → document_apply change the copy in the cabin; document_save_copy returns a download link of the edited file.
输入参数urlnamepathbase64
document_describe
What the document is
Name, pages, paragraphs, words, number of comments and tracked changes, whether track changes is on. For documents; call first.
无需输入参数。
document_read
Read paragraphs
Paragraph text as a window: from = index of the first paragraph (0-based), count = how many (max 40). The answer carries next — where to continue, null at the end. A missing paragraph is a refusal, not an invention.
输入参数from必填count
document_find
Find in the document
Paragraphs containing the text (case-insensitive), with snippets around the match.
输入参数query必填
document_propose_replacement
Propose replacing one paragraph's text
Propose the full new text of one paragraph (paragraph_index from document_read). Nothing changes yet: the editor core builds the change on a copy and returns before/after plus checks (numbers, dates, links kept). Then call document_apply with the proposal_id. Read the paragraph first.
输入参数text必填reasonparagraph_index必填
document_apply
Apply a proposed paragraph replacement
Apply a proposal from document_propose_replacement to the document in this session's cabin (not to your original file). Stale proposal (the document moved on) is refused by the engine — propose again. Repeating an applied proposal is a no-op.
输入参数proposal_id必填
Workbook overview: every sheet tab with its used range, the current revision, and the header row of the sheet that is open. Call this first, then pass the tab name you need as "sheet" to sheet_read and sheet_find.
无需输入参数。
Read a rectangular range like A1:F20 (max 60 rows × 26 columns): values and formulas. Empty cells are omitted. ALWAYS pass "sheet" with the exact tab name when the workbook has more than one sheet — without it you read whichever sheet happens to be open, and the answer will quietly be about the wrong sheet. Call sheet_describe first if you do not know the tab names.
输入参数range必填sheet
Find cells whose value or formula contains the text (case-insensitive) in the used range of a sheet. ALWAYS pass "sheet" with the exact tab name when the workbook has more than one sheet: without it only the sheet that happens to be open is searched.
输入参数query必填sheet
List VBA modules and runnable macros (entry points) in this workbook with their route and blockers. Runs nothing.
无需输入参数。
Read the source text of one procedure (module + procedure name from macro_list). Read-only; runs nothing.
输入参数module必填procedure必填
Plan a macro run without running it: route, whether the engine can run it natively, blockers, instruction budget.
输入参数entrypoint必填active_sheet
List Power Query queries in this workbook: names, step chain, load target, connections. Reads only; refreshes nothing.
无需输入参数。
Explain one Power Query query by name: its steps in order, where it loads, its connection. Reads only; refreshes nothing.
输入参数name必填
Map the whole application model of this workbook in one call: sheets; VBA modules, procedures, which can run here and which are blocked and why; event handlers; external objects (CreateObject) and Windows API (Declare) dependencies; project references; Power Query queries; data connections; form controls, ActiveX, embedded objects (preserved). Runs nothing. Call this first for questions like 'how is this workbook built' or 'what does it depend on'.
无需输入参数。
Propose new contents for up to 20 cells (formulas like =SUM(B2:B9), or numbers/text). Nothing changes in the workbook: the engine previews the edits on the current revision and reports what would change and whether errors appear; the person decides whether to apply. Read the cells first. Do not overwrite input numbers unless the task says so. Then call sheet_apply with the proposal_id.
输入参数edits必填sheetreason
sheet_apply
Apply proposed cell edits
Apply a proposal from sheet_propose_edits to the workbook in this session's cabin (not to your original file); the engine recalculates. Refused if the workbook revision moved on since the proposal — propose again. Repeating an applied proposal is a no-op.
输入参数proposal_id必填
document_save_copy
Save a copy of the edited file
Write the document or workbook as it is now in this session's cabin (after applied proposals) to a copy and return a download link valid for 24 hours. Your original file is never touched. A workbook with macros comes back as .xlsm with the VBA project intact; a document keeps its styles, comments and tracked changes.
输入参数inline
document_export_pdf
Render the document to PDF
Lay out the document as it is now in this session's cabin (after applied proposals, or as opened) and return a PDF download link valid for 24 hours, plus the page count. Documents only; for workbooks use document_save_copy.
无需输入参数。