Skip to content

MCP tools

relaybay serves MCP over Streamable HTTP at http://127.0.0.1:8765/mcp. Every request needs Authorization: Bearer <token> (relaybay token prints it). Results are short markdown meant to be read by the model; failures (unknown task, version conflict, invalid stage) come back as tool errors with a message that says what to do.

Role endpoints list a smaller set with instructions for one role: /mcp/agent (a session working one card), /mcp/coordinator and /mcp/reader (review and planning helpers); /mcp is the full set. See Tool sets by role.

Server instructions

The server's MCP instructions (sent once when a session connects) are a short working contract in four parts, by when they apply. At the start: read task_context of your card (no card: project_digest; the whole board: portfolio_digest; more on a project: project_snapshot, whose first line names the rules); create a missing card with task_create and give it an area (the part of the project it is about; reuse a name from the project's areas, add one only when none fits); pass session (your local_ id with session_title, else a name) and hook_session on writes; plan every task with plan_set (2-5 steps) and keep the Claude Code todo (TaskCreate / TaskUpdate). While you work: update next_step, waiting_on (only who acts next) and progress on every stage change and report; mark plan steps with plan_step_update, new work is plan_step_add; answer owner comments with comment_add or comment_ack; record decisions with decision_add and findings outside the task with backlog_add; read large documents by doc_outline and doc_get of a section. At the end: report_add with the configured first line, states and sizes (from the effective global rules); finished work goes to done, and review only when the owner wants a step-by-step acceptance (review_steps_set, attach_file). Always: fix what a Warning (rules) line names and re-read the rules on rules updated to vN (changes through rules_propose); task_update(fields=…) for fields a cached schema lacks; hosts and access come from the project's own notes, never paste secrets; a guard stop says why (policy_get, policy_propose).

In coordinator mode (coordinators set in the config) the /mcp and /mcp/agent instructions say that a missing card is the coordinator's, that findings and questions for the owner go into report_add(findings=..., questions=...) instead of new cards or backlog items, and that the tracker mark is the coordinator's. In that mode task_create and backlog_add from an agent (a session bound to an open card that is not a coordinator) are refused, an agent's move to done is not held to the tracker mark (the answer says Tracker mark: the coordinator's …), task_archive refuses a done card that still needs the mark, the day time log's writes (timelog_mark, timelog_fix, worklog_add) from an agent are refused, and waiting_on is saved as a fixed role (the first of owner_names, coordinator, session, ci, customer:<name>) with a note when it changed (SPEC).

