Wait for pending work
await_pendingWait until another session has queued work in this memory, then return it. Read only. Blocks (without holding up other requests) until a saved note whose outcome is "pending" appears, or timeout_s passes, whichever comes first. It returns as soon as something else on this memory writes a pending note, so an otherwise-idle session can act as a live worker. A note closed with record_outcome(expected_prior_result="pending") is closed only by the first caller, so two workers cannot both close the same item.
Limitation: candidates come from a semantic search over this memory's notes and are then filtered for the outcome "pending", so it reliably finds notes phrased like this server's own (see the default query) but is not guaranteed to find every pending note written in unrelated wording.
Args: device_id: the named memory to watch, if not the account's default one. timeout_s: the longest to wait in seconds (default 25; capped so a call always returns well before typical proxy timeouts). poll_interval_s: seconds between checks while waiting (default 3). query: the search used to surface candidate notes (the default is tuned to this server's own notes). k: how many candidates to consider per check (default 25).
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": "await_pending"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| k | No | ||
| query | No | pending outcome awaiting confirmation task | |
| device_id | No | ||
| timeout_s | No | ||
| poll_interval_s | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |