Skip to main content
Glama

wait_journal

Read-onlyIdempotent

Monitor the case journal for new entries after a given sequence number, filtered by task, project, or type. Return as soon as a matching entry appears, or after a timeout, to keep clients updated without busy polling.

Instructions

Returns journal entries after the sequence number after, waiting for new ones.

The journal is every case entry of the installation in one stream, task cases and project cases alike, in seq order; task, project and types narrow it. The call returns as soon as a matching entry appears, and after timeout seconds at the latest. The next call continues from the seq of the last entry received. With types=["answer"] and task, one call covers an answer expected within timeout.

Entries already filed in one case, by number, are returned by read_entries and read_project_entries.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
taskNoOnly entries of these tasks: one key or a list of at most 50. One wait covers all of them, and an entry in any of them ends it. More keys are refused with `journal_too_many_tasks`, an unknown key with `task_not_found`
afterNoJournal sequence number `seq` to read after; `0` reads from the start. Entries are permanent: no `seq` is too old
limitNoPage size. Without a value, the installation's default page size
typesNoOnly entries of these types
cursorNo`next_cursor` of the previous page; without it, the first page
projectNoOnly entries of this project: its own case and the cases of its tasks
timeoutNoSeconds to wait for the first matching entry when none is there yet, at most 60 (`journal_wait_too_long` beyond); `0` answers at once. An empty page after the wait means nothing happened and is not an error

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
itemsYes
next_cursorYesCursor of the next page, sent back as `cursor`; `null` means this page is the last one

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed33 schema fields changedv0.5.2
    • removedInput schema / $defs
      Removed value: -{
      -  "EntryType": {
      -    "description": "Тип записи дела. Записи агента и человека — до `NOTE`, служебные — после.",
      -    "enum": [
      -      "summary",
      -      "decision",
      -      "attempt",
      -      "finding",
      -      "artifact",
      -      "question",
      -      "answer",
      -      "verdict",
      -      "remark",
      -      "resolution",
      -      "note",
      -      "created",
      -      "status_changed",
      -      "section_changed",
      -      "field_changed",
      -      "assignee_changed",
      -      "link_added",
      -      "link_removed"
      -    ],
      -    "title": "EntryType",
      -    "type": "string"
      -  }
      -}
    • changedInput schema / properties / after / description
      Previous value: -"Сквозной номер `seq`, после которого читать. 0 — с самого начала: записи постоянны, слишком старого курсора не бывает"New value: +"Journal sequence number `seq` to read after; `0` reads from the start. Entries are permanent: no `seq` is too old"
    • removedInput schema / properties / after / examples
      Removed value: -[
      -  1024
      -]
    • changedInput schema / properties / cursor / description
      Previous value: -"Продолжение выдачи: значение `next_cursor` из прошлого ответа"New value: +"`next_cursor` of the previous page; without it, the first page"
    • changedInput schema / properties / limit / description
      Previous value: -"Сколько записей вернуть за раз. Без значения — размер страницы установки"New value: +"Page size. Without a value, the installation's default page size"
    • removedInput schema / properties / limit / examples
      Removed value: -[
      -  25
      -]
    • addedInput schema / properties / project
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "Only entries of this project: its own case and the cases of its tasks",
      +  "examples": [
      +    "TRK"
      +  ],
      +  "title": "Project"
      +}
    • removedInput schema / properties / queue
      Removed value: -{
      -  "anyOf": [
      -    {
      -      "type": "string"
      -    },
      -    {
      -      "type": "null"
      -    }
      -  ],
      -  "default": null,
      -  "description": "Только записи задач этой очереди",
      -  "examples": [
      -    "TRK"
      -  ],
      -  "title": "Queue"
      -}
    • changedInput schema / properties / task / description
      Previous value: -"Только записи этих задач: ключ или список ключей, не больше 50. Несколько дел спрашиваются одним ожиданием, а не по вызову на каждое. Превышение — `journal_too_many_tasks` с числом в подробностях; несуществующий ключ — `task_not_found`, а не пустая лента"New value: +"Only entries of these tasks: one key or a list of at most 50. One wait covers all of them, and an entry in any of them ends it. More keys are refused with `journal_too_many_tasks`, an unknown key with `task_not_found`"
    • changedInput schema / properties / timeout / description
      Previous value: -"Сколько секунд ждать первую подходящую запись, если хвост пуст; не больше 60. 0 — ответить сразу. Пустой список по истечении ожидания означает «ничего не случилось» и ошибкой не является"New value: +"Seconds to wait for the first matching entry when none is there yet, at most 60 (`journal_wait_too_long` beyond); `0` answers at once. An empty page after the wait means nothing happened and is not an error"
    • removedInput schema / properties / timeout / examples
      Removed value: -[
      -  30
      -]
    • changedInput schema / properties / types / anyOf
      Previous value: -[
      -  {
      -    "items": {
      -      "$ref": "#/$defs/EntryType"
      -    },
      -    "type": "array"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]New value: +[
      +  {
      +    "items": {
      +      "description": "Case entry type. Types up to `note` are written by agents and humans; the types after it are filed by the tracker itself with the change they record",
      +      "enum": [
      +        "summary",
      +        "decision",
      +        "attempt",
      +        "finding",
      +        "artifact",
      +        "question",
      +        "answer",
      +        "verdict",
      +        "remark",
      +        "resolution",
      +        "note",
      +        "created",
      +        "status_changed",
      +        "section_changed",
      +        "field_changed",
      +        "assignee_changed",
      +        "link_added",
      +        "link_removed",
      +        "moved",
      +        "attribute_created",
      +        "attribute_changed",
      +        "attribute_removed",
      +        "archived",
      +        "restored"
      +      ],
      +      "type": "string"
      +    },
      +    "type": "array"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • changedInput schema / properties / types / description
      Previous value: -"Только записи этих типов"New value: +"Only entries of these types"
    • removedInput schema / properties / types / examples
      Removed value: -[
      -  [
      -    "decision",
      -    "attempt"
      -  ]
      -]
    • removedOutput schema / $defs / AuthorKind
      Removed value: -{
      -  "description": "Кто именно сделал действие.\n\n`tracker` — сам трекер: этим родом подписаны служебные записи дела и строки,\nзаведённые командой первичной инициализации. У него нет подписи, потому что\nназывать себя по имени ему незачем: трекер в установке один.",
      -  "enum": [
      -    "agent",
      -    "human",
      -    "tracker"
      -  ],
      -  "title": "AuthorKind",
      -  "type": "string"
      -}
    • changedOutput schema / $defs / AuthorView / description
      Previous value: -"Кто сделал действие: род и подпись. У самого трекера подписи нет."New value: +"Who acted: kind and signature. The tracker itself has no signature."
    • removedOutput schema / $defs / AuthorView / properties / kind / $ref
      Removed value: -"#/$defs/AuthorKind"
    • addedOutput schema / $defs / AuthorView / properties / kind / description
      Added value: +"Kind of author. `tracker` signs the service entries the tracker files itself"
    • addedOutput schema / $defs / AuthorView / properties / kind / enum
      Added value: +[
      +  "agent",
      +  "human",
      +  "tracker"
      +]
    • addedOutput schema / $defs / AuthorView / properties / kind / type
      Added value: +"string"
    • removedOutput schema / $defs / EntryType
      Removed value: -{
      -  "description": "Тип записи дела. Записи агента и человека — до `NOTE`, служебные — после.",
      -  "enum": [
      -    "summary",
      -    "decision",
      -    "attempt",
      -    "finding",
      -    "artifact",
      -    "question",
      -    "answer",
      -    "verdict",
      -    "remark",
      -    "resolution",
      -    "note",
      -    "created",
      -    "status_changed",
      -    "section_changed",
      -    "field_changed",
      -    "assignee_changed",
      -    "link_added",
      -    "link_removed"
      -  ],
      -  "title": "EntryType",
      -  "type": "string"
      -}
    • changedOutput schema / $defs / EntryView / description
      Previous value: -"Запись дела целиком.\n\n`payload` — единственное поле слоя без объявленной формы, и это то же исключение,\nчто и в схеме REST (`docs/notes/api.md`, «`payload` записи дела — исключение из\nтипизации, названное по месту»): нагрузка своя у каждого типа записи, и типизирует\nеё отдельная задача — сразу в обоих интерфейсах, иначе они разойдутся. `JsonValue`,\nа не `Any`: форма свободна, но значение обязано быть представимо в JSON."New value: +"Case entry in full."
    • addedOutput schema / $defs / EntryView / properties / project_key
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "description": "Key of the owning project for an entry of a project's case (`TRK#7`); `null` for a task entry",
      +  "title": "Project Key"
      +}
    • addedOutput schema / $defs / EntryView / properties / seq / description
      Added value: +"Journal sequence number, usable as `after` of `wait_journal`"
    • addedOutput schema / $defs / EntryView / properties / task_key / anyOf
      Added value: +[
      +  {
      +    "type": "string"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • addedOutput schema / $defs / EntryView / properties / task_key / description
      Added value: +"Key of the owning task; `null` for an entry of a project's case"
    • removedOutput schema / $defs / EntryView / properties / task_key / type
      Removed value: -"string"
    • removedOutput schema / $defs / EntryView / properties / type / $ref
      Removed value: -"#/$defs/EntryType"
    • addedOutput schema / $defs / EntryView / properties / type / description
      Added value: +"Case entry type. Types up to `note` are written by agents and humans; the types after it are filed by the tracker itself with the change they record"
    • addedOutput schema / $defs / EntryView / properties / type / enum
      Added value: +[
      +  "summary",
      +  "decision",
      +  "attempt",
      +  "finding",
      +  "artifact",
      +  "question",
      +  "answer",
      +  "verdict",
      +  "remark",
      +  "resolution",
      +  "note",
      +  "created",
      +  "status_changed",
      +  "section_changed",
      +  "field_changed",
      +  "assignee_changed",
      +  "link_added",
      +  "link_removed",
      +  "moved",
      +  "attribute_created",
      +  "attribute_changed",
      +  "attribute_removed",
      +  "archived",
      +  "restored"
      +]
    • addedOutput schema / $defs / EntryView / properties / type / type
      Added value: +"string"
    • changedOutput schema / $defs / EntryView / required
      Previous value: -[
      -  "id",
      -  "seq",
      -  "no",
      -  "task_key",
      -  "type",
      -  "author",
      -  "title",
      -  "body",
      -  "payload",
      -  "refs",
      -  "created_at"
      -]New value: +[
      +  "id",
      +  "seq",
      +  "no",
      +  "task_key",
      +  "project_key",
      +  "type",
      +  "author",
      +  "title",
      +  "body",
      +  "payload",
      +  "refs",
      +  "created_at"
      +]
    • addedOutput schema / properties / next_cursor / description
      Added value: +"Cursor of the next page, sent back as `cursor`; `null` means this page is the last one"
  2. First observed

TDQS

A4.7/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare readOnlyHint=true, idempotentHint=true, and destructiveHint=false, so the safety profile is covered. The description adds valuable behavioral context beyond annotations: it explains the waiting semantics, the continuation behavior ('The next call continues from the `seq` of the last entry received'), and the non-error empty page after timeout. It also clarifies that entries are permanent and no `seq` is too old. This is more than the annotations alone provide, though it doesn't detail pagination or cursor behavior in depth.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is compact and front-loaded. The first sentence states the core function immediately. The second paragraph adds necessary context about the journal stream and sibling tools without redundancy. Every sentence earns its place, and the description is appropriately sized for a tool with 7 parameters and complex waiting semantics.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's complexity (waiting semantics, filtering, pagination, continuation), the description is complete. It covers the stream model, filtering options, timeout behavior, continuation, and distinguishes from sibling tools. The output schema exists, so return values are documented elsewhere. The description provides everything an agent needs to decide when to call this tool and what to expect.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema already documents all 7 parameters thoroughly. The description adds meaningful context beyond the schema: it explains the overall stream semantics, how `task`, `project`, and `types` narrow the stream, and the practical use case for `types=["answer"]`. It doesn't repeat parameter-by-parameter details, which is appropriate given the schema's completeness, but it does add cross-parameter context that helps an agent understand how the parameters interact.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's function: 'Returns journal entries after the sequence number `after`, waiting for new ones.' It specifies the resource (journal entries), the operation (wait and return), and the key parameter (`after`). It also distinguishes itself from siblings by noting that entries filed in one case are returned by `read_entries` and `read_project_entries`, which helps an agent differentiate it from those alternatives.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides explicit usage context: it explains the journal is a single stream of all case entries, how `task`, `project`, and `types` narrow it, and when the call returns (as soon as a matching entry appears or after `timeout` seconds). It also gives a concrete use case: 'With `types=["answer"]` and `task`, one call covers an answer expected within `timeout`.' This is strong guidance for when to use this tool.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.