List the media library
list_mediaThe images and videos already in this workspace’s library. An id from here is what a block’s mediaIds references.
If nothing here fits and the file is somewhere on the web, upload_media_from_url adds it and answers with an id you can use immediately. What you cannot do is send the bytes themselves — tool arguments are JSON — so a file that exists only on the user’s own machine is theirs to upload in the app.
Every url is short-lived and minted fresh per call. Key anything durable off id.
Newest first, a page at a time. Pass the nextCursor you got back as cursor to continue; hasMore: false is how you know to stop. Never guess a cursor.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "list_media"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Page size. Clamped to 100; asking for more is not an error. | |
| cursor | No | The `nextCursor` from the previous page. Opaque: a value we did not issue is rejected rather than silently restarting at page one. |