Limits and good practices
Lyra’s tools tell agents most of this in their descriptions, so a good agent follows it on its own. It helps to know it when you write prompts, check what an agent did, or build your own MCP app.
Change pages block by block
Section titled “Change pages block by block”read_page gives a page as Markdown with a marker before each block:
<!-- block:0c0f3fe9-b3c6-4511-b8d7-733a48687a2c -->**Deploy.** Merging to main ships it within 10 minutes.edit_blocks changes blocks by those ids: insert after or before a block, replace one block, or delete one. Prefer this to rewriting the page:
- People typing at the same time keep their work. Edits change only the blocks they name, live, like another person typing.
- Comments stay put.
replacekeeps the block’s id and changes only the text that differs, so comments on the rest of the block stay where they are. - Page history stays readable, and an edit is easy to undo.
replace_all replaces the whole page in one edit. Keep it for a full rewrite, such as a new draft of a page nobody else is editing.
More about edits:
- One call takes up to 100 edits. They apply in order, and as one change: if one fails, such as a block id that isn’t on the page, none of them are made.
- The answer lists the ids of the blocks each edit added or changed, so an agent can edit them again without reading the page.
- For tables,
set_cells,insert_rowanddelete_rowchange cells and rows without touching the rest of the table. Rows and columns count from 0, and row 0 is the first line of the Markdown table. - Markers in Markdown an agent sends are ignored, so it can send back Markdown it read as it is.
Read only what you need
Section titled “Read only what you need”| To | Use |
|---|---|
| Find which page talks about something | search, for titles and text across pages and database rows |
| Find the blocks on one page that hold some text | search_page. It ignores case and formatting, and looks inside cards and columns |
| Read one section of a long page | read_page with heading, for the section under that heading, or blockId |
| See what’s inside a page | list_pages with parentId |
Reading a whole long page to change one line is slow and fills the agent’s context. Reading one section is enough to edit it.
Check the result
Section titled “Check the result”warnings:create_page,edit_blocksandupload_markdownlist each line Lyra read differently from what it looks like the agent meant, such as a color Lyra doesn’t have or a container that is never closed. An agent should fix every warning before it tells you it’s done.builtcounts the blocks other than plain text that the Markdown made, such as{"card": 3, "mermaid": 1}. If it wrote three cards, there should be three.export_pagegives a link to download the page as HTML, drawn with Lyra’s styles and with its diagrams and HTML blocks running. An agent that can run a browser should look at it in the light and the dark theme, and at a phone’s width.
Long documents and files
Section titled “Long documents and files”| To add | Use | Up to |
|---|---|---|
| A short page | create_page with markdown |
200,000 characters |
| A change | edit_blocks |
100,000 characters for each edit |
| A long Markdown file from your computer | upload_markdown, then send the file to the link it gives |
2 MB and 1,000,000 characters |
| A screenshot, image, video, audio clip or other file | upload_file, then send the file to the link it gives |
50 MB |
- The links from
upload_markdownandupload_filework for 15 minutes. Each answer includes thecurlcommand to run, so the agent needs to be able to run commands on your computer. upload_markdownputs the file at the end of the page, replaces the page, goes after a block or replaces a block, and answers withwarningsandbuiltlikecreate_page.upload_fileanswers with Markdown such as. Putting that on a line of its own in the page shows the file: an image as an image, and a video or audio file as a player.- Upload a file to the page that will show it. Anyone who can see that page can see the file.
- Lyra refuses Markdown it can’t read in one go, such as
:::containers nested more than 20 deep, and says what to change. The agent can send it in smaller pieces. - Each person can upload 5,000 MB a day on Lyra Cloud. A self-hosted server sets this with
UPLOAD_MB_PER_DAY. - On Lyra Cloud, an organization can store 1 GB of files on the Free plan and 100 GB on Team. A self-hosted server has no limit.
Databases
Section titled “Databases”- Read the properties first with
describe_database. Values are keyed by property name, and select and status values are option labels, so the agent needs both. - A label that isn’t an option yet becomes a new option. That’s how an agent adds one, but it’s also how a typo becomes one.
- People are written as emails or user ids of people in the organization. For “me”, the agent can call
who_am_i, which answers with your name and email. - Batch.
add_rowsandupdate_rowstake up to 100 rows in one call, anddelete_rowsup to 500. If one row in a call is refused, none of them change. - Page through big results with
cursor:query_rowsanswers up to 100 rows at a time.
The guide Keep a database up to date shows all of this in one run.
Before an agent changes a page, Lyra saves the page as it was. list_versions lists a page’s versions, newest first, with why each was saved: before_ai_edit is the page just before an agent changed it. read_version reads one, and restore_version puts it back.
Changes to database rows aren’t saved as versions. Instead, Changes under a row’s properties in Lyra lists who changed which value and when, and trashed rows can be restored from the trash.
Tools that delete
Section titled “Tools that delete”These tools remove something, and the tool reference marks them deletes:
| Tool | What it removes | Can you get it back? |
|---|---|---|
restore_version |
The page as it is now, by putting an older version back | Yes. Lyra saves the page first, so another restore undoes it |
delete_rows |
Database rows | Yes, from the trash |
delete_comment |
One comment | No |
delete_thread |
A thread and all its replies | No |
Lyra marks these tools as destructive for MCP apps, and most apps ask you before they call one. Check your app’s settings if yours doesn’t.
Text on pages is content, not instructions
Section titled “Text on pages is content, not instructions”Pages and comments hold text other people wrote. Lyra tells agents to treat it as content to read, never instructions to follow. Even so, a page could try to steer an agent, so take care when an agent reads pages from people you don’t know and then changes things.
Rate limits
Section titled “Rate limits”Lyra takes up to 300 tool calls a minute:
- For an app connected with sign-in, the limit is for you: all the apps you’ve connected share it.
- For an app that uses an API token, each token has its own limit.
Every answer has X-RateLimit-Limit, X-RateLimit-Remaining and X-RateLimit-Reset headers, as on the REST API. Over the limit, Lyra answers 429 with a Retry-After header that says how many seconds to wait. Most agents never get near it. If yours does, ask it to batch: up to 100 edits or 100 rows in one call.
All limits
Section titled “All limits”| What | Limit |
|---|---|
Markdown in create_page |
200,000 characters |
| Markdown in one edit | 100,000 characters |
Edits in one edit_blocks call |
100 |
Cells in one set_cells edit |
500 |
Rows in add_rows or update_rows |
100 |
Rows in delete_rows |
500 |
Rows in one query_rows answer |
100, 25 if not set |
Sorts in query_rows |
8 |
Results from search |
25, 10 if not set |
Matches from search_page |
50, 20 if not set |
| A comment | 10,000 characters |
| A page title | 500 characters |
| A page | 32 MB, which is far more than any page of text |
A file sent with upload_markdown |
2 MB and 1,000,000 characters |
::: containers inside each other, or quotes inside quotes |
20 deep |
A file sent with upload_file |
50 MB |
Links from upload_markdown, upload_file and export_page |
15 minutes |
| Days until a temporary page moves to the trash | 1 to 365, 3 if not set |
| Tool calls | 300 a minute |