Conventions:

  • Task reference — the key (acme-shop-12) or the numeric id.
  • Stages — plan, dev, review, test, live, done. Any transition is allowed; the event log keeps the history. review is where the owner accepts the work step by step (see Review below).
  • session — optional on writes: who is calling. Pass the Claude desktop app session id (local_<uuid>) if the session knows it, together with session_title (its display name); otherwise a human-readable name. relaybay creates the session on first use and records it as the actor of the event. It is for display only; the token is the only authorization.
  • hook_session — optional on every write tool: your own Claude Code session id as relaybay's hooks report it, never another session's. An id another live session linked first is not moved (the response ends with Warning: hook_session … belongs to another session (…); not relinked.), and task_bind_session never links one (a coordinator binds other sessions; pass the id on your own writes). With hooks set up (relaybay setup), the session start adds "Your relaybay hook session: . Pass it as hook_session in relaybay writes." to the agent's context. Passed together with session, it links that hook id to the calling session exactly, so the board's live status (working / waiting / idle / ended) follows the right card. A row the hooks had created for the id by guess hands over its status and is removed. Without an exact link relaybay guesses from the working directory (see Session status from hooks). A session started in the Claude desktop app is linked from its first hook without hook_session. A bare Claude Code id passed as session (one the hooks reported) resolves to the session its hooks belong to, with a note to pass it as hook_session instead.
  • Session aliases — if you don't know your local_ id, don't rebind a task: the coordinator binds you; pass your session name only as session on writes. When task_bind_session gets a plain name for a task bound to a desktop session, the desktop binding (and its "Open in desktop" link) is kept and the name is recorded as that session's alias (event session.alias_added). From then on the name resolves to the desktop session: writes are recorded as it, task_list and task_unbind_session accept the name. Binding by another local_ id still rebinds; a plain name on a task without a desktop session binds as before. Aliases are global: one name maps to one session across all projects, and later binds by that name move it to the desktop session bound to that task. Because an alias would hijack a plain session of the same name, none is created when such a session exists; the call then changes nothing and answers "already bound to (local_…); pass your local id".
  • Binding at start — a session started with the desktop app's start tool is bound to the card the start prompt names: when the tool's input holds exactly one key of an open card (<project>-<number>, a project on the board), the new session is bound to it (bound_by launch) and the starter's binding on that card ends (handed_over). Only a card bound to nobody, to the starter or to the started session is bound. No key, several open cards, a card any other session holds (live, ended or without hooks), or a started session the board knew before the launch: nothing is bound, and the session.launched event says why. To create a card for another session without binding yourself, pass task_create(bind=false).
  • Claude desktop app session links — for a desktop session id, relaybay builds a link (claude://claude.ai/epitaxy/<id> by default, see desktop_link_template in the README) that the board shows as "Open in desktop" and that task_get prints. Plain names have no link.
  • Clearing a field — in task_update, an omitted field stays unchanged; "-" or an empty string clears it (models cannot always send an empty string, so "-" is the reliable form). In task_create, "-" leaves a field empty; in report_add, progress="-" clears the summary.
  • Description and progress — two markdown fields per task. description says what to do and why (1–5 sentences). progress is a running summary of everything done so far, not the last step: the session rewrites it as it goes, ideally with every report (report_add(progress=…)). The board shows both in full in the task dialog (not on the card).
  • Next step and waiting on — keep them current: task_update and report_add take optional next_step (what happens next) and waiting_on (only who acts next: a name or role, no text after it; the card cuts it at the first colon, and a value of more than 4 words gets the answer line Hint: waiting_on is who acts next; put what happens into next_step., never a refusal and the value is saved as given), saved in the same transaction as the stage change or the report; omitted, they stay; "-" or "" clears them. A next step written before the task's last stage change is stale: the card and the task dialog show it muted with a "stale" marker, task_get and project_snapshot append (stale). Writing it again, even with the same text, confirms it as current (a task.updated with a version bump). On the board, saving the edit form confirms it only when the next-step text itself was changed.
  • External tracker — tracker_ref (issue key, e.g. ENG-12, up to 100 characters), tracker_name (any tracker, free text), tracker_url (optional, http:// or https:// only, no control or invisible characters; anything else is refused) and tracker_logged (bool: the work log is entered there). The card shows " " as a badge whenever a key is set, a link with a URL, with ✓ when logged. With the server setting require_tracker_log = true, a done task that is not logged shows "not logged" (also in task_get / snapshots) and is never archived.
  • Tracker history — every issue key a task has had is kept: setting a different tracker_ref appends an entry (earlier ones stay, clearing the key keeps them too), and marking tracker_logged stamps "logged " / "unlogged " on the current entry (logging again restarts its mark). task_get lists the entries newest first; snapshots and the card show only the current issue.
  • Automatic unlog — a logged task that gets new work loses the mark in the same transaction, with an event task.tracker_unlogged (payload reason): report_add or a changed progress on a card before live, or a move back out of live or done to an earlier stage (a report or summary on a card in live or done closes it and keeps the mark). Metadata edits (title, branch, waiting on, next step, other tracker fields) keep it; passing tracker_logged in the same write wins. A new tracker_ref starts as not logged unless tracker_logged is passed in the same write (a plain task.updated; the previous issue's entry keeps its "logged" date). Mark it again once the log covers the new work.
  • Done window — the board's done column shows tasks closed in the last done_window_days (default 7); older ones are archived on the board only (with require_tracker_log, not-logged done tasks stay). The owner (on the board) and coordinators (task_archive, task_unarchive) archive a done task by hand, or bring one back for another window. A task in live is closed and archived in one step and comes back to live with its work-log mark; one with an open question, an open approval request or an approved, unused approval is refused (nothing is closed for good). A task in the archive longer than archive_purge_days (default 30, 0 never) is deleted by the server at its start and once a day, after an export to deleted/ (event task.purged); see SPEC. project_snapshot and task_list are unaffected: include_done returns all done tasks.

Reading

Tool Arguments Returns
project_list — Table of projects with task counts per stage.
project_snapshot project, include_done? The project's areas with how many tasks carry each, then open tasks grouped by stage (area, waiting on, next step, branch, session name and desktop id, version, the start of the description and progress, last report) and recent decisions.
task_list project?, stage?, waiting_on?, session? (id or name), include_done?, area? (a name, case ignored) One line per task, with its area. Done tasks are left out unless stage or include_done is given.
task_get task, reports? (default 5) Ends with "Editable fields: …". All fields (a stale next step ends with (stale)), description and progress in full, current version, the bound session (name and desktop id, link), the tracker issue and work-log mark, session binding history, tracker history, latest reports with their bodies, decisions; ## Linked document sections lists the sections linked with task_doc_link as pointer lines (broken when gone); ## Code lists the linked repositories (kind, path, branch, pull requests, how linked), or all of the project's when none is, and pull requests tied to none.
events_since since_id? (default 0), project?, limit? (default 50, max 500) Events oldest first and the since_id for the next call.
comments_list task, unread_only? The task's comments oldest first: owner comments with sent / delivered … to <session> / read marks, agents' replies (unread by the owner until the owner marks them read).
policy_get project?, environment? The effective policy (see Policy below) of the global scope, a project or one of its environments: the layer chain, then one line per value with the layer that set it, e.g. - levels.live.default = "read" (preset:default), and any ignored broken layer.
audit_list project?, environment?, session? (name, desktop id or hook session id), decision? (allow, log, warn, ask, deny), days? (default 7, max 366), limit? (default 50, max 500) Tool calls of agents that touched a live stand, newest first, one line each: id, time, session, project/stand, tool, the redacted command, decision, level, rule, task. Read-only; only live stands are journaled.
question_list task?, status? (open, the default, answered, defaulted, withdrawn or all) Questions to the owner, newest first, of all cards or one: - #3 acme-shop-1 (look, asked by <session> …): open, then the text, the options and default, the look URL and test account, and the answer verbatim. Changes nothing but closes questions past their deadline with their default.
approval_list task?, status? (open, the default, approved, refused, used, expired or all) Approval requests and the owner's decisions, newest first, of all cards or one: - #4 acme-shop-1: push of feat/x in backend (requested by <session> via guard …): open, waits for the owner, then the summary, the rollback and the owner's line verbatim; a used one names the call that used it. Read-only: no tool decides.
plan_get task The plan (see Plan below): status (accepted by … <time> or draft), 2/4 done, 1 deviation(s), each step as 1. [done] Title — done <time> · as planned · outcome · report:12 with its "what and why", then your Claude Code todo as a separate list. Without steps: how to write one, and the todo if any.
review_get task The checklist (1. [accepted] Sign in — accepted by owner …) with each step's what / how / why, its screenshots (screenshot #7 (image/png, 41 KB): caption), the owner's pins on them (pin #1 (x 0.42, y 0.18, annotation 12) 'Text', with their replies) and other markup, the owner's comments on the step, then screenshots of no step. Flattened images with the owner's markup follow the text as image content, at most 7 MB in one answer; a line names attachment_get for the rest, and an image over 3.5 MB or 7990 px on a side has a text note in its place.
attachment_get id, annotated? (default false) One screenshot as image content, with a text line and its pins: the original, or with annotated=true the flattened PNG with the owner's markup (a tool error while there is none). A file over 3.5 MB, or a PNG over 7990 px on a side, is refused with a message that says so.
rules_get project? The working rules as markdown: hash, scope, mode, report format, stage requirements, description template, guidance. Without project, the global rules; with it, the project's merged rules.

Writing

Tool Arguments Effect
question_ask task, text, default (required), options? (up to 8), blocking? (default false), default_after? (a time with its zone or 30m / 2h / 1d; default 1h; non-blocking only), kind? (question or look), url?, account? (look only), session (required), session_title?, hook_session? A question for the owner on the card, in the Inbox and on the card (question.asked; a blocking one is a tray notification). Refused without a default, with 5 open on the card, on a done card, or when the text or a field looks like a password or token. The answer goes back to the session that asked. look: always blocking, url (http or https, no user or password) and the test account's name (never user:password), answered fine or with remarks. Returns Question #N asked on <key> (<kind>). and what to do: a blocking question ends your turn (the answer comes as an owner comment through your hooks); a non-blocking one goes on with the default, which it closes with at its deadline. No tool answers: only the owner, on the board. See Questions to the owner below.
question_withdraw question, session?, session_title?, hook_session? Withdraws an open question; only the session that asked or a coordinator. Returns Question #N on <key> withdrawn.
approval_request task, action (push, merge, commit, deploy, sql), target (the branch, repo:branch, +branch for a force push, :branch to delete it; the PR 12, #12, its URL; an environment's name), summary (required: commits, files, CI state), rollback? (required for deploy), session (required), session_title?, hook_session? Asks the owner to approve one action, in the Inbox, on the card and in the tray (approval.requested). An open request for the same action and target is updated instead. Refused on a done card, with 10 open on the card, or when a field looks like a password or token. Returns Approval #N requested on <key>: push of feat/x. and to end your turn. The guard denies a call that needs an approval until the owner approves it on the board; one approval allows exactly one matching call. No tool decides. See Approvals below.
approval_withdraw approval, reason (required, one line), session, session_title?, hook_session? Takes back an approval request that is no longer needed (the owner did it by hand): an open one, or an approved one not used yet; only the session that asked or a coordinator. It expires with withdrawn by <caller>: <reason>, leaves the Inbox and no longer holds a live card's archive. Returns Approval #N on <key> withdrawn: merge of PR 12 (withdrawn by …).
project_upsert slug, name?, repo_path?, description?, archived?, repos?, session?, session_title?, hook_session? Creates the project, or updates the given fields. archived=true sends it to the archive (it leaves project_list, the board's sidebar and All boards, the Inbox and the digests; its board and cards are kept), false brings it back (event project.updated with changes.archived); archived is for coordinator sessions only (anyone else: project_upsert(archived) is only for the coordinator sessions …), the other fields are open to every session. Slugs: lowercase letters, digits, dashes. repos is the whole list of the project's repositories in order, [{"name": "web", "path": "/code/acme/web", "kind": "web"}] (kind app, web, api, lib, other or none; without a name the path's last folder); matched by name, so tasks keep their links to a repository that stays; [] removes them all. repo_path is the first repository's path: alone it sets that path (or adds the repository).
project_delete slug, confirm, session?, session_title?, hook_session? Coordinators only (anyone else: project_delete is only for the coordinator sessions …). Deletes an archived project for good: its tasks with their reports, comments, plans and attachments, its documents (the rows only; a file document's file stays on disk), backlog, decisions, notes and areas, and its events. confirm must be the slug again (otherwise Deleting <slug> cannot be undone: confirm with the project's slug, <slug>. Nothing changed.); a project not in the archive is refused (<slug> is not in the archive: …). An export of everything deleted is written first to deleted/ in the server's data folder; event project.deleted (no project id) names it. Returns Deleted the project **<slug>** …; the export is deleted/<file> in the server's data folder.
task_create project, title, stage? (default plan), waiting_on?, next_step?, branch?, doc_path?, description?, progress?, tracker_ref?, tracker_name?, tracker_url?, tracker_logged? (default false), size? (S, M, L, validated as in task_update), area?, session?, session_title?, hook_session?, bind? (default true), inspect_only?, sections? Creates a task with the next key of the project (acme-shop-1, acme-shop-2, …). sections: a list of doc#anchor of the project's documents linked to the card as task_doc_link links one, all checked before the card is created. area names what part of the project it belongs to (matched without regard to case); a new name is added to the project's areas (at most 24, 32 characters a name) and the answer says so and lists them. With session, the task is bound to it, unless bind=false: a card made for someone else stays unbound (the caller is still the event's actor).
task_update task, title?, waiting_on?, next_step?, branch?, doc_path?, stage?, stage_note?, deploy_notes?, deploy_done?, cancelled?, fields? (JSON object), description?, progress?, tracker_ref?, tracker_name?, tracker_url?, tracker_logged?, size? (S, M, L), area? (as in task_create; "-" clears it), repos?, prs?, blocked_by?, expected_version?, session?, session_title?, hook_session? Patches fields; "-" or "" clears a text field. With expected_version, fails instead of overwriting when the task changed meanwhile. repos: names of the project's repositories the task touches, added to its links (-name removes one; an unknown name fails with the project's names). prs: pull request links added to the task, each optionally after a repository name (web https://host/acme/web/pull/12; -<url> removes one); a link whose path names a project repository is tied to it and links it. A session bound to the task links the repository it works in by itself. blocked_by: keys of cards (any project) this task waits for (-key removes one); an unknown key, the task itself and a cycle are refused; a blocker blocks while in plan, dev, review or test (see Blockers). stage moves the task with the stage rules, hints and Warning (rules) lines (stage_note is shown next to the stage; next_step and waiting_on are saved in the same transaction, one version bump). Moving to done sets the closed time; for a card that is not cancelled the answer adds a Hint: line while its change document spec-<key> still exists (merge it into the spec, then doc_update(delete=true)) and while its deploy_notes are not marked deploy_done; the answer starts with Moved when the stage changed, else Updated. deploy_notes, deploy_done and cancelled are the deploy notes and cancelled fields. fields: any other task field from relaybay://schema/task (for example description_add, session_surface, priority; unknown names fail with the list of allowed ones); a field given both as a parameter and in fields must agree, else the call fails.
task_doc_link task, doc, section, remove? (default false), session?, session_title?, hook_session? Links a section of a document of the task's project to the card (section: a heading anchor or an explicit anchor, as doc_outline lists them), checked against the document's current outline (a file document is read first); an unknown anchor fails with the known ones. remove=true unlinks it. Returns Linked to **<key>**: (or Already linked to, Unlinked from, Was not linked to) and the section's pointer line. task_context lists linked sections first and takes the card's subject from them (its open backlog items, the related project decisions); a section that disappears later shows as broken. Event task.updated with changes.sections.
task_archive task, session?, session_title?, hook_session? Coordinators only (anyone else: task_archive is only for the coordinator sessions …). Sends a task in done or live to the archive now (task.archived): it leaves the board's columns and stays under "Show archived" and in search; task_get shows - archived: <time> by <who>. A live task is closed first, in the same step and without the rules (task.stage_changed live → done, then task.archived with from: live). A task in another stage is refused (Only a done or live task goes to the archive; …); any later stage change clears the mark. Nothing is deleted. Returns <key> “<task title>” is in the archive since ….
task_unarchive task, session?, session_title?, hook_session? Coordinators only. Brings a task back from the archive, by hand or by age (task.unarchived): a done one shows in the done column again and the done window starts again from now; one archived from live goes back to live (with its task.stage_changed). Not archived: changes nothing. Returns <key> “<task title>” is in the <stage> column, not in the archive.
task_bind_session task, session, session_title?, hook_session? (never linked here, a note says so), caller? (you, when session is someone else) Shows the session in the task dialog as the one working on the task (a desktop session also gets an "open in desktop" icon on the card). The previous binding is closed and kept in the task's history (event task.session_bound). A plain name on a task bound to a desktop session keeps that binding and becomes its alias (see Session aliases).
task_unbind_session task, session?, caller?, hook_session? Removes the bound session from the task; the binding is closed and kept in the history (event task.session_unbound). With session (desktop id or name), fails without changes if another session is bound. Nothing bound: says so, changes nothing.
report_add task, body, progress?, next_step?, waiting_on?, stage?, findings?, questions?, session?, session_title?, hook_session? Appends a markdown report. Its first line is the report summary; a first line state · size · gist also sets the state (inspected, changed, verified, committed, pushed, blocked) and size (S, M, L); that size also becomes the task's size when it has none. A first line that does not fit the rules' report_format adds a Warning (rules) line (strict mode refuses the report). Claim lines may carry verified: <where> (verified: pytest on Windows); the marks are stored with the report, and an M or L report without any adds Warning (rules): an M or L report has no verified marks … (a warning in strict mode too; never for S). progress replaces the task's progress summary in the same transaction (task.updated + report.added); omitted, the summary stays; "-" clears it. next_step and waiting_on work the same way and go into the same task.updated. stage moves the task after the report in the same transaction, so a rule asking for a report since the last stage change is met: the answer adds Moved to <stage>. and the move's rule warnings (in strict mode a refused move refuses the report too). Without stage the answer ends with what the usual next move needs: Next: task_update(stage="test") needs a report since the last stage change (done). findings (up to 10 of {title, body?, location?, kind?, area?}) and questions (up to 10 of {text, default}, default being what happens if nobody answers) are stored with the report, numbered from 1, for the coordinator to triage; none becomes a backlog item by itself. A wrong shape fails naming the item (findings[2].title is required) and a secret value is refused; nothing is written then.
decision_add project, text, task?, decided_by?, source?, supersedes?, area?, session?, session_title?, hook_session? Records a decision of the project (scope task with task); it appears in the project snapshot and decision_list. source: report:12, comment:7, event:301 or message:<id>, optionally followed by display text, or display text alone; a named report, comment or event must exist in the project. supersedes: the id of a current decision of the same project this one replaces (see Memory and documents). area: the area of the project it is about, by name; task_context lists a project decision only on the cards it is related to (their area, a linked section it names, or two words of the card's subject).
comment_ack comment_id? or task?, session?, session_title?, hook_session? Marks owner comments read: one by id, or every unread one of the task (event comment.read each). The board shows them as read and the Stop hook stops reminding. Neither argument, or an id that is not an owner comment: a tool error.
comment_add task, body (markdown, up to 4000 characters), in_reply_to?, session?, session_title?, hook_session? An agent's reply on the task's thread (author: the calling session; comment.added). It marks the owner comment it answers read, or without in_reply_to every unread owner comment of the task. The owner sees unread replies in the Inbox.
policy_propose scope (global, <project> or <project>/<environment>), patch (object), reason, session?, session_title?, hook_session? Records a policy proposal and changes nothing (policy.proposed); it shows in the owner's Inbox and in Settings → Policy. The patch is merged into the layer's JSON (objects key by key, other values replace, null removes a key) and the result must validate against the policy schema; a tool error names the path otherwise. Accepting applies it (policy.updated, policy.proposal_accepted), with a confirmation when it widens agents' access on live.

| review_steps_set | task, steps ([{"title", "details?"}], up to 50), session?, session_title?, hook_session? | Replaces the checklist (see Review). Step N keeps its status and screenshots while its title and details stay the same; a changed step is open again; steps past the new end are removed (their screenshots stay on the task). | | review_step_update | task, step (number), title?, details?, status? (only open), remark?, session?, session_title?, hook_session? | Changes one step's text (which reopens it) or reopens it after a fix; remark adds a comment under the step and leaves its status. Accepting and rejecting is the owner's, on the board. | | attach_file | task, path? or content_base64?, filename?, step? (number), caption? (markdown), session?, session_title?, hook_session? | Copies a PNG, JPEG, WebP or GIF (checked by content; SVG and others refused) to the task, optionally to a step. path is absolute and inside the project's repo_path, the temp folder or attachment_roots. Limits attachments_max_mb per file and attachments_task_max_mb per task. The same image on the same task is stored once (the answer says so). How to produce the file: Screenshots for review. | | attachment_caption | attachment_id, caption ("-" clears), session?, session_title?, hook_session? | Changes a screenshot's caption. | | annotation_reply | annotation (the pin's id from the owner's comment or review_get), body (up to 2000 characters), session?, session_title?, hook_session? | Answers a pin the owner put on a screenshot (annotation.replied). The owner reads it in the pin's thread and as an agent reply on the task's thread; the owner's unread comments on that screenshot are marked read. A removed pin or another kind of annotation: a tool error. Secret values are refused. See Annotations. | | plan_set | task, steps ([{"title", "details?"}], up to 30), reason?, session?, session_title?, hook_session? | Replaces the plan (see Plan). Step N keeps its status and checkpoint while its title stays the same; a renamed step is pending again; steps past the new end are removed; [] removes the plan. A new plan is a draft; changing the titles or their order makes an accepted plan a draft again (the answer says so). Every write is kept in the plan's history with reason. | | plan_step_update | task, step (number), status (pending, in_progress, done, blocked), outcome? (one line), link? (done only: a report of the task such as 12, or a PR URL), conformance? (required with done: as planned or deviation: <why>), session?, session_title?, hook_session? | Moves one step. Done is a checkpoint with its time; leaving done clears it. Never turns an accepted plan back into a draft. A done step back to in_progress on a task in review or test moves the task to dev (rework: <step title>); the last step done in dev with a review checklist adds a hint to move to review. | | plan_step_add | task, title, reason (required, one line), details?, session?, session_title?, hook_session? | Appends a pending step (see Plan). An accepted plan stays accepted; the step is marked "added after acceptance" with who and why. A task in review or test moves back to dev with the stage note rework: <reason> (the answer says so). | | plan_accept | task, session?, session_title?, hook_session? | The coordinator accepts the plan (the owner uses the board). Already accepted: says so, changes nothing. A task without plan steps, or a call from the session bound to the task (an agent does not accept its own plan): a tool error. |

Writes that change a task increment its version. Every change appends an event and updates open boards immediately.

A stage move (task_update with a stage or a stage in fields, report_add(stage=...), the board form) is checked against the project's rules. In warn mode the write succeeds and the response gets one line per unmet requirement, e.g. Warning (rules): moving to test usually needs a report since the last stage change.; the task.stage_changed event carries the same lines as warnings. In strict mode the write fails with Rules: moving to test requires … Nothing changed.

Review

The owner accepts a task step by step in the task dialog's Review tab. What to check by eye (the Owner check) belongs in the checklist, not only in the report:

review_steps_set(task="acme-shop-12", steps=[
  {"title": "Sign in with 2FA", "details": "**What:** the code screen. **How:** sign in with the
   demo account. **Why:** the new step must not skip the code."},
  {"title": "Cart badge", "details": "Add two products; the badge shows 2."}])
attach_file(task="acme-shop-12", path="/tmp/acme-shop-2fa.png", step=1, caption="Code screen")
task_update(task="acme-shop-12", stage="review", waiting_on="owner")

Moving a task to review or test with an empty checklist adds a Hint: line to the answer. Each decision on the board reaches the bound session as an owner comment (like any other, see Owner comments through hooks), linked to its step: Step 1 'Sign in with 2FA' accepted — continue with step 2, Step 2 'Cart badge' rejected: the badge shows 1, or a plain comment On step 2 'Cart badge': …. Acknowledge it with comment_ack; after a fix, reopen the step with review_step_update(status="open") or change its text. The card shows "Review 1/2"; tasks in review or test with a checklist are listed in the owner's Inbox, marked "to accept".

Plan

Every task should be worked by a plan the owner can see. Write it before you start coding, from PLAN.md or as your own 2-5 steps, and keep it current:

plan_set(task="acme-shop-12", steps=[
  {"title": "Address table and model", "details": "Store addresses per account."},
  {"title": "Address book page", "details": "Shoppers add, edit and remove addresses."},
  {"title": "Picker at checkout", "details": "Pick a saved address instead of typing it."}],
  reason="from PLAN.md")
plan_step_update(task="acme-shop-12", step=1, status="in_progress")
plan_step_update(task="acme-shop-12", step=1, status="done", outcome="Migration and model",
  link="12", conformance="as planned")
plan_step_update(task="acme-shop-12", step=2, status="done",
  conformance="deviation: editing waits for the shared form component")

The plan is a draft until the owner accepts it in the task's Plan tab or the coordinator calls plan_accept. Renaming or reordering steps of an accepted plan makes it a draft again; marking steps does not. The card shows Plan 1/3 · now: Address book page, deviations highlighted.

The plan stays alive. When the work changes or grows after a report (the owner's decision in review, a rework), add a step instead of rewriting the plan:

plan_step_add(task="acme-shop-12", title="Undo button", reason="owner's decision after review")

The plan stays accepted and the step is marked "added after acceptance"; a task in review or test goes back to dev with the note rework: <reason> (reopening a done step does the same). Update progress and next_step too. With every step done, a changed report (any open stage) or a verified one in dev, or a new progress in dev, once a report came after the plan closed, adds Warning (rules): the plan is closed (N/N done) while work goes on: add a step with plan_step_add or reopen one.. plan_step_add on a done task is refused; on live it does not move the task. A plan left a draft in dev for plan_draft_hint_hours (default 1) is named in the digests and task_context of a coordinator session: Hint: acme-shop-12's plan is a draft for 3 h: accept it (plan_accept) or ask for changes.

Work by plan (rule). By default a move to dev needs an accepted plan unless the task's size is S ({kind = "plan_accepted", unless_size = ["S"]}); a task without a size needs one. In warn mode the move gets a Warning (rules) line, in strict mode it is refused. Moving a task with no plan and no todo to dev also adds Hint: … write down what you are going to do (todo or 2-3 steps with plan_set).

Your todo is the second layer. Claude Code's own todo list (TaskCreate / TaskUpdate, or TodoWrite in older builds) is read from the PostToolUse hook of your session and shown under the current plan step ("Now doing: …"), never merged into the plan. An S task without plan steps shows the todo as "Agent's plan, not accepted". The todo tools are off by default (Claude Code 2.1.309); turn them on in Claude Code's settings (relaybay setup does not write this):

{ "env": { "CLAUDE_CODE_ENABLE_TODO_TOOLS": "1" } }

Reminders. When you linked your hook session (hook_session), the hooks remind you of the current step ("Plan of acme-shop-12 (accepted): step 2/3 'Address book page' — … Now doing: …") on session start, after a todo change (only when the text changed) and every plan_reminder_every tool calls (default 30).

Session status from hooks

Not an MCP tool: Claude Code's hooks call POST /hooks/claude-code (same Bearer token as /mcp) with the hook's input JSON. relaybay setup writes the hook entries (see connect-claude-code.md).

Hook event Session status Activity shown
SessionStart working started (<source>); the answer adds the agent's hook_session id to its context, plus "You have N unread owner comment(s)…" when there are some
UserPromptSubmit working prompt (the prompt text is not stored)
PreToolUse, PostToolUse working the tool name (the tool input is not stored; only the recipient of SendMessage is kept, shown in Activity)
Notification waiting the notification message
Stop idle turn finished
SessionEnd ended the session is unbound from its tasks (history kept, task.session_unbound with reason: "session_end"), except after /clear or /resume and for desktop sessions

Other events are ignored (204); an event with nothing to say also gets an empty 204. Activity of a working session is written at most once per 5 s per session (the latest one wins); status changes are written at once. Each status change is one session.status_changed event per project of the session's bound tasks, with their keys; a change of the activity alone is stored as one at most once per 60 s (the latest one when the 60 s end). In events_since it reads <session>: working → idle · acme-shop-1, acme-shop-2, acme-shop-3 +2.

A hook session is matched to a relaybay session in this order: on SessionStart, the desktop session named by CLAUDE_CODE_HOST_SESSION_ID (set by the Claude desktop app; after /clear or a restart the new Claude Code id moves to it by itself; a claude -p started from the window's tools runs unattended and never takes the window's link, nor an id another live session's agent linked); the exact link from a write with hook_session; otherwise, on first sight, the one desktop session bound to a task in the project (not ended) whose repo_path contains the hook's cwd. When more than one could match (or the folder belongs to several projects, or the bound desktop sessions are linked to other live hook sessions), nothing is guessed: the hook session stays unlinked and is listed on the board under Integrations until the agent passes its hook_session. With no desktop session in the project (or no project), it becomes a plain session named after the folder.

Context at the session start

The SessionStart answer also carries, after the hook session line, task_context of the task an exactly linked session was bound to last (other bound open tasks as one line each; a separate plan reminder only if the budget cut its lines), or for any other session whose folder maps to one project a short project_digest (session_context_project_chars, default 1500, no comment text). It moves the read position of an exactly linked session only; a guessed one has none. After startup and clear the changes cover at least the last 24 hours, because the new context has read nothing; compact and resume show what is new since the read position. A nested claude that says it runs unattended gets only the hook session line and never links to the desktop session. A failure there only leaves the context out. session_context = "off" turns it off. Details: SPEC §8.

Owner comments through hooks

Comments the owner writes on a task (task dialog or task page) reach the agent of the session bound to the task, but only when the agent linked its hook session itself (hook_session on a write); a link guessed from the folder, an unlinked or ended session never gets comment text.

  • UserPromptSubmit, PreToolUse, PostToolUse: the answer is {"hookSpecificOutput": {"hookEventName": …, "additionalContext": …}} with the undelivered owner comments of the session's tasks, one line each — Owner comment on acme-shop-12 (#7): … — and how to answer (comment_add / comment_ack). They count as delivered (comment.delivered) and are not sent again. At most about 8,000 characters per answer (below Claude Code's 10,000 limit); the rest follow with the next events. When the owner accepted a task's plan on the board, the next of these answers says so once: Owner accepted the plan of acme-shop-12 (3 steps): go on with step 2. (the first step not done; …: all steps are done. when none is left). Not for plan_accept over MCP, nor for an acceptance more than 2 hours old.
  • Stop: while delivered owner comments are not acknowledged (or new ones arrived), the answer is {"decision": "block", "reason": …} with the comments, so the agent handles them before it ends the turn. At most twice per turn per session and twice per comment in all; never when stop_hook_active is set before relaybay blocked in this turn (another hook is already continuing the turn); the per-turn counter resets on the next UserPromptSubmit and whenever a Stop is allowed. Claude Code's own cap (8 continuations) still applies.
  • A rebind to another session hands the delivered-but-unread comments to the new session.
  • An idle session sees a comment with its next prompt. The coordinator sees comment.added in events_since and can forward it; with the opt-in wake-up hook (relaybay setup --wake, below) the comment wakes the idle session itself.

The command hook prints the server's answer only when it is a 200 with a JSON object and always exits 0; http hooks get the same JSON body. State-bearing events the server did not take wait in a spool and are sent first by a later run (SPEC §4); a replayed event gets no comments.

Wake-up hook (opt-in). relaybay setup --apply --wake adds a separate command hook to Stop with "asyncRewake": true and a 1800 s timeout: <python> -I -m relaybay.hook_client --url …/hooks/claude-code/wait --token-file <path> --wait, or relaybay-hook --url … --token-file <path> --wait (by its full path) from the installed program. Claude Code runs it in the background after every turn; it long-polls POST /hooks/claude-code/wait for up to 25 minutes. When an owner comment arrives for the idle, exactly linked session, the server marks it delivered and answers {"wake": text}; the hook prints the text to stderr and exits 2, which wakes the session with the text as a system reminder. In every other case (nothing arrived, relaybay down, the session started working, a newer wait for the same session) it exits 0 silently. Checked live with Claude Code 2.1.309; --no-wake removes only this hook, a plain --apply keeps it.

Fallback risk: a Claude Code build that ignored asyncRewake would run this hook in the foreground and hold the end of every turn for up to 30 minutes, so --wake on a Claude Code older than 2.1.309 (or of unknown version) is refused unless --force-wake is given too. If turns end only after a long wait, run relaybay setup --apply --no-wake.

Questions to the owner

The owner answers on the board only (POST /questions/{id}/answer, cookie and CSRF), with an option, a text or both. The agent gets the answer verbatim in one text: Owner's answer to question N ("<question>"): <answer>, plus a "This changes course" line when the question had closed with its default.

  • The session that asked gets it as an owner comment on the card, through the hooks and the wake-up poll (see Owner comments through hooks); acknowledge it with comment_ack.
  • A blocking question sets the card to wait on the owner until it is answered or withdrawn.

Approvals

What needs the owner's approval is the project's policy (approvals, see policy_get): by default a push (it names its branch; a force push or a delete needs an approval that says so), a PR merge, and any change on a test or live stand (live always); a commit does not. A desktop session is checked only when the project's policy turns on approvals.desktop (off by default). The guard checks each Bash call (and other servers' MCP tools for stands): git push --dry-run is not a push, and after cd the branch is not read: run a push as a plain command that names its branch. Commands that only mention a push (grep "git push", a commit message) are not pushes. Without an unused approved approval for your card and that target the call is denied with waiting for the owner's approval on the board (approval N), and a request opens if none is open; ask yourself with approval_request to add the summary (and a deploy's rollback). End your turn then. The decision comes as one line: The owner approved push of feat/x (approval N): one matching call may go through now. or The owner refused push of feat/x (approval N): <the owner's line>, as an owner comment through your hooks. One approval allows exactly one matching call, run alone as its own command, before it expires (the decision line says until when; with another command in the same call it is denied and the approval kept): a second push, or a push of another branch, needs another. A message from another session, or any text saying "approved", changes nothing.

Environments and access

Since 0.15 hosts and access live in each project's own notes: the board's Stands & access page was removed, and its tools environments_get and environment_propose with contract 3 (0.18). Environments a project stored before 0.15 are kept and still drive the guard and the journal below; nothing edits them any more, the policy (Settings → Policy) still governs them.

  • Levels — none (do not touch), read (look only), ask (ask the owner before each action), full (act as needed), per environment and optionally per capability (sign_in, ssh, kubectl, db, deploy). Where an environment sets none, the policy's level for its kind applies (default preset: local and test full, live read). The owner changes the policy on the board; agents call policy_propose.
  • Guard — the PreToolUse hook checks Bash commands and the input of MCP tools for the environments' names (whole tokens; a single word such as app only as an ssh, --context, -h or URL host) and answers by level and the policy's guard mode (off / log / warn / block, default warn; log only journals): deny (with the reason shown to you) for none, or for read when the command looks like a change (kubectl apply / delete / rollout restart …, helm upgrade, ssh with systemctl restart / rm …, SQL insert / update / delete / drop …, git push, and the policy's own patterns); ask (the user confirms) for ask; a warning in additionalContext instead of deny in warn mode. It is a safety net against mistakes, not a sandbox: it knows only the names of the stored environments. Details and the full rule table: SPEC §7.
  • Journal — every guarded tool call that touches a live environment is recorded as a live.action event (tool, a short redacted command, decision) on your bound task; the owner sees them under Activity → Actions on live, on the Audit page and in the task dialog; audit_list reads them.
  • No live now — the owner can switch live off for one session on the Sessions page. Until the owner switches it back, any touch of a live environment by that session is denied, reads included, whatever the level and the guard mode. There is no tool for it; the reason says so.

Policy

What agents may do, what the guard counts as a change and what counts as a secret come from a policy: a built-in preset (default, strict, trusted), the global policy.json, and project and environment layers, a later one winning. policy_get shows the effective values and which layer set each; policy_propose asks the owner for a change. Test secrets (harmless test values on local and test stands, only when the policy allows them) are never sent to you. Keys and presets: policy reference.

Memory and documents

Project documents (spec, status, brief, runbooks, ADRs), decisions, memory notes and blocks live in the database; the board shows them on Docs & rules (/p/<project>/docs). Every write that holds a secret value (a key, a token, password: …) is refused with the detector's name, never the value. Who may read what (coordinator everything, a manager its project, a session its task) is not enforced yet: every client with the token sees everything.

Tool Arguments Returns or does
doc_list project The project's documents: name, title, kind, version, last change, resource URI, lives in the repository: <url> for a linked one and lives in the file <path> (and file missing since …) for a file document.
doc_get project, doc, section?, version?, lines?, max_chars? The markdown (or one section: its heading and everything up to the next heading of the same or a higher level; or lines a-b), after a header line with the current version to pass as base_version, and the section anchors. Anchors come from # headings: ## Gift cards → gift-cards, a repeat → gift-cards-2; an explicit <a id="name"></a> above a heading is an alias. A document that lives in a repository has a second line lives in the repository: <url>; a file document names its file and content hash instead of a version. max_chars is 2000 to 1000000; over it (default: none, but 40000 for a document over 200000 characters) the answer is the first lines, the top two levels of headings inside the range as far as they fit (the rest as … N more heading(s): doc_outline(…)) and Read on: doc_get(..., lines="x-y"), never longer than the cap. A missing file gives the pointer only. A section an open card changes (its change document spec-<key> names it, or the card links it and has one) has a line <!-- changing on <stage>: <key> · relaybay://doc/<project>/spec-<key> --> per card right under the header (current version only). A whole read of the current version (no section, lines or version, not capped) ends with Warning: links without a target: <link>, … (N) when relaybay://doc links or in-document [text](#anchor) links lead nowhere (see doc_update).
doc_outline project, doc, depth?, under? One line per heading: level, anchor (and alias), title, lines a-b, characters and tokens (bytes / 3.5); under an anchor lists the headings inside that section, depth at most that many levels below it. A file document also names its file, hash and masked lines. A heading an open card changes ends with · changing: <key>, … (see doc_get).
doc_search project, query, doc?, limit? (default 10, at most 50) Hits per section of the project's documents (or one): document and anchor, heading path, the best line with the non-blank lines next to it, the section's lines and size, and the file of a file document. Every word (or its stem) must be in the section's own text or its heading path.
doc_update project, doc, body, reason, base_version, section?, title?, kind?, source_url?, force?, source_path?, lines?, expected?, file_writes?, delete?, from_path?, session?, session_title?, hook_session? Writes a new version (document.updated). base_version 0 creates the document (title: title, else its first # heading, else the name; kind default doc; the well-known kinds are spec, status, task, brief, runbook, adr, retro, any other is free text). source_url (http or https) marks a document that lives in a repository, "-" removes it; a linked document is refused without force=true (the error names the link), and its body may be "-" for no text of its own (on an existing document "-" also needs force=true: it drops the text). The link may hold no control or invisible characters. A task's document is task-<ref>: create it here, then point the task at it with task_update(doc_path="relaybay://doc/<project>/task-<ref>"). With section, body replaces that section: starting with a heading it replaces the heading too, otherwise only the text under it. Only the section's lines change (its closing blank lines stay), so a section replaced by its own text changes nothing. With lines (a-b) and expected (their current text), only those lines are replaced (body "-" removes them) while they still read as expected (trailing blank lines do not count and are kept), else a conflict with their current text; a stale base_version alone is no conflict there. A base_version that is not the current version saves nothing and fails with the current version number and the current text (or section) to merge. The same text again writes no version. A database document holds at most 200000 characters. source_path (an absolute path, with base_version 0 and body "-") adds a file document at version 1: relaybay reads and indexes the file on demand (credential folders, key and .env files and relaybay's data folder are refused, see the SPEC). file_writes (on or off, coordinator sessions only) turns writes through relaybay into the file on or off, at the add or later (with body "-" that is all the call does); they are off by default. With writes off, doc_update on a file document is refused with the file, the section's lines and "writes through relaybay are off". With writes on, section, lines + expected or the whole text are written into the file: only the replaced lines change, the line endings, byte order mark and final newlines stay, the file is replaced atomically and hashed again right before (changed in between: nothing written, a conflict); a change made to the file outside relaybay is a new version first, so a stale base_version is the conflict with the current text. A file document's version counts its file's hashes. delete=true deletes the document instead (event document.deleted): base_version must be the current version (else a conflict, nothing deleted), body is ignored (pass "-"), reason is required. Kinds spec and status only for coordinator sessions (a change document spec-<task key> also for the session bound to that task; anyone else: … is a spec document: only the owner on the board or a coordinator session …). An export of the document's rows (versions, sections, card section links) is written first to deleted/<time>-<project>-doc-<name>.json in the server's data folder; a file document's file stays on disk. Returns Deleted the document <project>/<doc> …; the export is deleted/<file> …. A write of a change document spec-<task key> (a card of the project) is checked against its format (## <doc>#<anchor> headings with ADDED:, MODIFIED: or REMOVED: blocks, targets that exist; see the SPEC) and answers its problems as one line Warning: change document spec-<key>: …; it is saved anyway. delete=true removes the document for good (after an export to deleted/): the tool keeps a non-destructive annotation, so a client that confirms by annotation does not ask first. from_path (an absolute path, with body "-") imports a local text or markdown file once as the whole body of a database document: a new one (base_version 0) or a whole write of an existing one at its current version; not with section, lines, source_path, source_url, file_writes or delete, nor into a file document. The path checks of source_path apply, the text is UTF-8, at most 200000 characters and secret-scanned like body; the document keeps no link to the file. The answer adds Imported from <path> (N characters). Every write of a document's text (a database document, a file document written through relaybay) ends with one line Warning: links without a target: <link>, … (N) listing relaybay://doc/<project>/<doc>[#<anchor>] links (any project) to a missing document or section and in-document [text](#anchor) links to a missing section (as <doc>#<anchor>); sections are looked up like the board does (GitHub-style anchors too), code is not checked, at most 10 are named (… and N more); nothing is refused.
doc_history project, doc, from_version?, to_version? The versions newest first (author, time, section, reason, size, base version); with both versions also their unified diff. For a file document: the changes relaybay saw in the file (when, which sections were added, removed or changed, the hash before and after).
decision_list project, task?, query?, include_superseded?, limit? (default 20) Decisions newest first (with query, best matches first), with the area, source and superseded by #n. Current ones only unless include_superseded.
memory_add scope (global / role / project), kind (user / feedback / project / reference), title, body, project?, role?, tags?, source?, review_at?, op?, target?, base_version?, force_new?, session?, session_title?, hook_session? Without op: looks for current notes of the same scope sharing a word with the title; if there are any, writes nothing and lists them (id, title, first line, title similarity). Call again with op = add, update (rewrites target; needs base_version = the candidate's v<n>, a newer version is a conflict), supersede (a new note replaces target, which stays in history) or noop. With no candidates it adds directly. A strong match is a candidate whose stemmed title words overlap the new title's by at least 0.6 (shared / all, stop words left out); op=add next to one needs force_new=true. memory.added / memory.updated.
memory_update id, base_version, title?, body?, tags?, review_at? ("-" clears tags and the date), session?, session_title?, hook_session? Changes a note (memory.updated); a stale base_version fails with the current note to merge. A superseded note cannot be changed.
memory_get id The note in full (scope, kind, version, author, time axes, source, tags, review date, read count); reading it counts (last_read_at, read_count).
memory_search query, scope?, project?, kinds?, limit? (default 10) Hits over notes, decisions, documents (current versions), reports, comments and backlog items: kind, id, project and task, title, and the line that holds most query words (line 14: …); a document hit also names the section that holds the line. kinds picks among note, decision, doc, report, comment, backlog (a backlog item's text, location, source and decision); scope narrows to notes of that scope. With project: its items plus global and role notes. Superseded notes and decisions are left out.
block_get label?, project? A block (label, version, characters used and limit, owner-only mark, text), or the list of blocks of the project or the global scope.
block_set label, body, base_version, project?, description?, char_limit?, session?, session_title?, hook_session? Writes a block (block.updated); base_version 0 creates it (limit 2000 characters unless char_limit). Over the limit it fails with the count; a stale base_version fails with the current text. Owner-only blocks are read-only here: the owner edits them on the board.

Search uses SQLite FTS5 when the SQLite build has it: words match by prefix and by their Snowball stem (English, or Russian for Cyrillic words), diacritics are ignored, a title hit ranks highest. User text is turned into quoted words, so ", (, AND, * never cause a syntax error. Without FTS5 the same search runs as LIKE substring matches of each word or its stem (case-insensitive for ASCII letters only).

Digests

Start here: each digest gives one level the right picture in a bounded size, as index lines, with the tool to drill down at the end of each section. Behaviour in detail: SPEC §8.

Tool Arguments Returns or does
portfolio_digest budget?, since_event?, session?, session_title?, hook_session? For a coordinator: one line per project (stage counts, the derived pulse line, the first line of the pulse note), what waits for the owner (open questions and approval requests first, then each open card once with its marks, then grouped lines), open findings and questions of reports to triage (## Findings and questions to triage: a Triage: line, then up to 8 items, newest first, the rest counted), open tasks not listed there (stage, note, waiting on, next step, pull requests, document), current decisions of the last 7 days, open tasks with no change for task_stale_days, global blocks, changes.
project_digest project, budget?, since_event?, session?, session_title?, hook_session? For a manager: the derived pulse and the pulse note, open tasks by stage with next step and waiting on, open questions, the project's open findings and questions of reports to triage (as in portfolio_digest), recent current decisions, project blocks, project and global notes flagged [verify] or [never read], changes.
task_context task, budget?, since_event?, session?, session_title?, hook_session? For the session on the task: fields and progress, plan with the current step, the task's and project's decisions, linked document sections (relaybay://doc/<project>/<doc>#<anchor> in the description or progress; unresolved ones marked broken), the card's change document spec-<key> when it has one (## Change document: its targets with their op, format problems, other open cards changing the same sections), the rules line, unread owner comments (count and ids; text only of those already delivered to you; it delivers nothing), relevant notes, changes.
project_pulse_set project, text, session?, session_title?, hook_session? Writes the pulse note: at most 5 lines and 600 characters, secret scan, event project.pulse_set. Over the limit it fails with both counts. Shown with its date under the pulse line relaybay derives from the cards; never marked stale, and nothing asks for it.
  • budget — size limit in characters, held between 500 and 40000 (default digest_budget_chars, 12000). The lowest priority sections lose whole lines first and say … N more: <tool>. The first section (identity and state) is never dropped.
  • session — your read position: changes show from your last read of this digest (per level and project or task) and the position moves on; on the first read, and without session, the last 24 hours. A budget too small for all the changes leaves the position where it is, so nothing is lost, and the footer says so. That is why these tools are annotated as writes.
  • since_event — show changes after that event id and leave your position alone.
  • Changes are one line per task with the kinds counted, without session status, activity and delivery marks, at most 30 lines; events_since has the rest (a project or task digest names its project in that line). The footer names the event id reached.

Day time log

The coordinator's log of the day across projects: marks on cards or free labels, the spans they make and the minutes entered in the external tracker. The four tools are listed on /mcp and /mcp/coordinator, not on /mcp/agent or /mcp/reader; in coordinator mode an agent's write is refused with The day time log is the coordinator's. Nothing changed. Behaviour in detail: SPEC.

Tool Arguments Returns or does
timelog_mark kind (start, switch, pause), task?, label?, at?, session?, session_title?, hook_session? Writes a mark. start and switch name exactly one of task (a card key) and label (work without a card, e.g. call); a pause names no card, its label says why. at: HH:MM (today, server time) or an ISO time (with an offset; without one it is server time), at most a minute ahead; default now. The same kind and target as the newest mark within 60 s writes nothing and answers Nothing written. Already marked: #N at HH:MM. The answer: Marked #N switch at 10:00: call., the span it closed (Closed: acme-shop-12 09:00-10:00 1h00.), the day's total and what runs now, notes on odd sequences (never refusals), the next call. Event timelog.marked.
timelog_list day? (a date, today (default) or yesterday), task?, project? The day: its spans and pauses in time order (- 09:00-10:00 1h00 acme-shop-12 (acme-shop) (#1 start), - 10:30 pause (#3)), totals by project (labels together), card and label, Now: … while a span runs, and the unclosed spans. With task: today · total · in tracker, the seconds per day of the latest 14 days with time, the tracker rows. With project: that project's cards on the day and its totals.
timelog_fix mark, reason, at?, kind?, task?, label?, delete?, session?, session_title?, hook_session? Corrects a mark in place or deletes it (delete=true); reason is required. Setting task clears the label and the other way round; - clears one. Events timelog.fixed (before, after, reason) and timelog.removed (before, reason), both on the Audit page's changes. The answer shows the mark's day again.
worklog_add task, minutes, day?, ref?, reason?, session?, session_title?, hook_session? Adds a row to the card's ledger of minutes entered in the external tracker (append-only, -1440 to 1440, not 0). A correction is a negative row and needs reason; one that takes the card's day below 0 is refused. Event worklog.added. tracker_logged stays the separate mark that the work log is done.

Durations read 1h05, 0h30: summed in seconds, shown floored to whole minutes.

Prompts

start_task and finish_stage take project (required) and task (optional key) and expand to one user message: the task, a checklist and the project's current rules. finish_stage also names what moving to the next stage needs. An unknown project or task, or a task of another project, is an error with the reason.

Checked with the MCP Python SDK client (mcp 2.3.0): both are listed with their arguments and expand as described. Claude Code is documented to list MCP prompts as slash commands (/mcp__relaybay__start_task); that is not verified against any Claude Code version yet.

Backlog

Findings for later go on the backlog. Behaviour: SPEC §12. Intake from chats and e-mail was removed in 0.12; its tools were removed with contract 2 (see Contract).

Tool Arguments Effect
backlog_add project, title?, body?, area?, task?, priority?, assignee?, kind?, location?, from_report?, finding?, session?, session_title?, hook_session? A finding outside your task (a bug, a missing feature, a question for later): status new, origin session, the origin task when task is passed. priority is -9 to 9, higher first, default 0; assignee is who it is for, and To plan makes it the task's waiting_on. kind is bug, idea, question or debt; location is where in the code (repo:path:line, path:line or a link, up to 300 characters). Secret values are refused. It is always added; when open items of the project have a similar title (title similarity 0.6 and up, at most three) the answer ends with Note: similar open items: #12 (0.71) <item title>; if it is the same, backlog_update(item=<new>, duplicate_of=12). With from_report (a report id) and finding (its number), always together, that finding of a report_add is triaged into the item: its title, body, location, kind and area fill the parameters not given (title is required only without it), its card becomes task, and the digests stop listing it; a finding already in the backlog or dismissed is refused.
report_item_dismiss report, n, kind? (finding or question, default finding), reason?, session?, session_title?, hook_session? Closes a finding or question a report_add carried without a backlog item (for a question, reason says what was decided); the digests stop listing it. Event report.item_dismissed. Already triaged or dismissed: refused, naming the backlog item or who dismissed it.
backlog_list project?, status? (new, later, planned, done, declined), area?, assignee? (- lists the items for nobody), query?, kind? (- lists the items without a kind), since? (a day), task?, has_location?, limit? (default 50) Items, new first, then the highest priority, then the newest: #7 acme-shop [cart] (bug) Title · priority 2 · for dev · session from acme-shop-3 by dev · new · 2026-11-05 · at web:src/cart.ts:42 · note: <triage note>; a done item … · done: <note> (<link>) · …, a duplicate … · declined: duplicate of #3 · …. query: every word in the title, the text, the location, the source or the decision (word forms match). since: found (else created) on that day or later. task: items found in that card or linked to it. The date is the day it was found when an import gave one.
backlog_patch item, fields, session?, session_title?, hook_session? The fields of backlog_update as one JSON object, e.g. {"priority": 2}, under the same rules, for a client whose backlog_update schema is older than the server. An unknown field is refused; -, an empty string or null clears body, area, assignee, kind, location and triage_note and resets priority to 0.
backlog_update item, status?, reason?, link?, title?, body?, area?, priority?, assignee?, kind?, location?, triage_note?, duplicate_of?, task?, session?, session_title?, hook_session? Title, body, area, priority, assignee, kind and location: the session that added the item, while it is new; coordinator sessions on any item. Coordinator sessions named in the config only: status (new, later, done for a finding fixed without a task of its own, with an optional link such as the pull request and reason as a note, declined with a reason), triage_note (the decision in words, up to 500 characters), duplicate_of (another item of the same project: status declined, reason duplicate of #N, never a declined item; the items that were duplicates of this one move to the same original and the answer names them; a later status change clears it) and task (links an existing card of the same project: status planned, event backlog.planned, no new card). One of status, duplicate_of and task per call. planned is never a status here: the owner's To plan creates a task, task links one.

Resources

relaybay://project/{slug} — the same markdown as project_snapshot, so a session can attach a project snapshot as context.

relaybay://rules — the global working rules (same as rules_get()).

relaybay://rules/{project} — a project's working rules, merged (same as rules_get(project=…)).

relaybay://doc/{project}/{doc} — a project document's current markdown (same as doc_get).

relaybay://attachments/{attachment_id}/annotated — a screenshot's flattened PNG with the owner's markup (same as attachment_get with annotated=true, same size limit). The owner's "Send to agent" comment names this address.

relaybay://schema/task — the editable task fields as a markdown table (field, type, description, how to clear it), generated from the same list the server validates writes against.

relaybay://contract — the MCP contract: its version and the compatibility rule (below).

Working rules

One structured document with a fixed set of rule kinds:

Key Meaning Default
report_format first_line (the pattern shown to agents), states, sizes (subsets of the built-in states and sizes) state · size · gist, all states, S/M/L
stage_requirements per target stage, a list of requirements: {kind = "report_since_stage_change"} (a report added since the task's last stage change), {kind = "field_present", field = "<task field>"} or {kind = "plan_accepted", unless_size = ["S"]} (an accepted plan unless the task's size is listed; see Plan) dev: an accepted plan unless size S; test: a report since the last stage change; done: progress
description_template markdown template for new task descriptions (shown in the rules) none
guidance free-text markdown shown to agents one short paragraph

Layers, merged in this order:

  1. built-in defaults;
  2. the global [rules] table in config.toml (see the README);
  3. a project override: the same document, partial, set through rules_update or an accepted rules_propose.

Each layer may be partial. report_format merges per key, stage_requirements per stage (a stage's list replaces the earlier list; [] drops the stage's requirements), description_template replaces; the config guidance replaces the built-in text, a project's guidance is appended after the global one. Every layer is validated (unknown keys, stages, rule kinds or fields are errors naming the key). An error in config.toml stops the server at startup. A broken project override (invalid JSON or rules) never stops the server or the project: it is logged once as a warning, the project uses the global rules, and rules_get / relaybay://rules/{project} and the first line of project_snapshot add "project override ignored: ".

Rules have version numbers. project_snapshot starts with Rules v3 (global v2, project v1), hash 1a2b3c4d: accepted plan before dev, report before test, progress before done (read relaybay://rules/<project>); the digests carry the same line. N in Rules vN is the sum of the two, so it grows when either changes. The hash is the first 8 hex digits of the SHA-256 of the merged document plus rules_mode, so it also changes on a switch between warn and strict.

rules_mode (config, default warn) decides what an unmet stage requirement and a report whose first line misses the format do: warn lets the write through with a Warning (rules) line, strict refuses it.

Changing rules

Tool Parameters What it does
rules_update scope (global or a project slug; project:global for a project with that slug), patch (object), reason, session?, session_title?, hook_session? A new version at once. Only for sessions named in coordinators in the config; everyone else gets an error pointing to rules_propose, and so does everyone when none is configured. The owner sees it in the Inbox until it is marked read, and in Activity.
rules_propose the same Records a proposal for the owner and changes nothing. It shows in the Inbox and Settings → Rules; accepting checks it again against the current version.

patch merges into the scope's current version: objects key by key, other values (lists included) replace, null removes a key (a project then follows the global rules, the global rules take the built-in default). Unknown keys are refused. For example {"stage_requirements": {"test": []}} drops what moving to test needs in that scope. The merged result must be valid rules, otherwise the call is refused with the reason; free text is scanned for secrets.

coordinators is a guard against mistakes, not access control: all MCP clients share one token. A desktop id entry (local_…) needs the call to pass hook_session equal to the id that session already linked exactly on an earlier write; the same call's link does not count. A name or alias entry only has to be passed as session, so any client can use it.

When your session's last known version is older, a write tool's result ends with one line, once per version: rules updated to v4: re-read relaybay://rules/acme-shop.

The report format check applies only to the standard first_line; a custom one is free text.

config.toml stays a valid source: an edited [rules] table becomes a new global version at the next start, and an unchanged one leaves accepted versions in force, also when a release changes the built-in defaults (SPEC §6).

Schema changes and long-running sessions

An MCP client keeps the parameter schema of a tool it has already loaded. A Claude Code session that was running before relaybay was upgraded can reconnect after a server restart and see new tools, while an existing tool (such as task_update) keeps its old parameter list, so a new field looks unavailable. Two ways out:

  • Use task_update(task, fields={...}) for fields your client does not know yet: fields is a plain JSON object, validated on the server with the same rules as the other task_update parameters. The allowed names are listed at the end of task_get ("Editable fields: …") and in the resource relaybay://schema/task (name, type, description, how to clear).
  • Refresh the schemas: reconnect the server in the client (/mcp in the Claude Code CLI) or start a new session.

Contract

The tools, resources and prompts follow a versioned contract (version 1 in 0.8.0, 2 since 0.13, 3 since 0.18). Within a contract version a release only adds: it never removes a tool, a parameter, a resource or a prompt, never narrows what a parameter accepts, never adds a required parameter to an existing tool and never makes a read-only tool write. While relaybay has no outside users, a replaced tool or parameter is removed in the same release that replaces it, and that release raises the contract version; nothing is kept as deprecated. relaybay://contract and the MCP reference give the version and the rule. Escape hatches for a stale schema exist only where fields grow: task_update(fields=…) and backlog_patch. The rule in full: SPEC.

An argument a tool does not take is never dropped without a word: a writing tool refuses the call and changes nothing (Unknown parameter(s) for task_update: nxt_stage. Nothing changed., followed by the parameters it takes and a hint that the client's tool list may be older or newer than the server, with task_update(fields=…) or backlog_patch for a task or backlog tool), and a read-only tool answers with a last line Ignored unknown parameter(s): …. Every parameter of the current contract version stays known.

Contract 2 (0.13) removed the twenty tools and the resource that 0.12 kept as deprecated stubs doing nothing (design 0025): run_start, run_status, run_events, run_settings, schedule_add, schedule_list, schedule_cancel, usage_summary, budget_get, brake_set, brake_status, intake_post, intake_list, intake_tie, intake_dismiss, intake_propose, intake_sources, message_send, messages_list, message_ack and relaybay://intake/{source}. They had been announced as removable not before 2026-12-17; the maintainer shortened that notice. A call from a stale schema answers Unknown tool: <name>: start a new session (or reconnect the MCP server) to load the current list.

Contract 3 (0.18) removed task_set_stage and task_patch (replaced by task_update(stage=…) and task_update(fields={…}) in 0.17), environments_get, environment_propose and the resource relaybay://project/{slug}/environments (doing nothing since 0.15). A session started before the update gets Unknown tool: <name> for them and must be restarted (or its MCP server reconnected).

Example

project_upsert(slug="acme-shop", name="Acme Shop")
task_create(project="acme-shop", title="Checkout page", branch="feat/checkout",
            description="Let customers pay by card without leaving the shop.",
            session="local_8f14e45f-ceea-467f-a0b6-1f1a2b3c4d5e", session_title="Checkout")
  → Created **acme-shop-1** “Checkout page” · stage plan · version 1.
task_update(task="acme-shop-1", stage="dev", next_step="Card form", waiting_on="-",
            session="local_8f14e45f-ceea-467f-a0b6-1f1a2b3c4d5e")
report_add(task="acme-shop-1", body="verified · M · checkout works\n\nTests pass.",
           progress="- Cart with totals\n- Card form with validation\n- Tests",
           next_step="Review the PR", waiting_on="reviewer",
           session="local_8f14e45f-ceea-467f-a0b6-1f1a2b3c4d5e")
  → Report #1 added to **acme-shop-1** (verified · M): checkout works
task_unbind_session(task="acme-shop-1", session="local_8f14e45f-ceea-467f-a0b6-1f1a2b3c4d5e")
  → Unbound Checkout (local_8f14e45f-ceea-467f-a0b6-1f1a2b3c4d5e) from **acme-shop-1** “Checkout page” · stage dev · version 4.