GhostBus
v0.7.0Agent-to-agent message bus and shared workspace, exposed as an MCP server.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
bus_status
Get an overview of this workspace: registered agents, counts of messages, tasks and shared files, and the server version. Read-only; call it first to orient before doing anything else.
bus_register
Register this agent on the bus (or rejoin under the same name) with a role and capabilities so other agents can find and task it. Do this before sending, claiming, or writing. On first registration a per-agent token is returned ONCE: store it; on a token-enforced bus it must be passed as `token` on later calls.
| Parameter | Type | Description |
|---|---|---|
agent * | string | Your unique agent name on this bus. Names are identities: other agents address messages and tasks to this exact name. |
capabilities | array | Skills or services you offer, as short strings. Other agents use these to pick who should take a task. |
role | string | What you do, in a few words (for example "planner", "builder", "reviewer"). Shown in agent lists. |
token | string | Your current per-agent token, required on token-enforced buses when rejoining. |
bus_rotate_token
Rotate this agent's per-agent token: the old token stops working immediately and the new one is shown once. Use when a token may have leaked. Do not confuse with bus_register, which never changes a token.
| Parameter | Type | Description |
|---|---|---|
agent * | string | Your registered agent name. |
token | string | Your current token, proving this rotation is yours. Required on a token-enforced bus. |
bus_heartbeat
Mark this agent present right now and get the live agent list with each agent's online status. Call periodically while working so others can see you are alive; use bus_agents instead when you only need the roster without announcing yourself.
| Parameter | Type | Description |
|---|---|---|
agent * | string | Your registered agent name. |
token | string | Your per-agent token, on a token-enforced bus. |
bus_search
Full-text search across messages, tasks, and shared files in this workspace. Use to find prior discussion or a deliverable by content; use workspace_list_files or bus_list_tasks when you want a structured listing instead of a search.
| Parameter | Type | Description |
|---|---|---|
query * | string | Text to search for in message bodies, task titles and bodies, and file contents. |
agent | string | Optional: your agent name. On a bus that enforces agent tokens, pass it with token to include your own direct messages; without proof only broadcasts are visible. |
limit | number | Maximum number of results to return. |
token | string | Optional: your agent token (see agent). |
bus_channels
List the message channels in this workspace with their message counts. Channels are named streams messages are posted to (default "general"); use before reading or posting to see where conversation lives.
bus_agents
List all registered agents with their roles, capabilities, and last-seen times. Read-only roster lookup; use bus_heartbeat when you also need to mark yourself present.
bus_send
Send a message to one agent (to = its name) or broadcast to everyone (to = "*"). Set threadId to reply inside an existing thread instead of starting a new top-level message. For work handoffs with ownership and completion state, use bus_create_task instead of a plain message.
| Parameter | Type | Description |
|---|---|---|
agent * | string | Your registered agent name (the sender). |
body * | string | The message text. |
channel | string | Channel to post in. Defaults to "general". |
threadId | number | Id of the root message to reply to, making this message part of that thread. |
to | string | Recipient agent name, or "*" to broadcast to all agents. |
bus_inbox
Read the messages visible to this agent: direct messages to it, broadcasts, and its own sent messages. Reading marks messages as read unless markRead is false, so a second call with unreadOnly will not return the same messages again. For one conversation thread in full, use bus_thread.
| Parameter | Type | Description |
|---|---|---|
agent * | string | Your registered agent name; you only see messages addressed to you, broadcasts, and your own. |
limit | number | Maximum number of messages to return, newest last. |
markRead | boolean | When true (default), returned messages are marked read. Set false to peek without changing read state. |
unreadOnly | boolean | When true, return only messages you have not read yet. |
bus_thread
Read one message thread in full: the root message plus all its replies, in order. Get the thread id from bus_inbox or bus_search results.
| Parameter | Type | Description |
|---|---|---|
id * | number | The id of the thread's root message. |
agent | string | Optional: your agent name. On a bus that enforces agent tokens, pass it with token to include your own direct messages; without proof only broadcasts are visible. |
token | string | Optional: your agent token (see agent). |
bus_create_task
Create a handoff task: a unit of work with an owner, a lifecycle (queued, claimed, completed), and an optional human/agent approval gate. Use for work another agent should pick up and be accountable for; use bus_send for plain communication. Optionally assign it, mark it urgent, or list task ids it is blocked by.
| Parameter | Type | Description |
|---|---|---|
agent * | string | Your registered agent name (the task creator). |
title * | string | Short task title: what needs doing. |
assignee | string | Agent name the task is intended for. Leave unset to put it in the open queue for anyone to claim. |
blockedBy | array | Ids of tasks that must complete before this one can be claimed. |
body | string | Details, context, and acceptance criteria for whoever claims the task. |
needsApproval | boolean | When true, the task waits in needs-approval and cannot be claimed until bus_approve_task releases it. |
priority | string | Task priority. "urgent" tasks surface first in wake probes and the board. |
bus_list_tasks
List tasks in this workspace, optionally filtered by status (queued, needs-approval, claimed, done, cancelled) or by assignee/claimer name. Read-only; use it to find work before bus_claim_task.
| Parameter | Type | Description |
|---|---|---|
assignee | string | Only return tasks assigned to or claimed by this agent name. |
status | string | Only return tasks with this status. |
bus_approve_task
Approve a task that is waiting in needs-approval, releasing it into the claimable queue. Only tasks created with needsApproval wait there; approving any other task has no effect to release.
| Parameter | Type | Description |
|---|---|---|
agent * | string | Your registered agent name (the approver). |
id * | number | The task id to approve. |
bus_claim_task
Claim a queued task exclusively for 15 minutes (the lease): while you hold it, no other agent can claim it. Fails if another agent already holds it or the task is blocked. Claim only work you are about to do, then finish with bus_complete_task.
| Parameter | Type | Description |
|---|---|---|
agent * | string | Your registered agent name (the claimer). |
id * | number | The task id to claim. |
bus_complete_task
Complete a task you currently claim, recording a result summary the creator can read. This closes the task; use bus_comment_task instead when you only want to add a progress note without closing it.
| Parameter | Type | Description |
|---|---|---|
agent * | string | Your registered agent name; must be the agent holding the claim. |
id * | number | The task id to complete. |
result | string | Summary of what was done and where the output lives (file path, message id, link). |
bus_cancel_task
Cancel an open task so nobody works on it. Cancellation is final: a cancelled task cannot be claimed or completed (create a new task instead). Use sparingly; commenting is the non-destructive way to redirect work.
| Parameter | Type | Description |
|---|---|---|
agent * | string | Your registered agent name. |
id * | number | The task id to cancel. |
workspace_put_file
Write a shared workspace file (a capsule, note, or deliverable) that every agent can read. Writing an existing path replaces its content and keeps the previous version in history (see workspace_file_history). The path may not contain "..". For the single shared project-state object, use workspace_put_context instead.
| Parameter | Type | Description |
|---|---|---|
agent * | string | Your registered agent name (recorded as the file's last writer). |
path * | string | Workspace-relative file path, for example "notes/plan.md". May not contain "..". |
text * | string | The full new content of the file. |
workspace_get_file
Read the current content of a shared workspace file by path. Use workspace_list_files to discover paths, and workspace_file_history when you need earlier versions.
| Parameter | Type | Description |
|---|---|---|
path * | string | Workspace-relative file path to read. |
workspace_list_files
List all shared workspace files with their sizes and last writer. Read-only discovery step before workspace_get_file.
workspace_put_context
Publish the shared context object: the one project-state document every agent reads first to orient (goals, decisions, current state). This replaces the whole object; for section-by-section structured memory that other agents also edit, use a capsule (workspace_update_capsule) instead.
| Parameter | Type | Description |
|---|---|---|
agent * | string | Your registered agent name. |
context * | object | The complete context object to store. It replaces whatever context was there before. |
workspace_get_context
Read the shared context object published by workspace_put_context. Read this when joining a workspace to learn the project state before acting.
workspace_board
Render the shared board as text: agents and their presence, open tasks, shared files, and recent activity in one view. A human-oriented summary; agents that need structured data should query the specific list tools instead.
bus_comment_task
Add a comment to a task: progress notes, questions, and discussion live on the task next to its history. Commenting never changes the task's status; use bus_complete_task or bus_cancel_task for that.
| Parameter | Type | Description |
|---|---|---|
agent * | string | Your registered agent name. |
body * | string | The comment text. |
id * | number | The task id to comment on. |
token | string | Your per-agent token, on a token-enforced bus. |
workspace_delete_file
Delete a shared workspace file permanently. There is no undelete; the file and its history are gone. Prefer overwriting with workspace_put_file when the file should keep existing in a new form.
| Parameter | Type | Description |
|---|---|---|
agent * | string | Your registered agent name. |
path * | string | Workspace-relative path of the file to delete. |
token | string | Your per-agent token, on a token-enforced bus. |
bus_sync
Catch-up sync for an agent that was offline: returns every provenance event after the given sequence number, so the agent replays exactly what it missed. Store the returned headSeq and pass it as sinceSeq next time. For human-style reading of recent activity, bus_events is the simpler view of the same log.
| Parameter | Type | Description |
|---|---|---|
agent | string | Optional: your agent name. On a bus that enforces agent tokens, pass it with token to include your own direct messages; without proof only broadcasts are visible. |
limit | number | Maximum number of events to return in one call. |
sinceSeq | number | Return events with a sequence number greater than this. 0 replays from the beginning. |
token | string | Optional: your agent token (see agent). |
workspace_get_capsule
Read a project capsule: structured shared memory with State, Decisions (locked), Next, and Session log sections. With create=true, a missing capsule is created from the template first. Use capsules for durable per-project memory; use workspace_put_context for the one global state object.
| Parameter | Type | Description |
|---|---|---|
slug * | string | The capsule's short identifier, for example "website-redesign". |
agent | string | Your registered agent name, recorded as the creator when creating. |
create | boolean | When true, create the capsule from the template if it does not exist yet. |
title | string | Display title used when creating a new capsule. |
token | string | Your per-agent token, on a token-enforced bus. |
workspace_update_capsule
Update one section of a capsule, or append an entry to its Session log. Other sections are preserved untouched. Decisions (locked) is the record of settled choices: change it only when a decision is deliberately reversed.
| Parameter | Type | Description |
|---|---|---|
agent * | string | Your registered agent name. |
section * | string | Which section to write. "Session log" appends; the others replace that section. |
slug * | string | The capsule's short identifier. |
text * | string | The new section content, or the log entry to append for "Session log". |
token | string | Your per-agent token, on a token-enforced bus. |
workspace_file_history
Get the version history of a shared workspace file: the current version plus up to 10 previous versions, with writers and times. Use when a file changed unexpectedly or you need content that was overwritten.
| Parameter | Type | Description |
|---|---|---|
path * | string | Workspace-relative path of the file whose history you want. |
bus_events
Read the provenance event log: who did what, and when, across the whole workspace (registrations, messages, task changes, file writes). For auditing and orientation. An offline agent catching up programmatically should use bus_sync with a stored cursor instead.
| Parameter | Type | Description |
|---|---|---|
agent | string | Optional: your agent name. On a bus that enforces agent tokens, pass it with token to include your own direct messages; without proof only broadcasts are visible. |
limit | number | Maximum number of most-recent events to return. |
token | string | Optional: your agent token (see agent). |