Skip to content

Guide: keep a database up to date

Agents are good at turning loose notes into database changes: mark what’s done, move dates, add new rows. This guide shows one prompt and every tool call an agent made for it, with Lyra’s real answers.

The database is Launch tasks, with the properties Name, Status, Due, Owner and Tags.

Here are my notes from today’s launch standup. Update the Launch tasks database in Lyra to match.

  • The pricing page is done.
  • I’ve started recording the demo. It’s mine now, due on the 11th.
  • New task: send the launch email. Also mine, due the 12th.

I’m sam@example.com.

The prompt gives your email for the Owner property. Without it, the agent would call who_am_i first, which answers with your name, your email and the organization it works in.

Step Tool Why
1 search Find the database’s id
2 describe_database Learn its properties, their types and the options of Status
3 query_rows Read the open tasks, to find the rows the notes are about
4 update_rows Change two rows in one call
5 add_rows Add the new task
6 query_rows Read the open tasks again to check, and tell you what changed
search
{ "query": "Launch tasks" }
{
"results": [
{
"id": "01a2380f-fdea-74bb-ae0f-98237eb36215",
"title": "Launch tasks",
"icon": null,
"kind": "database",
"breadcrumbs": [],
"snippet": "",
"updatedAt": "2026-12-02T18:41:42.044Z",
"expiresAt": null
}
]
}

If you give the agent the database’s link instead, it can skip this step: a database’s id is the last part of its link.

describe_database
{ "databaseId": "01a2380f-fdea-74bb-ae0f-98237eb36215" }
{
"id": "01a2380f-fdea-74bb-ae0f-98237eb36215",
"title": "Launch tasks",
"properties": [
{ "id": "01a2380f-fe00-7268-b255-6522ea3fbbf4", "name": "Name", "type": "title" },
{ "id": "01a2380f-fe04-777f-ae53-36c71148d624", "name": "Tags", "type": "multi_select" },
{ "id": "01a23810-6a8f-7307-b8da-889d473599d9", "name": "Status", "type": "status", "options": ["Not started", "In progress", "Done"] },
{ "id": "01a23810-6ab7-7229-9321-1d1df0e2cf6c", "name": "Due", "type": "date" },
{ "id": "01a23810-6ad6-7586-8d7d-6d584b42f96e", "name": "Owner", "type": "person" }
],
"views": [{ "id": "01a2380f-fe0a-76c8-9bb1-4dbc9c7624dd", "name": "Table", "type": "table" }]
}

Now the agent knows that “done” is the status Done, and that Owner takes people.

query_rows
{
"databaseId": "01a2380f-fdea-74bb-ae0f-98237eb36215",
"filter": { "op": "and", "items": [{ "propertyId": "Status", "operator": "not_equals", "value": "Done" }] },
"sorts": [{ "propertyId": "Due", "direction": "asc" }]
}
{
"rows": [
{
"id": "01a23810-c421-7180-8a8d-11a2ec9988ab",
"values": { "Name": "Update the pricing page", "Tags": [], "Status": "In progress", "Due": "2026-12-07T00:00:00.000Z", "Owner": [] }
},
{
"id": "01a23810-c40e-74a5-9916-39b1d3e42942",
"values": { "Name": "Write the launch post", "Tags": [], "Status": "In progress", "Due": "2026-12-08T00:00:00.000Z", "Owner": ["Sam"] }
},
{
"id": "01a23810-c41c-74aa-bb63-e216dcab03d3",
"values": { "Name": "Record the demo", "Tags": [], "Status": "Not started", "Due": "2026-12-09T00:00:00.000Z", "Owner": [] }
}
],
"nextCursor": null
}

The agent matches “the pricing page” and “recording the demo” to these rows. For a large database, it would search instead, with "search": "pricing".

One call changes both rows. It sends only the values that change, keyed by property name:

update_rows
{
"databaseId": "01a2380f-fdea-74bb-ae0f-98237eb36215",
"updates": [
{ "rowId": "01a23810-c421-7180-8a8d-11a2ec9988ab", "values": { "Status": "Done" } },
{
"rowId": "01a23810-c41c-74aa-bb63-e216dcab03d3",
"values": { "Status": "In progress", "Due": "2026-12-11", "Owner": ["sam@example.com"] }
}
]
}
{ "ok": true, "updated": 2 }
add_rows
{
"databaseId": "01a2380f-fdea-74bb-ae0f-98237eb36215",
"rows": [
{
"title": "Send the launch email",
"values": { "Status": "Not started", "Due": "2026-12-12", "Owner": ["sam@example.com"] }
}
]
}
{ "rowIds": ["01a23811-2c08-718a-a054-0ce8effcfc44"] }

The agent runs the same query as in step 3:

{
"rows": [
{
"id": "01a23810-c40e-74a5-9916-39b1d3e42942",
"values": { "Name": "Write the launch post", "Tags": [], "Status": "In progress", "Due": "2026-12-08T00:00:00.000Z", "Owner": ["Sam"] }
},
{
"id": "01a23810-c41c-74aa-bb63-e216dcab03d3",
"values": { "Name": "Record the demo", "Tags": [], "Status": "In progress", "Due": "2026-12-11T00:00:00.000Z", "Owner": ["Sam"] }
},
{
"id": "01a23811-2c08-718a-a054-0ce8effcfc44",
"values": { "Name": "Send the launch email", "Tags": [], "Status": "Not started", "Due": "2026-12-12T00:00:00.000Z", "Owner": ["Sam"] }
}
],
"nextCursor": null
}

The pricing page is gone from the open tasks, the demo has moved to the 11th, and the launch email is there. The agent tells you so.

Property type The agent writes It reads back
Text, URL, email, phone "text" "text"
Number 42 42
Checkbox true or false true or false
Select, status The option’s label: "Done" "Done"
Multi-select A list of labels: ["video", "launch"] The same
Date "2026-12-11", or {"start": "2026-12-08", "end": "2026-12-11"} for a range "2026-12-11T00:00:00.000Z", or {"start", "end"}
Person A list of emails or user ids of people in the organization A list of names
Relation A list of row ids A list of {id, title}
  • A label that isn’t an option yet is added as a new option. Writing "Status": "Blocked" adds Blocked to the status options. That’s handy on purpose, but a typo makes a new option too, which is why agents read the options with describe_database first.
  • A person who isn’t in the organization is refused: Owner: some of those people aren't in this organization.
  • When one row in a call is refused, none of the rows change, so the agent can fix the call and send it again.
  • A property the database doesn’t have is refused: There is no property 'Priority' in this database. The agent can add it with add_property if you ask it to.
  • Link the database so the agent doesn’t have to search for it.
  • Give emails for other people. For you, the agent can find yours with who_am_i.
  • Say what to do with rows that don’t match, such as “if a task isn’t in the database, add it; don’t delete anything”.
  • Ask it to show the changes first if you want to check them before they’re made: “list what you’d change, and wait for me to say go”.
  • Each call adds or changes up to 100 rows, and delete_rows moves up to 500 to the trash. People can restore trashed rows from the trash in Lyra.