MCP, the command line, and the tool API: how wordAI is driven
Underneath wordAI sits WordCraft, a clean-room rewrite of a Word-compatible editor in Rust, and one command table drives everything: the ribbon, the keyboard shortcuts, the command line, the JSON control channel, and the MCP server. A button in the interface and a command from a program are the same thing, drawn from the same table.
wordAI is a browser-based AI document editor for Chinese official documents and reports, with a staged copy, three checks before saving, and a diff list for every change.
- 2 languages — Simplified Chinese and English
- 2 sign-in methods — phone verification code, or email and password
- 3 checks — text, inspect, and convert
- 0 installs — opens in the browser
One command table, five entrances
There is one command table and 5 entrances to it: the ribbon, keyboard shortcuts, the command line, the JSON control channel, and the MCP server. A new command enters the table first, so that it can be found and called from every entrance. The AI commands in wordAI follow the same road: they enter the command table first, and every entrance calls them from there. The benefit is that a change can be reproduced: what happened in the interface can be run again from the command line, and what ran from the command line can be called again through the tool interface. The table holds 422 commands in total.
| Entrance | What it is for |
|---|---|
| Ribbon | Buttons in the editor interface |
| Keyboard shortcuts | Keys that call commands directly |
| Command line | The wordcraft-cli tool |
| JSON control channel | Commands sent as structured data |
| MCP server | Tools an agent calls |
The command line: four core commands
The command line tool is wordcraft-cli, and its core is 4 commands: convert, text, inspect, and run. Convert handles format conversion, text extracts the words, inspect checks the structure of the document, and run executes a command. The three checks before saving run along this line: text checks whether the words landed as expected, inspect checks whether the structure survived, and convert checks whether the converted result still matches the original. Verification is a command that reads the document itself. The same three checks guard a save made by a command, so a change made without opening the page still has to pass before it lands.
- Use wordcraft-cli for the four core jobs: convert for format conversion, text for extracting words, inspect for checking document structure, and run for executing a command.
- Run the three checks after a change: text, inspect, and convert, with all three passing before anything is saved.
- Verify by reading the document, not the screen: inspect reads headings, tables, and captions from the document itself.
MCP: eight tools, and checking without screenshots
The MCP tool table holds 8 tools: list_commands, execute, batch, type_text, select_text, inspect_document, render_page, and save_document. List_commands looks up the table, execute runs one command, batch runs several at once, type_text types, select_text selects a passage, inspect_document checks the document, render_page renders a page, and save_document saves it. Together they are the agent's hands: the agent does not simulate a mouse and keyboard, but calls tools to change, check, and save the document directly. The tool table and the ribbon command table are one table, so what the interface can do, the tools can do too. An agent that has changed a document does not check its work by looking at a screenshot. It calls inspect_document and reads the structure and content directly, checking heading levels, table totals, and caption numbers. A screenshot can only prove that the interface once displayed something; it cannot prove that the document holds the right content.
The tool API, directory limits, and two items still waiting
The tool API is a set of HTTP interfaces through which other systems can call wordAI commands without opening the page. Its base is doc.aiglade.cn/api/tool, and it has 4 routes. GET /health needs no token and reports whether the service is running. GET /commands needs a token and returns the command list. POST /run needs a token, takes a commands array in which each entry states its command and params, and can also carry a save flag with a file name and file content; its response carries ok, job, output, stderr, and an artifacts array. GET /artifacts/<job>/<file> needs a token and reads a product back by job and file name. AI commands need a second header, X-Wordai-Key, alongside X-Wordai-Token.
Two spots have been tested and work: the health route returns 200, and file.new plus save has produced a Word 2007 document of 6582 bytes, read back and confirmed as Word format. Two spots are still waiting for confirmation: GET /commands returns an empty list, so a caller cannot get the list of usable commands, and a model command run twice failed with the error that the model returned no text.
The agent's read and write range is bounded before it starts, by 2 startup parameters, --automation-read-root and --automation-write-root, which limit the agent to the directories they name. A read-only task gets no write directory, and a task that must save gets one, under the rule that a task gets only the permission it needs. On the web channel, the key stays in the browser and the server does not store it, under controlled forwarding.
- Call GET /health first, with no token; a 200 response says the service is running.
- Call GET /commands with the token, and check whether the command list comes back in full; at the time of writing it came back empty, so call only the lines already known to work.
- Call POST /run with the token, adding the second header for AI commands, with a commands array stating each command and its params, plus a save flag where needed.
- Read the job and artifacts from the response, call GET /artifacts/<job>/<file> with the token to read the product back, and reconcile the output and stderr in the execution log against the finished document before calling a run complete.
wordAI in numbers
- 422 commands in the WordCraft command table (see h074; verified: 2026-11-12)
- 5 entrances to the same command table: ribbon, shortcuts, command line, JSON control channel, and MCP server (see h074; verified: 2026-11-12)
- 4 core command line commands: convert, text, inspect, and run (see h074; verified: 2026-11-12)
- 8 MCP tools: list_commands, execute, batch, type_text, select_text, inspect_document, render_page, and save_document (see h074; verified: 2026-11-12)
- 2 directory parameters: --automation-read-root and --automation-write-root (see h075; verified: 2026-11-12)
- 4 tool API routes: /health, /commands, /run, and /artifacts, with 2 auth headers (see h076; verified: 2026-11-12)
- 2 spots tested and working, and 2 spots waiting: health plus file.new and save work, while the command list is empty and the model returned no text (see h076; verified: 2026-11-12)
How to start
- Open doc.aiglade.cn/ai and sign in with an Aiglade account.
- Connect through the MCP interface or the HTTP API with your account key.
- Ask the assistant for the task this page describes.
- Review the diff list and the check report before saving.
Evidence
wordAI is a browser-based AI document editor for Chinese official documents and reports, with a staged copy, three checks before saving, and a diff list for every change. It is driven by one WordCraft command table of 422 commands, reached through 5 entrances, with a command line core of convert, text, inspect, and run, and 8 MCP tools that let an agent change, check, and save a document without simulating clicks. Verification reads the document itself through inspect_document, never a screenshot. The tool API opens the same table to other systems over 4 routes with 2 auth headers, and it is honestly half proven: health and file creation with saving work, while the empty command list and the model returning no text are still waiting for confirmation.
FAQ
How many ways are there to drive wordAI?
Five, and they all call the same command table: the ribbon, keyboard shortcuts, the command line, the JSON control channel, and the MCP server. A button in the interface and a command run by a program are the same command.
How does an agent check its work without a screenshot?
It calls inspect_document, which reads the document structure and content directly: heading levels, table totals, and caption numbers. A screenshot only proves the interface once displayed something; it cannot prove the document holds the right content.
Is the tool API fully working?
No. The health route and file creation with saving have been tested and work, but the command list comes back empty and a model command failed twice because the model returned no text. Both are waiting for confirmation, so calls beyond the known working lines should not be assumed to work.
Last updated: 2026-11-12 · Aiglade · Open wordAI · Full guide
Not written / to verify: the entry positions for the command line and MCP tools in the wordAI web page are not stated in the source notes; which of the 422 base commands are the wordAI AI commands is not listed; the empty command list and the model returning no text are still waiting for confirmation, and call steps beyond the known working lines are left blank.
Open wordAI