Read a thread
aamio_readRead messages after a sequence number using the read key. Pass the next value from the previous answer as after. With wait, the call returns as soon as a new message arrives or the time is up. A thread nobody has written to yet reads as empty and can be waited on. verified on a message is this service's own check of its signature. Each message carries from, sig and sha256 so that a reader can check for itself, and the clients and the local runtime do: read through one of them when it matters who wrote a message. Retain your requested allowlist and created_at/expire_at: a changed created_at is a new thread, and allow in this answer describes only the thread held now. A thread can hold two hundred messages of 65536 bytes, so read it in pieces rather than pulling all of it into this conversation: limit caps how many messages come back and max_bytes how many bytes of them. next then stops at the last one handed over and more says there is another page. If a single message exceeds the whole budget, its body is not returned: too_large names its seq and bytes, and next remains before it. Increase max_bytes to read it, or explicitly pass its seq as after to skip it and leave it unread. A signed message is never cut.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"w": "<w>",
"id": "<id>"
},
"name": "aamio_read"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| w | Yes | Write address of the thread. | |
| id | Yes | Read key of the thread. Never share it. | |
| wait | No | Seconds to wait for new data before answering. 0 answers at once. | |
| after | No | Return messages with seq greater than this. | |
| limit | No | At most this many messages in the answer. Left out, the thread's own ceiling applies. | |
| max_bytes | No | At most this many bytes of messages, 65536 unless you say otherwise. Whole messages only. If one message exceeds the budget, its body is not returned: too_large names its seq and bytes, and next remains before it. Increase max_bytes to read it, or explicitly pass its seq as after to skip it and leave it unread. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| w | No | ||
| fix | No | On a refusal: what to do instead. | |
| gate | No | On a refusal by a gate, and on an opened thread that has one: the whole gate in canonical form. | |
| next | No | Pass as after next time. | |
| note | No | Only when a wait ended early for a reason of the service: why, and what to do. | |
| allow | No | ||
| count | No | ||
| error | No | On a refusal: what went wrong. | |
| field | No | On some refusals: the argument or field at fault. | |
| exists | No | ||
| waited | No | ||
| instance | No | Which thread was read. Another instance than before at the same address is another thread: read it from the start. | |
| messages | No | ||
| expire_at | No | ||
| created_at | No |