# Read and edit wiki pages

wiki_get and wiki_update read and edit the long-form page the team keeps about a thing.

Each thing in the record, such as a product, system or feature, can have a wiki page: long-form Markdown written by your team and your AI tools together.

## wiki_get

`wiki_get` returns a thing's current page and the page's version id. Part of a name is enough to find the thing.

| Input | What to send |
|---|---|
| `thing` | The thing's name or id. Required. |
| `history` | `true` for every version, with who made each and when |
| `version` | A version id from the history, for that version |
| `against` | A second version id, with `version`, for the lines that changed between the two |

## wiki_update

`wiki_update` replaces a thing's page with new Markdown, up to 100 KB. Send the version the edit starts from. If the page changed in the meantime, nothing is written and the current page comes back: the agent reads the current page, makes the edit again on top, and sends the edit again. Edits are never merged.

| Input | What to send |
|---|---|
| `thing` | The thing's id or exact name. Required. |
| `body` | The whole page, in Markdown. Required. |
| `based_on` | The version id the edit starts from, from `wiki_get`. Leave out only for a thing with no page yet. |
