原始内容
name: maybeai-sheet description: "Manages MaybeAI spreadsheets across upload, workbook profiling, read/write, worksheet operations, formulas, formula lineage tracing, formatting, and SQL result-table workflows. Use when working on Excel or spreadsheet tasks in MaybeAI, including file import, large row-count or large cell-count table imports that should route to SheetTable/PG, workbook semantic overview, worksheet inspection, cell or range updates, row or column changes, formula execution, cell dependency tracing, readable report sheets, sharing, or export. Use sheet-dashboard instead for chart-authoring or dashboard-first workflows." metadata: openclaw: requires: env: - MAYBEAI_API_TOKEN primaryEnv: MAYBEAI_API_TOKEN emoji: "📊" homepage: https://github.com/OmniMCP-AI/maybeai-uni
MaybeAI Sheet
Use this skill for MaybeAI spreadsheet lifecycle work: upload or import files, profile workbook contents, inspect worksheets, read and write data, manage worksheets, run formulas, trace formula lineage, build SQL result sheets, apply lightweight formatting, share, and export.
Do not use this skill as the primary workflow for chart authoring or dashboard composition. For dashboard-first work, use sheet-dashboard.
Quick Start
Required environment:
MAYBEAI_API_TOKEN
Common script prerequisites:
curljq
Base URL:
https://play-be.omnimcp.ai
Authorization header:
Authorization: Bearer <MAYBEAI_API_TOKEN>
Ready-to-run examples live in scripts/:
bash scripts/01-file-management.sh
bash scripts/02-read-data.sh
bash scripts/03-write-data.sh
bash scripts/04-rows-columns.sh
bash scripts/05-worksheets.sh
bash scripts/06-formulas.sh
bash scripts/07-charts-pictures.sh
bash scripts/08-formatting.sh
bash scripts/09-end-to-end.sh
bash scripts/10-workbook-profile.sh
bash scripts/11-lineage-trace.sh
When To Use Which Path
| User intent | Recommended path |
|---|---|
| Upload or import Excel files | references/file-management.md |
| Understand what a workbook contains before deciding what to read or analyze | references/workbook-profile.md |
| Inspect worksheets, read headers, sample data | references/read-write.md |
| Replace table data while keeping headers or formulas | references/read-write.md |
| Update or append rows by business key | references/read-write.md |
| Insert, delete, or move rows and columns; manage worksheets | references/read-write.md |
Write formulas, batch-persist report blocks, recalculate, build SQL result tables, or create live =SQL(...) reports |
references/formulas-sql.md / references/sql-formula-showcase.md |
| Explain where a formula cell, computed column, or SQL formula result comes from | references/lineage-trace.md |
| Render confirmed Maybe Sheet cells, ranges, or worksheets as clickable references in final answers | references/clickable-refs.md |
| Apply lightweight styling, freeze panes, or add autofilter | references/charts-formatting.md |
| Troubleshoot auth, wrong-sheet writes, ignored styles, or SQL compile errors | references/errors-recovery.md |
| Build chart-heavy pages or dashboards | Switch to sheet-dashboard; this skill only covers low-level spreadsheet and chart APIs |
Core Rules
1. Choose the worksheet before you read or write
Do not rely on defaults for non-first worksheets.
- Prefer
worksheet_namewhen the endpoint supports it - Some endpoints require
?gid=<index>inuri - If you pass neither, many calls will land on the first worksheet, which causes classic “wrote to the wrong sheet” failures
See references/read-write.md for details.
2. Choose the right engine before importing large files
MaybeAI Sheet routes /api/v1/excel/* through Playground, then into either excelize-mcp or SheetTable. Engine choice is a Playground routing decision.
- Use SheetTable/PG for table-like workbooks when any worksheet has more than 10,000 rows, the workbook has more than 100,000 populated cells, the data is mostly flat records, or the workflow is SQL-heavy / append-upsert-heavy.
- Use Excelize for workbook-style files where preserving Excel layout, styles, formulas, merged cells, and workbook semantics matters more than table scale.
- For large table-like
.xlsxuploads, preferPOST /api/v1/excel/importwith multipartengine=postgres; avoid/api/v1/excel/uploadfor those large-data cases. - After import, verify
list_worksheetsreportsengine: "pg"or worksheetdata_engine: "pg".
See references/file-management.md for the exact request.
3. Prefer high-level write APIs before raw A1 writes
Priority order:
update_data_keep_headersupdate_range_by_lookupappend_rowsupdate_range
Meaning:
- Use
update_data_keep_headersfor full-table replacement while preserving headers and column order - Use
update_range_by_lookupfor key-based updates with automatic append of new rows - Use
append_rowsfor simple object-row appends - Use
update_rangeonly when you must target an exact A1 range or non-tabular cells
update_range defaults to RAW: numeric-looking strings such as "5.53%" and "9,007,000" remain strings. Use value_input_option=USER_ENTERED only when the user intentionally wants Excel-like parsing of formulas, dates, numbers, and percentages. Check the write response message: parse_result=NOT_REQUESTED means RAW kept strings as text and lists them in preserved_values; parse_result=PASS means USER_ENTERED parsed values listed in parsed_values; parse_result=PARTIAL means values listed in parsed_values parsed, while preserved_text_values may stay text unless target cells are numeric-formatted.
4. Separate data writes from style writes
Do not assume write_new_worksheet, update_range, or sql/write_result will automatically apply formatting.
If the user wants a readable report or manager-facing table:
- Write the data first
- Call
freeze_panes - Call
batch_set_cell_style - Optionally set column widths, row heights, and autofilter
See references/charts-formatting.md for the style playbook.
5. Compile SQL before writing a result sheet
Default SQL result-table flow:
read_headers- Optionally
read_sheetfor sampling sql/compilesql/write_resultread_sheetto verify the result
Do not skip sql/compile.
6. Always read back after writing
Do at least one of the following:
read_sheetlist_worksheetsread_headers- Export the file and inspect it manually
Verification is especially required after:
- SQL result-table writes
- Writes to non-first worksheets
- Overwrite flows that preserve formulas or styles
- Chart, image, or style changes
7. Use workbook profile for broad workbook understanding
Use POST /api/v1/excel/workbook_profile when the user asks what a workbook contains, which sheets are relevant, or where to start an analysis.
- It returns a cached LLM-generated workbook summary plus worksheet sample rows
- It is read-only and requires viewer access
- Use it before manual
read_sheetcalls for unfamiliar multi-sheet workbooks - Use
force_refresh: trueafter worksheet structure changes or when cached semantics may be stale
See references/workbook-profile.md for request and response details.
8. Use lineage trace to explain computed cell dependencies
Use POST /api/v1/excel/lineage/trace when the user asks where a formula result comes from, why a computed value is wrong, or which source columns feed a target cell.
- It is read-only and requires viewer access
- It traces ordinary Excel formulas, cross-sheet references, column-like formulas, and supported
=SQL(...)formula outputs - Prefer
format: "tree"when explaining to a user - Prefer
format: "node"when a UI or downstream tool needs graph nodes and edges
See references/lineage-trace.md for request and response details.
9. Use clickable references only for confirmed workbook locations
When the final answer references real cells, ranges, or worksheets from the current Maybe Sheet workbook, follow references/clickable-refs.md so the frontend can make those references clickable.
- Use clickable references only for confirmed current-workbook locations
- Include the current workbook document ID in the
docIdattribute - Include the target worksheet gid in the
gidattribute - Do not use clickable references for examples, guesses, inferred locations, or uncertain references
- When referencing workbook cells, ranges, or table names, always use
<sheet-ref kind="..." docId="..." gid="..." sheet="..." range="...">...</sheet-ref>tags. Do not use conversational location descriptions such as "above", "the cell above", "D column row fourteen", or "D 列第十四行". - Always use paired
sheet-reftags with visible text, never self-closing tags. Use<sheet-ref kind="cell" docId="DOCUMENT_ID" gid="WORKSHEET_GID" sheet="Sheet1" range="A1">Sheet1!A1</sheet-ref>, not<sheet-ref .../>. - Do not place clickable references inside code blocks, formulas, SQL, JSON, or shell examples
10. Use the share API family for visibility changes
When the user asks to make a Maybe Sheet public or private, use:
POST /api/v1/share/sheet/visibility
Do not use:
/api/v1/excel/spreadsheets/d/{id}/share
That spreadsheet-path share route is the wrong endpoint for MaybeAI Sheet visibility changes and returns 404. Use the share/sheet/* API family for visibility, permission updates, access removal, and share listing.
Agent-Safe Playbooks
Upload and inspect a file
- Upload or import the file
- Capture
document_idanduri list_worksheetsread_headers- Optionally
read_sheetfor a small sample
References:
references/file-management.mdreferences/read-write.mdscripts/01-file-management.shscripts/02-read-data.sh
Profile a workbook before analysis
- Capture
document_idoruri - Call
workbook_profile - Use
profile.summaryto explain the workbook at a high level - Use
profile.worksheets[].sample_rowsto choose targetedread_headersorread_sheetcalls - If the workbook changed materially, call again with
force_refresh: true
References:
references/workbook-profile.mdscripts/10-workbook-profile.sh
Refresh a table while keeping headers and formulas
- Identify the target worksheet
- Use
update_data_keep_headers - If the sheet has computed columns, set
preserve_formulas: true read_sheetto verify
References:
references/read-write.mdscripts/03-write-data.sh
Sync business records by key
- Identify the key column, such as
Order IDorSKU - Use
update_range_by_lookup - If you need workbook-wide downstream recalculation, call
recalculate_formulas read_sheetto verify
References:
references/read-write.mdreferences/formulas-sql.md
Build an SQL result sheet
- Identify the worksheet name or gid
read_headers- Write PostgreSQL-compatible worksheet SQL
sql/compilesql/write_resultread_sheetto verify the output
References:
references/formulas-sql.mdscripts/06-formulas.sh
Persist many report formulas efficiently
- Scaffold the destination worksheet first
- Group derived cells into rectangular blocks
- Use
formula/batch_setfor those blocks - Prefer
recalculate_mode=workbookwhen later blocks depend on earlier blocks - Use
formula/setonly for sparse one-off fixes read_sheetto verify representative cells
References:
references/formulas-sql.mdscripts/06-formulas.sh
Trace formula lineage for a cell
- Capture
document_idoruri - Identify the target worksheet by
worksheet_nameorgid - Call
lineage/tracewith the exact A1 target cell - Use
treeoutput to explain the dependency chain, ornodeoutput to render a graph - If lineage is incomplete, read the referenced sheets and headers to verify unsupported or unresolved references
References:
references/lineage-trace.mdscripts/11-lineage-trace.sh
Produce a readable report worksheet
- Create the table with
write_new_worksheetor a data-write API freeze_panesbatch_set_cell_style- Optionally set widths, heights, and autofilter
- If the response includes
source_info.styles_ignored=true, explicitly tell the user the engine did not apply styles
References:
references/charts-formatting.mdreferences/errors-recovery.mdscripts/08-formatting.sh
Reference Map
references/file-management.mdBest for upload, import, search, copy, sharing, export, and file-entry issues.references/workbook-profile.mdBest for workbook semantic overview, sheet discovery before analysis, cached profile behavior, andworkbook_profilerequest/response details.references/read-write.mdBest for reading sheets, worksheet targeting, choosing the right write API, row and column operations, and worksheet management.references/formulas-sql.mdBest for formulas, recalculation, SQL compile, and SQL result tables.references/sql-formula-showcase.mdBest when you need a single live=SQL(...)formula that demonstrates joins, aggregation, Top N, and spill behavior.references/lineage-trace.mdBest for tracing a target cell's formula dependencies, explaining source columns behind computed values, or producing lineage graph nodes and edges.references/charts-formatting.mdBest for low-level chart APIs, pictures, freezing panes, styles, autofilter, and conditional formatting.references/errors-recovery.mdBest for troubleshooting, limitations, and recovery paths.
What This Skill Intentionally Excludes
- It does not handle full dashboard composition, chart layout strategy, or infographic design; use
sheet-dashboardfor those. - It does not turn the main
SKILL.mdinto a full API manual; long request bodies and examples belong inreferences/andscripts/. - It does not default to large visual redesign or chart rearrangement unless the user explicitly asks for that.