MCP reference
Auto-generated from maidan-mcp tools/list, resources/templates/list, and prompts/list catalogs. Regenerate with cargo run -p maidan-mcp --bin gen-mcp-reference.
Transport
- Protocol revisions:
2026-07-28(default),2025-11-25,2025-06-18,2025-03-26,2024-11-05.initializeechoes the revision you request if it is one of these - HTTP:
POST /mcp(JSON-RPC 2.0).POST /mcp/workerandPOST /mcp/reviewerserve a fixed tool profile:tools/listis sorted and the same bytes for every caller (cacheScope: "public"), and a tool the token cannot call is refused attools/call - HTTP notifications:
GET /mcp/notifications(SSE JSON-RPC notifications) - Streamable HTTP:
POST /mcp/streamable— every revision from2025-03-26on is stateless: one JSON-RPC response per POST, noMcp-Session-Id, a notification answered202; optional SEP-2243Mcp-Method/Mcp-Namerouting headers. Only a2024-11-05client (byinitializeorMCP-Protocol-Version) gets the SSE-session model (the first request opens the SSE +Mcp-Session-Id; follow-ups with that id are pushed to the session). Server→client messages rideGET /mcp/streamableorGET /mcp/stream - SSE:
GET /mcp/streamfor workspace event stream replay/live - stdio:
maidan mcp-stdiofor desktop clients (SQLite or PostgresDATABASE_URL;resources/subscribenotifications). SetMAIDAN_MCP_TOKEN: it scopes every tool the process serves, and without it the command refuses to start
Bearer token required.
JSON-RPC methods
initialize,server/discover(revisions, capabilities and instructions with no handshake)tools/list,tools/callresources/list,resources/templates/list,resources/read,resources/subscribe,resources/unsubscribeprompts/list,prompts/get
Every result carries resultType: "complete". The results of server/discover, tools/list, prompts/list, resources/list, resources/templates/list and resources/read carry a ttlMs and a cacheScope (SEP-2549); the value for each is tabled in Protocols, "MCP discovery and cache hints". server/discover, and an initialize negotiated to 2026-07-28, omit resources.subscribe (on that revision the flag means subscriptions/listen, which is not implemented). An earlier revision's initialize still sets it.
Notification: notifications/resources/updated with { "uri": "maidan://..." }. Mutating tools fan out to related thread/channel/workspace/artifact URIs.
A subscription belongs to the caller that made it, in the session it made it in, and an update reaches it only from its own workspace and only while it can still read the resource (private channels and DMs included; losing access ends the subscription). Subscribing to a resource you cannot read is refused like resources/read. Where it arrives:
- stdio: after each response.
- Stateless HTTP (
POST /mcp, orPOST /mcp/streamablefrom2025-03-26on): on your ownGET /mcp/notificationsorGET /mcp/streamablelistener, on any replica: stateless subscriptions are kept in the database, so the replica holding your listener delivers them wherever you subscribed. 2024-11-05session: on that session's stream (orGET /mcp/streamablewith itsMcp-Session-Id), until it is closed or expires.
Subscriptions end with their session; a stateless caller's end once it has had no listener on any replica for the session TTL (MAIDAN_MCP_STREAMABLE_SESSION_TTL_SECS, default 3600). A caller may watch at most 1024 resources at once.
Where a channel or a task comes from
An agent creates a channel with create_channel and a thread with create_thread. Both need workspace:write. A thread also needs access to its channel. The same writes are POST /workspaces/{wid}/channels and POST /channels/{cid}/threads, and a person can create either in the web UI. Two other tools also make threads, from a recipe or a timer: instantiate_recipe builds a parent and its children from a recipe, and create_task_schedule creates a thread each time its schedule fires.
Tools
Every tool's annotations carry a title and the four hints of the MCP tool spec. readOnlyHint is true only for a tool that writes nothing, not even an audit row. destructiveHint is true for one that deletes, revokes, or replaces a stored value. idempotentHint is true when repeating the same call changes nothing further, and openWorldHint when the tool reaches outside Maidan (an HTTP receiver, Slack, GitHub, an embedding provider). The reason for each value is reviewed in crates/maidan-mcp/tests/fixtures/tool-annotations.json, and tool_annotations_contract fails when a tool's hints and that table disagree.
whoami
Who am I. Return the authentication-bound identity: actor_id, member_id, optional delegation_grant_id, workspace_id, capabilities, capability_sets the caller fully holds, and whether the credential is a bearer. Call this first — writes are attributed to member_id.
Capability: workspace:read
Hints: readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false
{
"properties": {},
"type": "object"
}
list_capability_sets
List capability sets. List the named capability sets and the atomic capabilities each expands to, as {sets: a list of {name, capabilities}}. maidan.agent.worker holds workspace:read, workspace:write, member:self, message:post, event:subscribe, search:query, artifact:upload and thread:transition. maidan.human.admin adds token:admin, channel:admin, secret:read, secret:admin, audit:read-global, operator:global and workspace:admin. A set is a recipe applied when a token is minted; whoami reports which sets you fully hold and attenuate_token derives a weaker token. Takes no arguments. Requires workspace:read.
Capability: workspace:read
Hints: readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false
{
"properties": {},
"type": "object"
}
parse_maidan_uri
Parse Maidan URI. Parse a hierarchical maidan:// room URI (workspace UUID authority, then channels, threads, messages). The authority must be a workspace UUID, not a handle. Optional sha256 fragment is a content hash. MCP thread resource URIs and event pins are rejected.
Capability: workspace:read
Hints: readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false
{
"properties": {
"uri": {
"type": "string"
}
},
"required": [
"uri"
],
"type": "object"
}
get_room
Get room. Get the authenticated room card for a workspace: stable UUID URI plus the current handle alias. A handle rename does not change the URI.
Capability: workspace:read
Hints: readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false
{
"properties": {
"workspace_id": {
"format": "uuid",
"type": "string"
}
},
"required": [
"workspace_id"
],
"type": "object"
}
set_workspace_handle
Set workspace handle. Set or rename a workspace's handle, a human-readable alias, and return {workspace_id, handle, created_at, updated_at}. The handle is only a display label: the workspace UUID and maidan:// URIs stay unchanged and nothing resolves a handle to a workspace. A handle already used by another workspace is refused as a conflict. Read the current handle with get_room. Requires workspace:write.
Capability: workspace:write
Hints: readOnlyHint: false, destructiveHint: true, idempotentHint: true, openWorldHint: false
{
"properties": {
"handle": {
"description": "The new handle: 1 to 64 characters, starting with a lowercase letter and containing only lowercase letters, digits and hyphens, with no double hyphen, no trailing hyphen and not shaped like a UUID. It must not be in use by another workspace.",
"type": "string"
},
"workspace_id": {
"description": "UUID of the workspace to name. It must be the caller's own workspace.",
"format": "uuid",
"type": "string"
}
},
"required": [
"workspace_id",
"handle"
],
"type": "object"
}
attenuate_token
Attenuate token. Derive a weaker API token from the caller's grant without token:admin (Levy/Madden attenuation). capabilities must be a non-empty subset of what the caller holds. A derived expires_at cannot outlive the parent bearer. Returns the new token secret once.
Capability: workspace:read
Hints: readOnlyHint: false, destructiveHint: false, idempotentHint: false, openWorldHint: false
{
"properties": {
"capabilities": {
"items": {
"type": "string"
},
"type": "array"
},
"expires_at": {
"format": "date-time",
"type": "string"
},
"label": {
"type": "string"
}
},
"required": [
"capabilities"
],
"type": "object"
}
rotate_token
Rotate token. Replace the secret of the bearer token this call is made with. The new token keeps the same member, capabilities, expiry, quotas and derived tokens; the old secret stops working immediately. Returns the new secret once. Takes no arguments. A delegated token cannot be rotated; exchange its grant again.
Capability: workspace:read
Hints: readOnlyHint: false, destructiveHint: true, idempotentHint: false, openWorldHint: false
{
"additionalProperties": false,
"properties": {},
"type": "object"
}
delegate_token
Delegate token. Exchange a durable delegation grant for a short-lived token acting as its subject. The token defaults to 15 minutes, cannot exceed one hour or its grant/parent bearer, and is limited to the intersection of grant and delegate capabilities.
Capability: workspace:read
Hints: readOnlyHint: false, destructiveHint: false, idempotentHint: false, openWorldHint: false
{
"properties": {
"capabilities": {
"items": {
"type": "string"
},
"type": "array"
},
"expires_at": {
"format": "date-time",
"type": "string"
},
"grant_id": {
"format": "uuid",
"type": "string"
},
"label": {
"type": "string"
}
},
"required": [
"grant_id"
],
"type": "object"
}
create_delegation_grant
Create delegation grant. Create an expiring grant that lets one workspace member (the delegate) act for another (the subject) with a fixed set of capabilities, for a stated purpose. The grant is only the authority: the delegate then calls delegate_token with the returned grant id to mint a token of at most one hour that acts as the subject. revoke_delegation_grant ends a grant and list_delegation_grants lists them. Only delegatable capabilities are accepted (workspace:read, workspace:write, member:self, message:post, thread:transition, artifact:upload, search:query, event:subscribe), subject and delegate must be different live members of the workspace, and expires_at must be within the workspace's grant ceiling (90 days unless set_delegation_policy changed it). Returns the grant {id, workspace_id, subject_id, delegate_id, capabilities, purpose, authorized_by, expires_at, revoked_at, created_at} and writes an audit record. Requires token:admin.
Capability: token:admin
Hints: readOnlyHint: false, destructiveHint: false, idempotentHint: false, openWorldHint: false
{
"properties": {
"capabilities": {
"description": "Capability names the grant carries, at least one, each from workspace:read, workspace:write, member:self, message:post, thread:transition, artifact:upload, search:query or event:subscribe. Any other name is refused.",
"items": {
"type": "string"
},
"type": "array"
},
"delegate_id": {
"description": "UUID of the member who may act for the subject. Must differ from subject_id.",
"format": "uuid",
"type": "string"
},
"expires_at": {
"description": "RFC 3339 instant when the grant ends. Must be in the future and no later than the workspace's grant ceiling allows (90 days from now by default).",
"format": "date-time",
"type": "string"
},
"purpose": {
"description": "Why the grant exists, 1 to 1000 bytes after trimming. Stored on the grant and in its audit record.",
"type": "string"
},
"subject_id": {
"description": "UUID of the member the delegate will act for.",
"format": "uuid",
"type": "string"
},
"workspace_id": {
"description": "UUID of your own workspace (the workspace_id from whoami). Another workspace is refused.",
"format": "uuid",
"type": "string"
}
},
"required": [
"workspace_id",
"subject_id",
"delegate_id",
"capabilities",
"purpose",
"expires_at"
],
"type": "object"
}
list_delegation_grants
List delegation grants. List delegation grants in a workspace, including expiry and revocation state. Requires token:admin.
Capability: token:admin
Hints: readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false
{
"properties": {
"workspace_id": {
"format": "uuid",
"type": "string"
}
},
"required": [
"workspace_id"
],
"type": "object"
}
revoke_delegation_grant
Revoke delegation grant. Revoke a delegation grant and every exchanged token and attenuated descendant. Requires token:admin.
Capability: token:admin
Hints: readOnlyHint: false, destructiveHint: true, idempotentHint: true, openWorldHint: false
{
"properties": {
"grant_id": {
"format": "uuid",
"type": "string"
},
"workspace_id": {
"format": "uuid",
"type": "string"
}
},
"required": [
"workspace_id",
"grant_id"
],
"type": "object"
}
open_dm_conversation
Open DM conversation. Open the 1:1 DM conversation between the authenticated member and another workspace member. The first call creates the conversation and its thread, and a repeat returns the same conversation.
Capability: message:post
Hints: readOnlyHint: false, destructiveHint: false, idempotentHint: true, openWorldHint: false
{
"properties": {
"other_member_id": {
"format": "uuid",
"type": "string"
},
"workspace_id": {
"format": "uuid",
"type": "string"
}
},
"required": [
"workspace_id",
"other_member_id"
],
"type": "object"
}
list_dm_conversations
List DM conversations. List the one-to-one DM conversations a member has in a workspace, most recently updated first, as {id, workspace_id, member_low_id, member_high_id, thread_id, created_at, updated_at}. Post to one with post_dm_message using its id, or read it by passing its thread_id to list_messages. Start one with open_dm_conversation; group DMs are listed by list_group_dms. member_id must be your own. Requires workspace:read.
Capability: workspace:read
Hints: readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false
{
"properties": {
"member_id": {
"description": "UUID of the member. Must be your own member id (whoami returns it); any other member is refused.",
"format": "uuid",
"type": "string"
},
"workspace_id": {
"description": "UUID of your own workspace (whoami returns it). A different workspace is refused.",
"format": "uuid",
"type": "string"
}
},
"required": [
"workspace_id",
"member_id"
],
"type": "object"
}
post_dm_message
Post DM message. Post a message as the authenticated member into an existing 1:1 DM conversation, and return the stored message. The caller must be one of the two participants. Provide body, content or both; when body is empty it is derived from content, and a call with neither is refused. @handle mentions in the text are recorded and notified, and a message from a human clears the DM thread's declared agent status. Get the conversation id from open_dm_conversation or list_dm_conversations; post into a channel thread with post_message and into a group DM with post_group_dm_message. Requires message:post.
Capability: message:post
Hints: readOnlyHint: false, destructiveHint: false, idempotentHint: false, openWorldHint: false
{
"anyOf": [
{
"required": [
"body"
]
},
{
"required": [
"content"
]
}
],
"properties": {
"body": {
"description": "Plain-text message body, which is what search indexes; omit when sending typed content, and it is then derived from the content blocks.",
"type": "string"
},
"content": {
"description": "Optional typed content blocks, each an object with a type of text (text), code (code, optional language), tool_use (id, name, input), tool_result (tool_use_id, content, optional is_error) or resource_link (uri, optional mime_type and title). Required when body is omitted.",
"items": {
"properties": {
"type": {
"enum": [
"text",
"code",
"tool_use",
"tool_result",
"resource_link"
],
"type": "string"
}
},
"required": [
"type"
],
"type": "object"
},
"type": "array"
},
"dm_conversation_id": {
"description": "UUID of the 1:1 DM conversation to post in, as returned by open_dm_conversation or list_dm_conversations. The caller must be one of its two members.",
"format": "uuid",
"type": "string"
},
"metadata": {
"description": "Optional JSON object of caller-defined metadata stored with the message. Defaults to an empty object.",
"type": "object"
}
},
"required": [
"dm_conversation_id"
],
"type": "object"
}
create_channel
Create channel. Create a channel in a workspace. Requires workspace:write, the same capability as POST /workspaces/{wid}/channels. A private channel adds the caller as its admin so they are not locked out.
Capability: workspace:write
Hints: readOnlyHint: false, destructiveHint: false, idempotentHint: true, openWorldHint: false
{
"properties": {
"name": {
"type": "string"
},
"private": {
"default": false,
"type": "boolean"
},
"topic": {
"type": "string"
},
"workspace_id": {
"format": "uuid",
"type": "string"
}
},
"required": [
"workspace_id",
"name"
],
"type": "object"
}
list_channels
List channels. List the channels of your own workspace that you can see: every public channel, the dm system channel, and the private channels you belong to, sorted by name. Each row has id, workspace_id, name, topic, private, created_at, updated_at and tombstoned_at. Use get_workspace_context to get channels together with threads in one call, and list_dm_conversations for your direct messages. Requires workspace:read.
Capability: workspace:read
Hints: readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false
{
"properties": {
"workspace_id": {
"description": "UUID of your own workspace (whoami returns it). A different workspace is refused.",
"format": "uuid",
"type": "string"
}
},
"required": [
"workspace_id"
],
"type": "object"
}
add_channel_member
Add channel member. Add a member to a channel, or change the role of one who is already in it: an existing member is overwritten with the role you pass, and omitting role sets member, which demotes a current admin. Use it to seat someone in a private channel; list_channel_members shows the roster and remove_channel_member takes someone out. The channel and the member must both be in your workspace, and a private channel is reachable only by its members. Returns the membership {channel_id, member_id, role, created_at} and writes a channel_member.add audit record. Requires channel:admin.
Capability: channel:admin
Hints: readOnlyHint: false, destructiveHint: true, idempotentHint: true, openWorldHint: false
{
"properties": {
"channel_id": {
"description": "UUID of the channel to add the member to. It must be in your workspace.",
"format": "uuid",
"type": "string"
},
"member_id": {
"description": "UUID of the member to add. The member must belong to the channel's workspace.",
"format": "uuid",
"type": "string"
},
"role": {
"default": "member",
"description": "member (the default, an ordinary participant) or admin (can manage the channel's membership). Applied to an existing member too, so omitting it on a current admin sets them back to member.",
"enum": [
"member",
"admin"
],
"type": "string"
}
},
"required": [
"channel_id",
"member_id"
],
"type": "object"
}
list_channel_members
List channel members. List a channel's explicit membership rows, oldest first, each as channel_id, member_id, role (member or admin) and created_at. Membership rows are what gate a private channel; a public channel is open to the whole workspace and is not required to have any. Use add_channel_member and remove_channel_member to change the list. The channel must be in the caller's workspace. Requires channel:admin.
Capability: channel:admin
Hints: readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false
{
"properties": {
"channel_id": {
"description": "UUID of the channel whose members to list. It must belong to the caller's workspace, otherwise the call returns not found.",
"format": "uuid",
"type": "string"
}
},
"required": [
"channel_id"
],
"type": "object"
}
remove_channel_member
Remove channel member. Delete a member's membership row from a channel, which is what gates access to a private channel, and write a channel_member.remove audit record. It returns {ok: true} even when the member held no row. The member must belong to the channel's workspace, otherwise the call returns not found. To add or re-role a member use add_channel_member, and to see current members use list_channel_members. Requires channel:admin.
Capability: channel:admin
Hints: readOnlyHint: false, destructiveHint: true, idempotentHint: true, openWorldHint: false
{
"properties": {
"channel_id": {
"description": "UUID of the channel to remove the member from. It must belong to the caller's workspace.",
"format": "uuid",
"type": "string"
},
"member_id": {
"description": "UUID of the member whose membership row to delete. It must be a member of the same workspace as the channel.",
"format": "uuid",
"type": "string"
}
},
"required": [
"channel_id",
"member_id"
],
"type": "object"
}
create_thread
Create thread. Create a thread in a channel. Requires workspace:write and access to the channel, the same rule as POST /channels/{cid}/threads. title, description (what the task asks for) and parent_thread_id are optional. A spawn the budget refuses is refused here too. With supersedes, the named thread (an open or in-review thread you may close: its producer, its claim holder, or a maintainer, with thread:transition) is closed as superseded by the new one in the same transaction, as close_abandoned_thread with duplicate_of would close it: its dependents move to the new thread and the open pull requests the change flow opened for it are handed to it, not withdrawn, and it does not hold its ticket against the new thread. Use it for a follow-up round of a task. Any refusal creates nothing.
Capability: workspace:write
Hints: readOnlyHint: false, destructiveHint: false, idempotentHint: false, openWorldHint: false
{
"properties": {
"attributes": {
"additionalProperties": false,
"description": "the task's attributes, stored with the thread (the shape set_thread_attributes takes, without thread_id)",
"properties": {
"acceptance": {
"description": "how a reviewer verifies the task; the worker must satisfy it",
"maxLength": 4000,
"type": "string"
},
"author_family": {
"description": "for a review: the provider family that wrote the change under review; claim_next never hands the thread to a claimer of that family. Once set it is kept: a later set neither clears nor changes it",
"enum": [
"anthropic",
"openai",
"google",
"xai",
"deepseek",
"zhipu"
],
"type": "string"
},
"engine": {
"enum": [
"unattended",
"session",
"human"
],
"type": "string"
},
"kind": {
"enum": [
"change",
"plan",
"review"
],
"type": "string"
},
"lane": {
"description": "the service lane it may run in: batch (async, cheapest) or flex; omitted runs at standard rates",
"enum": [
"batch",
"flex"
],
"type": "string"
},
"linear_issue": {
"description": "the Linear issue the task is for, such as ENG-123; where the workspace turned claim comments on, the claim and release are said on it",
"type": "string"
},
"repo": {
"description": "the repository the task changes, as owner/name (a GitHub URL is read as its owner/name); with linear_issue it says which half of a ticket the thread owns, where a workspace keeps [linear_issue, repo] unique",
"type": "string"
},
"size": {
"enum": [
"S",
"M",
"L"
],
"type": "string"
},
"threat_model": {
"type": "boolean"
},
"tier": {
"description": "the change's review tier; omitted reads as B in the metrics",
"enum": [
"A",
"B"
],
"type": "string"
}
},
"required": [
"kind"
],
"type": "object"
},
"channel_id": {
"format": "uuid",
"type": "string"
},
"description": {
"description": "What the task asks for, in the creator's words. The task's sheet shows it, and advice on the hand-off is read against it.",
"type": "string"
},
"footprint": {
"description": "the task's claim footprint, stored with the thread so the claim queue never sees it without one (the shape set_thread_footprint takes, without thread_id)",
"properties": {
"items": {
"items": {
"properties": {
"kind": {
"enum": [
"path",
"glob",
"crate",
"lane",
"branch",
"slot"
],
"type": "string"
},
"value": {
"type": "string"
}
},
"required": [
"kind",
"value"
],
"type": "object"
},
"maxItems": 200,
"type": "array"
},
"mode": {
"enum": [
"exclusive",
"shared"
],
"type": "string"
},
"repo": {
"description": "owner/name, or a GitHub clone URL",
"type": "string"
}
},
"required": [
"repo",
"mode"
],
"type": "object"
},
"parent_thread_id": {
"format": "uuid",
"type": "string"
},
"priority": {
"description": "dispatch priority, stored with the thread; higher is claimed first (default 0)",
"type": "integer"
},
"supersedes": {
"description": "a thread this one replaces, such as the previous round of the same task; it is closed as superseded by the new thread, which takes its dependents and its open pull requests",
"format": "uuid",
"type": "string"
},
"title": {
"type": "string"
}
},
"required": [
"channel_id"
],
"type": "object"
}
list_threads
List threads. List a channel's live threads, oldest first by default or newest first with order=newest, keyset-paginated. Default 100 (max 500); pass cursor=
Capability: workspace:read
Hints: readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false
{
"properties": {
"channel_id": {
"format": "uuid",
"type": "string"
},
"cursor": {
"description": "Exclusive keyset cursor: the prior page's last thread id.",
"format": "uuid",
"type": "string"
},
"limit": {
"default": 100,
"description": "Max threads to return (clamped 1..=500).",
"type": "integer"
},
"order": {
"description": "Direction of the keyset walk (default oldest).",
"enum": [
"oldest",
"newest"
],
"type": "string"
},
"result_kind": {
"description": "Only threads whose stored result carries this result_kind.",
"type": "string"
},
"since": {
"description": "Only threads created at or after this RFC 3339 instant.",
"format": "date-time",
"type": "string"
},
"status": {
"description": "Only threads whose declared status is this one (working, needs_input, needs_review, blocked, done).",
"type": "string"
}
},
"required": [
"channel_id"
],
"type": "object"
}
list_child_threads
List child threads. List a parent thread's child threads, oldest first, each as a thread object plus message_count, the number of its live messages. This gives a threaded view of N replies per child without loading any child's messages; tombstoned children are excluded. To read the messages inside a child, call list_messages with the child's id. Requires workspace:read.
Capability: workspace:read
Hints: readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false
{
"properties": {
"thread_id": {
"description": "UUID of the parent thread whose children to list. The caller must be able to read the thread's channel.",
"format": "uuid",
"type": "string"
}
},
"required": [
"thread_id"
],
"type": "object"
}
list_recently_active_threads
List recently active threads. A channel's threads ordered by last activity — most-recently-posted first. A post floats its thread to the top; a rename does not.
Capability: workspace:read
Hints: readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false
{
"properties": {
"channel_id": {
"format": "uuid",
"type": "string"
},
"limit": {
"default": 50,
"description": "Max threads to return (clamped 1..=200).",
"type": "integer"
}
},
"required": [
"channel_id"
],
"type": "object"
}
mute_thread
Mute thread. Mute a thread for yourself — the notification router stops routing this thread's activity to you, without leaving the channel or thread. Idempotent. Requires member:self.
Capability: member:self
Hints: readOnlyHint: false, destructiveHint: false, idempotentHint: true, openWorldHint: false
{
"properties": {
"thread_id": {
"format": "uuid",
"type": "string"
}
},
"required": [
"thread_id"
],
"type": "object"
}
unmute_thread
Unmute thread. Unmute a thread you previously muted. Returns unmuted=false if it was not muted. Requires member:self.
Capability: member:self
Hints: readOnlyHint: false, destructiveHint: false, idempotentHint: true, openWorldHint: false
{
"properties": {
"thread_id": {
"format": "uuid",
"type": "string"
}
},
"required": [
"thread_id"
],
"type": "object"
}
mute_channel
Mute channel. Mute a whole channel for yourself — the notification router stops routing its firehose (new-message notifications) to you, without leaving the channel. A mention still breaks through. Idempotent. Requires member:self.
Capability: member:self
Hints: readOnlyHint: false, destructiveHint: false, idempotentHint: true, openWorldHint: false
{
"properties": {
"channel_id": {
"format": "uuid",
"type": "string"
}
},
"required": [
"channel_id"
],
"type": "object"
}
unmute_channel
Unmute channel. Unmute a channel you previously muted. Returns unmuted=false if it was not muted. Requires member:self.
Capability: member:self
Hints: readOnlyHint: false, destructiveHint: false, idempotentHint: true, openWorldHint: false
{
"properties": {
"channel_id": {
"format": "uuid",
"type": "string"
}
},
"required": [
"channel_id"
],
"type": "object"
}
set_thread_budget
Set thread budget. REPLACE a thread's whole budget envelope. Every dimension must be stated — max_tokens, max_usd_micros ($1 = 1000000), max_turns, max_wall_secs — and null means no cap on that dimension. Omitting one is an error rather than a silent removal, because a removed cap never binds and the run it should have stopped keeps going. Use update_thread_budget to change some dimensions and leave the rest alone. An unrecognized key is rejected rather than ignored. Accumulated usage is preserved. When a dimension is exceeded, report_usage stops the run.
Capability: thread:transition
Hints: readOnlyHint: false, destructiveHint: true, idempotentHint: true, openWorldHint: false
{
"properties": {
"max_tokens": {
"type": "integer"
},
"max_turns": {
"type": "integer"
},
"max_usd_micros": {
"description": "USD in micros ($1 = 1000000)",
"type": "integer"
},
"max_wall_secs": {
"description": "wall-clock budget vs the working clock",
"type": "integer"
},
"thread_id": {
"format": "uuid",
"type": "string"
}
},
"required": [
"thread_id",
"max_tokens",
"max_usd_micros",
"max_turns",
"max_wall_secs"
],
"type": "object"
}
update_thread_budget
Update thread budget. Change only the budget dimensions you name, leaving the rest as they are. An omitted dimension is untouched; an explicit null clears that cap. Use this to raise or lower one limit without restating the others — set_thread_budget replaces the whole envelope. An unrecognized key is rejected rather than ignored.
Capability: thread:transition
Hints: readOnlyHint: false, destructiveHint: true, idempotentHint: true, openWorldHint: false
{
"properties": {
"max_tokens": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
]
},
"max_turns": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
]
},
"max_usd_micros": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"description": "USD in micros ($1 = 1000000)"
},
"max_wall_secs": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"description": "wall-clock budget vs the working clock"
},
"thread_id": {
"format": "uuid",
"type": "string"
}
},
"required": [
"thread_id"
],
"type": "object"
}
get_thread_budget
Get thread budget. Read a thread's budget envelope with the usage accumulated against it. The max_ fields (tokens, usd_micros where $1 is 1,000,000, turns, wall_secs) are null when that dimension has no cap, and the used_ fields include tokens, usd_micros, turns, wall_secs and the input, output and cache token splits. Returns null when no budget was set and no usage has been reported. Set caps with set_thread_budget or update_thread_budget, and record usage with report_usage; usage_rollup aggregates spend across a workspace, thread or member. Requires workspace:read and read access to the thread's channel.
Capability: workspace:read
Hints: readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false
{
"properties": {
"thread_id": {
"description": "UUID of the thread whose budget to read.",
"format": "uuid",
"type": "string"
}
},
"required": [
"thread_id"
],
"type": "object"
}
report_usage
Report usage. Record one retry-safe usage heartbeat for the claim you hold on a thread: token counts, the USD charge and the prices behind it. Maidan takes the reporter from your credential and the payer from the thread's workspace, and refuses the call unless you are the active holder of claim_lease_id. usd_micros must equal the charge computed from price_snapshot and tokens. Repeating an identical report returns the first outcome without charging twice; reusing the usage_report_id with different content is a conflict. If the thread's budget (tokens, USD, turns or wall time) is now exceeded, the run stops: the claim is released, a ClaimFailed event is appended and a dead-letter entry is recorded (see list_dlq). Returns the ledger entry with the updated budget, stopped and reason. Requires thread:transition.
Capability: thread:transition
Hints: readOnlyHint: false, destructiveHint: true, idempotentHint: true, openWorldHint: false
{
"additionalProperties": false,
"properties": {
"claim_lease_id": {
"description": "The fencing token of your active claim, from the claim response's thread.claim_lease_id. A stale or foreign token is refused.",
"format": "uuid",
"type": "string"
},
"evidence": {
"additionalProperties": false,
"description": "Optional context about the call: provider, service_tier, batch, harness, harness_version, effort, cache_key, cache_miss_reason, pack_sha256 (up to 32 SHA-256 hex digests of Maidan packs the call used) and standard_price. standard_price is allowed only for a cheaper-lane call (batch true, or service_tier batch or flex) and must price the same tokens at or above usd_micros.",
"properties": {
"batch": {
"type": "boolean"
},
"cache_key": {
"maxLength": 256,
"type": "string"
},
"cache_miss_reason": {
"maxLength": 512,
"type": "string"
},
"effort": {
"maxLength": 32,
"type": "string"
},
"harness": {
"maxLength": 64,
"type": "string"
},
"harness_version": {
"maxLength": 64,
"type": "string"
},
"pack_sha256": {
"items": {
"maxLength": 64,
"minLength": 64,
"type": "string"
},
"maxItems": 32,
"type": "array"
},
"provider": {
"maxLength": 64,
"type": "string"
},
"service_tier": {
"maxLength": 64,
"type": "string"
},
"standard_price": {
"additionalProperties": false,
"description": "the standard-tier price of a call in a cheaper lane (batch, or a batch or flex service_tier), so the usage rollup shows the lane saving as reported; refused on any other call, or if its charge for the reported tokens overflows or is below the charged amount",
"properties": {
"cache_read_usd_micros_per_million": {
"minimum": 0,
"type": "integer"
},
"cache_write_1h_usd_micros_per_million": {
"minimum": 0,
"type": "integer"
},
"cache_write_5m_usd_micros_per_million": {
"minimum": 0,
"type": "integer"
},
"input_usd_micros_per_million": {
"minimum": 0,
"type": "integer"
},
"output_usd_micros_per_million": {
"minimum": 0,
"type": "integer"
}
},
"required": [
"input_usd_micros_per_million",
"output_usd_micros_per_million",
"cache_read_usd_micros_per_million",
"cache_write_5m_usd_micros_per_million",
"cache_write_1h_usd_micros_per_million"
],
"type": "object"
}
},
"type": "object"
},
"model": {
"description": "Model id the provider's response named, 1 to 255 characters after trimming.",
"maxLength": 255,
"minLength": 1,
"type": "string"
},
"price_snapshot": {
"additionalProperties": false,
"description": "Rates used for this call in micro-USD per million tokens: input_usd_micros_per_million, output_usd_micros_per_million, cache_read_usd_micros_per_million, cache_write_5m_usd_micros_per_million and cache_write_1h_usd_micros_per_million, all required non-negative integers. Maidan stores them as reporter-supplied evidence and keeps no rate card.",
"properties": {
"cache_read_usd_micros_per_million": {
"minimum": 0,
"type": "integer"
},
"cache_write_1h_usd_micros_per_million": {
"minimum": 0,
"type": "integer"
},
"cache_write_5m_usd_micros_per_million": {
"minimum": 0,
"type": "integer"
},
"input_usd_micros_per_million": {
"minimum": 0,
"type": "integer"
},
"output_usd_micros_per_million": {
"minimum": 0,
"type": "integer"
}
},
"required": [
"input_usd_micros_per_million",
"output_usd_micros_per_million",
"cache_read_usd_micros_per_million",
"cache_write_5m_usd_micros_per_million",
"cache_write_1h_usd_micros_per_million"
],
"type": "object"
},
"thread_id": {
"description": "UUID of the thread you hold a claim on.",
"format": "uuid",
"type": "string"
},
"tokens": {
"additionalProperties": false,
"description": "Token counts for this call as {input, output, cache_read, cache_write_5m, cache_write_1h}, all required non-negative integers. input is uncached input only. A token budget counts input, output and both cache-write tiers; cache reads are priced into the charge but do not count toward a token budget.",
"properties": {
"cache_read": {
"description": "cached input; not part of a token budget",
"minimum": 0,
"type": "integer"
},
"cache_write_1h": {
"minimum": 0,
"type": "integer"
},
"cache_write_5m": {
"minimum": 0,
"type": "integer"
},
"input": {
"minimum": 0,
"type": "integer"
},
"output": {
"minimum": 0,
"type": "integer"
}
},
"required": [
"input",
"output",
"cache_read",
"cache_write_5m",
"cache_write_1h"
],
"type": "object"
},
"turns": {
"default": 0,
"description": "Model turns this report adds to the thread's turn count, a non-negative integer. Default 0.",
"type": "integer"
},
"usage_report_id": {
"description": "UUID you generate for this report, unique across all reports. Reuse it only to retry the exact same report.",
"format": "uuid",
"type": "string"
},
"usd_micros": {
"description": "Charge for this call in micro-USD ($1 = 1000000), a non-negative integer. Must equal the sum over the five token kinds of count times rate per million, rounded up to a whole micro-dollar; a mismatch is refused.",
"minimum": 0,
"type": "integer"
}
},
"required": [
"thread_id",
"usage_report_id",
"claim_lease_id",
"model",
"tokens",
"usd_micros",
"price_snapshot"
],
"type": "object"
}
usage_rollup
Roll up usage. Spend, cache hit rate, cache write share, dollars saved against the uncached price, and cost per completed task. Scope is the workspace, or one thread, or one member. A completed task is a closed or archived thread that has not been tombstoned. Rates are parts per million of prompt tokens.
Capability: workspace:read
Hints: readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false
{
"additionalProperties": false,
"properties": {
"member_id": {
"format": "uuid",
"type": "string"
},
"thread_id": {
"format": "uuid",
"type": "string"
},
"workspace_id": {
"format": "uuid",
"type": "string"
}
},
"required": [
"workspace_id"
],
"type": "object"
}
list_dlq
List dead-lettered runs. A channel's agent-work dead-letter queue — runs stopped for exceeding their budget, newest first. Triage these (retry, raise the budget, give up).
Capability: workspace:read
Hints: readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false
{
"properties": {
"channel_id": {
"format": "uuid",
"type": "string"
},
"limit": {
"default": 50,
"description": "clamped 1..=200",
"type": "integer"
}
},
"required": [
"channel_id"
],
"type": "object"
}
get_tool_transcript
Get tool transcript. Read a thread's tool-call transcript: each tool_use block paired by id with its tool_result, in the order the calls were made, as entries with tool_use_id, name, input, the posting message and member, and the result (content and is_error) once one exists. Results whose call is outside the scanned window come back as orphan_results. Text and code blocks and message bodies are left out, which makes this much smaller than list_messages or get_thread_context when you only need what tools ran and what they returned. Tombstoned messages are skipped. Requires workspace:read.
Capability: workspace:read
Hints: readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false
{
"properties": {
"limit": {
"default": 200,
"description": "How many of the thread's oldest messages to scan for tool blocks. Defaults to 200, from 1 to 500. A longer thread is cut off at this count, so later calls are not included.",
"maximum": 500,
"minimum": 1,
"type": "integer"
},
"thread_id": {
"description": "UUID of the thread to read. The caller must be able to read the thread's channel.",
"format": "uuid",
"type": "string"
}
},
"required": [
"thread_id"
],
"type": "object"
}
assign_thread
Assign thread. Assign a thread to a member and hand it off, replacing any current holder: the new assignee gets a fresh claim_lease_id with no lease deadline and a reset working clock. Use claim_thread to take an unassigned thread yourself (it refuses when someone holds it) and unassign_thread to clear the assignee. Emits thread_assignment_changed carrying the previous assignee and your optional note, and returns the updated thread. The assignee must belong to the thread's workspace, and the call is refused for a review whose change the assignee's own model family wrote. Requires thread:transition.
Capability: thread:transition
Hints: readOnlyHint: false, destructiveHint: true, idempotentHint: false, openWorldHint: false
{
"properties": {
"assignee_id": {
"description": "UUID of the member to hand the thread to. The member must belong to the thread's workspace; the current assignee, if any, is replaced.",
"format": "uuid",
"type": "string"
},
"note": {
"description": "Handoff text delivered to subscribers on the thread_assignment_changed event. Omitted, the event carries no note.",
"type": "string"
},
"thread_id": {
"description": "UUID of the thread to assign. You must be able to read it.",
"format": "uuid",
"type": "string"
}
},
"required": [
"thread_id",
"assignee_id"
],
"type": "object"
}
claim_thread
Claim thread. Claim one specific thread by id, succeeding only when nobody holds it: returns {thread, claimed}, with claimed=false when it is already assigned (to anyone, you included). Use it when you already know which thread to take; use claim_next_thread or claim_next_workspace_thread to be handed the best available work instead. The claim carries no lease deadline, so it does not lapse: give it up with release_claim, and the returned thread's claim_lease_id is the fencing token that release_claim and set_thread_result ask for. Refused for an ended thread, a thread parked with mark_unclaimable or blocked with set_thread_block, and when you are at the workspace's work-in-progress limit; a successful claim emits thread_assignment_changed. Requires thread:transition.
Capability: thread:transition
Hints: readOnlyHint: false, destructiveHint: false, idempotentHint: true, openWorldHint: false
{
"properties": {
"thread_id": {
"description": "UUID of the thread to claim. You must be able to read it.",
"format": "uuid",
"type": "string"
}
},
"required": [
"thread_id"
],
"type": "object"
}
unassign_thread
Unassign thread. Clear a thread's assignee, whoever holds it, and return the updated thread. This also clears the claim lease, expiry and working clock, so the previous holder's fenced calls stop working, and it charges the time already worked to the thread's budget. It emits thread_assignment_changed naming the previous assignee, and succeeds even when the thread was already unassigned. For an agent giving up its own claim, use release_claim instead; to hand the thread to someone, use assign_thread. Requires thread:transition and read access to the thread's channel.
Capability: thread:transition
Hints: readOnlyHint: false, destructiveHint: true, idempotentHint: false, openWorldHint: false
{
"properties": {
"thread_id": {
"description": "UUID of the thread to unassign.",
"format": "uuid",
"type": "string"
}
},
"required": [
"thread_id"
],
"type": "object"
}
transition_thread
Transition thread. Advance a thread's FSM state (start_review, close, or archive). The MCP twin of REST POST /threads/:id. Separation of duties, the required-reviewers close-gate, and unresolved refutes all apply identically — there is no MCP bypass. On a thread with a review requirement, start_review is refused until a result is posted (set_thread_result). Returns the updated thread.
Capability: thread:transition
Hints: readOnlyHint: false, destructiveHint: true, idempotentHint: false, openWorldHint: false
{
"properties": {
"action": {
"description": "start_review (open to in_review), close (in_review to closed) or archive (closed to archived). To send work back, use submit_review with request_changes",
"enum": [
"start_review",
"close",
"archive"
],
"type": "string"
},
"thread_id": {
"format": "uuid",
"type": "string"
}
},
"required": [
"thread_id",
"action"
],
"type": "object"
}
close_abandoned_thread
Close abandoned thread. Close an open or in-review thread that will not land, as a duplicate, abandoned, or superseded. The MCP twin of REST POST /threads/:id/close-abandoned. Allowed for the thread's producer, its claim holder, or a maintainer, and audited as thread.close_abandoned. A thread with a result keeps every landing gate (separation of duties, required reviewers, land gate); a thread with no result skips the review gates. A duplicate records a duplicates reference to duplicate_of; a superseded thread records duplicate_of supersedes it. Each open dependent of a duplicate or superseded thread then depends on duplicate_of instead and gets a notice, unless the move would make a cycle; an abandoned thread's dependents keep waiting. A superseded thread with duplicate_of hands the open pull requests the change flow opened for it (not a watched or session-registered one) to duplicate_of, which must be open or in review and not already tracking an open pull request in the same repository: they stay open and queued, and its rounds deliver to them. Every other close withdraws them (out of the merge queue, then closed). Returns the closed thread.
Capability: thread:transition
Hints: readOnlyHint: false, destructiveHint: true, idempotentHint: false, openWorldHint: false
{
"properties": {
"duplicate_of": {
"description": "The thread that covers this one: required for duplicate, optional for superseded, refused for abandoned. Must be a live thread you can read in the same workspace. A superseded thread's open pull requests move to it",
"format": "uuid",
"type": "string"
},
"reason": {
"description": "Why the thread is closed without landing",
"enum": [
"duplicate",
"abandoned",
"superseded"
],
"type": "string"
},
"thread_id": {
"format": "uuid",
"type": "string"
}
},
"required": [
"thread_id",
"reason"
],
"type": "object"
}
list_assigned_threads
List assigned threads. List the live threads currently assigned to one member, oldest first: that member's work queue. Each item is a full thread. Threads the caller cannot read are left out, so the list can be shorter than the member's real queue. It covers any member of the caller's workspace; for what a member must act on beyond assignments (requested reviews, open approval gates, mentions) use get_waiting_inbox, and for a count against the WIP limit use get_member_wip. Requires workspace:read.
Capability: workspace:read
Hints: readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false
{
"properties": {
"member_id": {
"description": "UUID of the member whose assigned threads to list. It must belong to the caller's workspace, otherwise the call returns not found.",
"format": "uuid",
"type": "string"
}
},
"required": [
"member_id"
],
"type": "object"
}
set_wait
Set wait. Set (upsert) a wait timer on a thread: it is waiting until wait_until, and on timeout the sweeper escalates via on_timeout but decides nothing (notify reaches the owner; park also marks the thread unclaimable). Default policy is notify. Cancel it when the awaited thing happens. Requires thread:transition. This returns at once and does not block; to block until something happens, use a wait_for_* tool such as wait_for_result or wait_for_ready.
Capability: thread:transition
Hints: readOnlyHint: false, destructiveHint: true, idempotentHint: false, openWorldHint: false
{
"properties": {
"on_timeout": {
"default": "notify",
"description": "escalation policy on timeout",
"enum": [
"notify",
"park"
],
"type": "string"
},
"reason": {
"description": "why the thread is waiting",
"type": "string"
},
"thread_id": {
"format": "uuid",
"type": "string"
},
"wait_until": {
"description": "deadline (RFC 3339)",
"format": "date-time",
"type": "string"
}
},
"required": [
"thread_id",
"wait_until"
],
"type": "object"
}
cancel_wait
Cancel wait. Cancel a thread's wait — the awaited thing happened (G2). {cancelled} is false when no wait was set. Requires thread:transition.
Capability: thread:transition
Hints: readOnlyHint: false, destructiveHint: true, idempotentHint: true, openWorldHint: false
{
"properties": {
"thread_id": {
"format": "uuid",
"type": "string"
}
},
"required": [
"thread_id"
],
"type": "object"
}
get_wait
Get wait. Read the wait timer on one thread: an object with wait_until, on_timeout (notify or park), an optional reason, created_by, created_at and fired_at, or null when no wait is set. fired_at is empty until the sweeper has escalated the wait after wait_until passed. This only reads the timer; to set or remove it use set_wait or cancel_wait, and to block until an event happens use a wait_for_* tool. Requires workspace:read.
Capability: workspace:read
Hints: readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false
{
"properties": {
"thread_id": {
"description": "UUID of the thread whose wait timer to read. A thread has at most one wait. The caller must be able to read the thread's channel.",
"format": "uuid",
"type": "string"
}
},
"required": [
"thread_id"
],
"type": "object"
}
set_priority
Set priority. Set (upsert) a thread's dispatch priority (G3 fair dispatch). Higher = more urgent (default 0). claim_next orders by an effective rank = this priority aged up the longer the thread waits, so priority jumps the queue without starving long-waiting tasks. Requires thread:transition.
Capability: thread:transition
Hints: readOnlyHint: false, destructiveHint: true, idempotentHint: true, openWorldHint: false
{
"properties": {
"priority": {
"description": "higher = more urgent; default 0",
"type": "integer"
},
"thread_id": {
"format": "uuid",
"type": "string"
}
},
"required": [
"thread_id",
"priority"
],
"type": "object"
}
get_priority
Get priority. Read a thread's dispatch-priority record: priority (an integer, higher is more urgent), set_by and set_at. Returns null when no priority was ever set, which dispatch treats as the default priority 0. claim_next_thread orders by this priority aged up with waiting time. Change it with set_priority. Requires workspace:read and read access to the thread's channel.
Capability: workspace:read
Hints: readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false
{
"properties": {
"thread_id": {
"description": "UUID of the thread whose priority record to read.",
"format": "uuid",
"type": "string"
}
},
"required": [
"thread_id"
],
"type": "object"
}
mark_unclaimable
Mark unclaimable. Park a thread from dispatch (G3): claim_next skips it and an explicit claim is refused, until cleared. An explicit park (needs triage, waiting on external, broken) — distinct from blocked-by-deps / blocked-by-gate / skill-miss. Reason must be non-empty. Requires thread:transition.
Capability: thread:transition
Hints: readOnlyHint: false, destructiveHint: true, idempotentHint: true, openWorldHint: false
{
"properties": {
"reason": {
"description": "why the thread is parked",
"type": "string"
},
"thread_id": {
"format": "uuid",
"type": "string"
}
},
"required": [
"thread_id",
"reason"
],
"type": "object"
}
cancel_thread
Cancel thread. Cancel a task: close it without its work being done, park it from dispatch with the reason, and end any live claim, so the worker's next renew_claim is refused. The reason (1 to 500 characters) is posted on the thread. Requires workspace:write; without thread:transition only the member that created the thread may cancel it. Cancelling an already-cancelled thread returns the first cancel; a thread closed some other way is refused. The REST twin is POST /threads/{id}/cancel.
Capability: workspace:write
Hints: readOnlyHint: false, destructiveHint: true, idempotentHint: true, openWorldHint: false
{
"properties": {
"reason": {
"description": "why the task is cancelled, posted on the thread",
"maxLength": 500,
"minLength": 1,
"type": "string"
},
"thread_id": {
"format": "uuid",
"type": "string"
}
},
"required": [
"thread_id",
"reason"
],
"type": "object"
}
mark_claimable
Mark claimable. Un-park a thread (G3) — it becomes claimable again. {cleared} is false when it was not parked. Requires thread:transition.
Capability: thread:transition
Hints: readOnlyHint: false, destructiveHint: true, idempotentHint: true, openWorldHint: false
{
"properties": {
"thread_id": {
"format": "uuid",
"type": "string"
}
},
"required": [
"thread_id"
],
"type": "object"
}
list_unclaimable
List unclaimable. List the threads parked from dispatch in a channel, newest first, as {thread_id, reason, marked_by, marked_at} rows. A parked thread is skipped by claim_next_thread and refuses claim_thread until mark_claimable clears it; park one with mark_unclaimable. Use it to triage parked work. Threads held by an explicit block reason are a separate list, list_blocked_threads. Requires workspace:read and read access to the channel.
Capability: workspace:read
Hints: readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false
{
"properties": {
"channel_id": {
"description": "UUID of the channel to inspect. You must be able to read it.",
"format": "uuid",
"type": "string"
}
},
"required": [
"channel_id"
],
"type": "object"
}
set_thread_block
Set thread block. Set (upsert) an explicit dispatch block on a thread (G14): claim_next skips it and an explicit claim is refused, until cleared. reason is the closed enum dag|gate|human|child|quota|unclaimable — not a free string. Distinct from DAG-children-must-be-terminal. Requires thread:transition.
Capability: thread:transition
Hints: readOnlyHint: false, destructiveHint: true, idempotentHint: true, openWorldHint: false
{
"properties": {
"reason": {
"enum": [
"dag",
"gate",
"human",
"child",
"quota",
"unclaimable"
],
"type": "string"
},
"thread_id": {
"format": "uuid",
"type": "string"
}
},
"required": [
"thread_id",
"reason"
],
"type": "object"
}
get_thread_block
Get thread block. Read the explicit dispatch block on one thread: an object with thread_id, reason, set_by, set_at and an optional note, or null when the thread is not blocked. While a block exists, claim_next_thread skips the thread and an explicit claim is refused. To see every blocked thread in a channel use list_blocked_threads; to place or lift a block use set_thread_block or clear_thread_block. Requires workspace:read.
Capability: workspace:read
Hints: readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false
{
"properties": {
"thread_id": {
"description": "UUID of the thread whose block to read. The caller must be able to read the thread's channel.",
"format": "uuid",
"type": "string"
}
},
"required": [
"thread_id"
],
"type": "object"
}
clear_thread_block
Clear thread block. Clear an explicit dispatch block (G14). Emits BlockedResolved so waiters can observe the unblock. {cleared} is false when it was not blocked. Requires thread:transition.
Capability: thread:transition
Hints: readOnlyHint: false, destructiveHint: true, idempotentHint: true, openWorldHint: false
{
"properties": {
"thread_id": {
"format": "uuid",
"type": "string"
}
},
"required": [
"thread_id"
],
"type": "object"
}
list_blocked_threads
List blocked threads. List the threads in one channel that carry an explicit block, newest first, each as thread_id, reason (dag, gate, human, child, quota or unclaimable), set_by, set_at and an optional note. These are blocks placed with set_thread_block. Stalls that only get_queue_depth counts, such as an unfinished dependency, a pending approval gate or a footprint conflict, do not appear here. For threads parked from dispatch use list_unclaimable. Requires workspace:read.
Capability: workspace:read
Hints: readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false
{
"properties": {
"channel_id": {
"description": "UUID of the channel whose explicitly blocked threads to list. The caller must be able to read the channel.",
"format": "uuid",
"type": "string"
}
},
"required": [
"channel_id"
],
"type": "object"
}
declare_status
Declare thread status. Declare the agent's self-reported status on a thread: working, needs_input, needs_review, blocked, or done, with a one-sentence note. By the claim holder or owner; stalled is refused (system-computed only). Supersedes any prior declaration. Appends StatusDeclared. Requires thread:transition.
Capability: thread:transition
Hints: readOnlyHint: false, destructiveHint: true, idempotentHint: false, openWorldHint: false
{
"properties": {
"note": {
"description": "One-sentence description of what the agent is doing",
"type": "string"
},
"status": {
"enum": [
"working",
"needs_input",
"needs_review",
"blocked",
"done"
],
"type": "string"
},
"thread_id": {
"format": "uuid",
"type": "string"
}
},
"required": [
"thread_id",
"status",
"note"
],
"type": "object"
}
get_thread_status
Get thread status. Read the agent status declaration currently active on a thread: status (working, needs_input, needs_review, blocked or done), a one-line note, declared_by and declared_at. Returns null when none is active; a declaration is cleared by a human reply, by a newer declaration, or when the declarer's claim ends. This is what the agent says it is doing, not the thread's workflow state. The holder sets it with declare_status. Requires workspace:read and read access to the thread's channel.
Capability: workspace:read
Hints: readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false
{
"properties": {
"thread_id": {
"description": "UUID of the thread whose status declaration to read.",
"format": "uuid",
"type": "string"
}
},
"required": [
"thread_id"
],
"type": "object"
}
get_thread_version
Get thread version. How many writes the thread's content has seen: its messages, result, title and description, and linked artifacts. The database moves it on every such write, so a decision can name the version it was shown. Requires workspace:read.
Capability: workspace:read
Hints: readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false
{
"properties": {
"thread_id": {
"format": "uuid",
"type": "string"
}
},
"required": [
"thread_id"
],
"type": "object"
}
get_review_packet
Get review packet. What the thread's current review was handed, recorded when it went to review: the thread version, the result's content hash and the linked artifacts' hashes, with the evidence root over them. Each item carries an attestation tier judged at the hand-off: verified (a land-gate pass the close gate accepts), attached (linked by a member who never worked the thread) or self_reported (a worker's own result or link). self_reported_only is true when every item is self-reported. Null before any review. Requires workspace:read.
Capability: workspace:read
Hints: readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false
{
"properties": {
"thread_id": {
"format": "uuid",
"type": "string"
}
},
"required": [
"thread_id"
],
"type": "object"
}
list_thread_artifacts
List thread artifacts. The artifacts linked to the thread as evidence, in the order they were linked, each with who linked it. Requires workspace:read.
Capability: workspace:read
Hints: readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false
{
"properties": {
"thread_id": {
"format": "uuid",
"type": "string"
}
},
"required": [
"thread_id"
],
"type": "object"
}
link_thread_artifact
Link thread artifact. Link an artifact your workspace holds to a thread as evidence, by its sha256. Upload it first; a hash your workspace does not hold is not found. Linking twice keeps the first link. Moves the thread's version. Requires workspace:write.
Capability: workspace:write
Hints: readOnlyHint: false, destructiveHint: false, idempotentHint: true, openWorldHint: false
{
"properties": {
"sha256": {
"description": "the artifact's sha256, hex",
"type": "string"
},
"thread_id": {
"format": "uuid",
"type": "string"
}
},
"required": [
"thread_id",
"sha256"
],
"type": "object"
}
unlink_thread_artifact
Unlink thread artifact. Unlink an artifact from a thread. Returns whether it was linked. Moves the thread's version when it was. Requires workspace:write.
Capability: workspace:write
Hints: readOnlyHint: false, destructiveHint: true, idempotentHint: true, openWorldHint: false
{
"properties": {
"sha256": {
"description": "the artifact's sha256, hex",
"type": "string"
},
"thread_id": {
"format": "uuid",
"type": "string"
}
},
"required": [
"thread_id",
"sha256"
],
"type": "object"
}
add_evidence_record
Add evidence record. Record evidence on a thread: a test_run, ci_run, diff, review_verdict, screenshot (by URL) or note, with where it came from. Give at least one of url, sha256 or note; a screenshot needs a url and a note needs a note. Publishes evidence_added. Does not move the thread's version. Requires workspace:write.
Capability: workspace:write
Hints: readOnlyHint: false, destructiveHint: false, idempotentHint: false, openWorldHint: false
{
"properties": {
"kind": {
"enum": [
"test_run",
"ci_run",
"diff",
"review_verdict",
"screenshot",
"note"
],
"type": "string"
},
"note": {
"description": "at most 4000 characters",
"type": "string"
},
"sha256": {
"description": "a sha256, 64 hex characters",
"type": "string"
},
"source": {
"description": "where the evidence came from, 1 to 200 characters",
"type": "string"
},
"thread_id": {
"format": "uuid",
"type": "string"
},
"url": {
"description": "an http or https URL",
"type": "string"
}
},
"required": [
"thread_id",
"kind",
"source"
],
"type": "object"
}
list_evidence_records
List evidence records. The evidence recorded on the thread, oldest first, each with its kind, source, who recorded it and when. Requires workspace:read.
Capability: workspace:read
Hints: readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false
{
"properties": {
"thread_id": {
"format": "uuid",
"type": "string"
}
},
"required": [
"thread_id"
],
"type": "object"
}
set_wip_limit
Set WIP limit. Set or clear this workspace's WIP limit (G11): the max concurrent live claims any one member may hold. limit >= 0 caps it (0 freezes claiming); omit or null clears it (unlimited). Applies to your own workspace. Requires workspace:write.
Capability: workspace:write
Hints: readOnlyHint: false, destructiveHint: true, idempotentHint: true, openWorldHint: false
{
"properties": {
"limit": {
"anyOf": [
{
"minimum": 0,
"type": "integer"
},
{
"type": "null"
}
],
"description": "max concurrent live claims per member; null/omit = unlimited"
}
},
"type": "object"
}
set_delegation_policy
Set delegation policy. Set the longest a delegation grant may live in this workspace, in days (1 to 3650); omit or null to restore the default of 90. A grant is the standing authority to keep minting delegated tokens, so this bounds real exposure. Applies to grants issued afterwards. Requires token:admin.
Capability: token:admin
Hints: readOnlyHint: false, destructiveHint: true, idempotentHint: true, openWorldHint: false
{
"additionalProperties": false,
"properties": {
"max_grant_days": {
"anyOf": [
{
"maximum": 3650,
"minimum": 1,
"type": "integer"
},
{
"type": "null"
}
],
"description": "grant lifetime ceiling in days; null/omit = the default, 90"
}
},
"type": "object"
}
get_delegation_policy
Get delegation policy. Return your workspace's delegation policy {workspace_id, max_grant_days, is_default}. max_grant_days is the longest, in days, that a delegation grant may live, and is_default is true when the workspace has set nothing and the default of 90 days applies. Change it with set_delegation_policy and list existing grants with list_delegation_grants. Takes no arguments. Requires workspace:read.
Capability: workspace:read
Hints: readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false
{
"properties": {},
"type": "object"
}
set_retention_policy
Set retention policy. Replace this workspace's own retention for its messages, events, finished deliveries and unreferenced media, in days (1 to 3650 each), and its media quota in bytes. A workspace may keep rows for less time than the instance does, never longer, and hold less media, never more: a value above the instance's is refused. Omit or null a kind to keep it as long as the instance does; no arguments clears the policy. Old messages are erased with their embeddings and content keys. A workspace under legal hold loses nothing whatever its policy says. Requires token:admin.
Capability: token:admin
Hints: readOnlyHint: false, destructiveHint: true, idempotentHint: true, openWorldHint: false
{
"additionalProperties": false,
"properties": {
"deliveries_days": {
"anyOf": [
{
"maximum": 3650,
"minimum": 1,
"type": "integer"
},
{
"type": "null"
}
],
"description": "days to keep finished deliveries; null/omit = as long as the instance"
},
"events_days": {
"anyOf": [
{
"maximum": 3650,
"minimum": 1,
"type": "integer"
},
{
"type": "null"
}
],
"description": "days to keep event-log rows; null/omit = as long as the instance"
},
"media_days": {
"anyOf": [
{
"maximum": 3650,
"minimum": 1,
"type": "integer"
},
{
"type": "null"
}
],
"description": "days to keep an attachment, screenshot or recording once nothing in the workspace references it; null/omit = as long as the instance"
},
"media_quota_bytes": {
"anyOf": [
{
"minimum": 1,
"type": "integer"
},
{
"type": "null"
}
],
"description": "bytes of attachments, screenshots and recordings the workspace may hold; null/omit = the instance's quota"
},
"messages_days": {
"anyOf": [
{
"maximum": 3650,
"minimum": 1,
"type": "integer"
},
{
"type": "null"
}
],
"description": "days to keep messages; null/omit = as long as the instance (forever)"
}
},
"type": "object"
}
get_retention_policy
Get retention policy. This workspace's retention: what it set (workspace), what the instance keeps (instance), and what is pruned in effect, the shorter of the two per kind (effective). Days per kind; null means not pruned.
Capability: workspace:read
Hints: readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false
{
"properties": {},
"type": "object"
}
get_wip_limit
Get WIP limit. Return {limit}: your workspace's WIP limit, the most live claims one member may hold at once, or null when none is set (unlimited). While a member is at the limit, claim_thread refuses a new claim and claim_next_thread returns null; a limit of 0 stops all new claims. Change it with set_wip_limit, and compare one member's live claims against it with get_member_wip. Takes no arguments. Requires workspace:read.
Capability: workspace:read
Hints: readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false
{
"properties": {},
"type": "object"
}
set_spawn_budget
Set spawn budget. Set this workspace's spawn budget (G6): how far an agent family may fan out. max_children caps the direct child threads per parent, max_depth the thread nesting, max_tools the tool calls recorded on one thread. A full replace — an omitted or null axis is unlimited, so calling with no arguments clears the budget; 0 freezes an axis. Keep the caps small: coordination cost grows quadratically in the number of agents. Requires workspace:write.
Capability: workspace:write
Hints: readOnlyHint: false, destructiveHint: true, idempotentHint: true, openWorldHint: false
{
"properties": {
"max_children": {
"anyOf": [
{
"minimum": 0,
"type": "integer"
},
{
"type": "null"
}
],
"description": "max direct child threads per parent; null = unlimited"
},
"max_depth": {
"anyOf": [
{
"minimum": 0,
"type": "integer"
},
{
"type": "null"
}
],
"description": "max thread nesting depth (a root thread is depth 1); null = unlimited"
},
"max_tools": {
"anyOf": [
{
"minimum": 0,
"type": "integer"
},
{
"type": "null"
}
],
"description": "max tool calls recorded on one thread; null = unlimited"
}
},
"type": "object"
}
get_spawn_budget
Get spawn budget. This workspace's spawn budget as {max_children, max_depth, max_tools}; a null axis is unlimited. Read it before spawning helpers to see how much fan-out is left.
Capability: workspace:read
Hints: readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false
{
"properties": {},
"type": "object"
}
get_member_wip
Get member WIP. A member's current live-claim count against the workspace WIP limit ({live_claims, limit}) — for backpressure decisions before claiming more work.
Capability: workspace:read
Hints: readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false
{
"properties": {
"member_id": {
"format": "uuid",
"type": "string"
}
},
"required": [
"member_id"
],
"type": "object"
}
claim_next_thread
Claim next thread. Claim the next piece of work in one channel: the claimable thread with the highest priority (aged up by hours waited), oldest first among equals, leased to you. Use claim_next_workspace_thread to draw from every channel you can read in one call, and claim_thread to take one thread you already know by id. Claimable means open, unassigned or its lease lapsed, dependencies finished, skills held, no pending approval gate, not parked or blocked, and you not frozen. Returns the thread with its claim_lease_id (the fencing token that renew_claim, acknowledge_claim and release_claim ask for), its attributes and a content-addressed pin {uri, content_hash}, or null when nothing is claimable or you are at the workspace's work-in-progress limit; taking over a lapsed lease emits claim_expired for the dead holder, and every claim emits thread_assignment_changed. Requires thread:transition.
Capability: thread:transition
Hints: readOnlyHint: false, destructiveHint: false, idempotentHint: false, openWorldHint: false
{
"properties": {
"channel_id": {
"description": "UUID of the channel to claim from. You must be able to read it.",
"format": "uuid",
"type": "string"
},
"engine": {
"description": "only claim a thread routed to this engine, for a worker that serves one kind of work; a thread routed to another engine, or not routed at all, is then never claimed. Omitted, any work",
"enum": [
"unattended",
"session",
"human"
],
"type": "string"
},
"kind": {
"description": "only claim a thread of this kind (change, plan or review; a thread that names no kind is a change). A review seat claims with kind review and its repo, and no engine, to take every review in that repository whatever engine wrote the change. Combines with repo, engine and lane. Omitted, any kind",
"enum": [
"change",
"plan",
"review"
],
"type": "string"
},
"lane": {
"description": "the service lane this worker runs in; lane breaks ties, never filters: among threads of equal priority and wait, threads in this lane come first, then unlaned ones, then other lanes. Omitted, unlaned threads win the tie",
"enum": [
"batch",
"flex"
],
"type": "string"
},
"lease_secs": {
"description": "lease in seconds (1 s to 7 days); renew before it lapses, or the thread is reaped and returns to the queue with a ClaimExpired. Omitted, the server's default lease applies (MAIDAN_CLAIM_DEFAULT_LEASE_SECS, 600 s)",
"maximum": 604800,
"minimum": 1,
"type": "integer"
},
"repo": {
"description": "only claim a thread whose footprint names this repository (owner/name or a GitHub clone URL), or a review whose repo attribute names it, for a worker whose checkout is that repository; any other thread without a footprint is then never claimed. Omitted, any work",
"type": "string"
}
},
"required": [
"channel_id"
],
"type": "object"
}
claim_next_workspace_thread
Claim next workspace thread. Claim the next piece of work across every channel of your workspace that you may read, in one call: the same selection, filters, lease and result as claim_next_thread, without the channel argument. Use claim_next_thread to draw from one channel only, claim_thread to take one thread by id, and get_workspace_queue_depth to count ready work before you ask. With wait_ms set and nothing claimable it holds the call open until work becomes claimable and claims it, so a worker needs no polling loop. A private channel's threads go only to its members and a DM's only to its participants. Returns the thread with its claim_lease_id, attributes and pin {uri, content_hash}, or null when nothing is claimable or you are at the workspace's work-in-progress limit. Requires thread:transition.
Capability: thread:transition
Hints: readOnlyHint: false, destructiveHint: false, idempotentHint: false, openWorldHint: false
{
"properties": {
"engine": {
"description": "only claim a thread routed to this engine, for a worker that serves one kind of work; a thread routed to another engine, or not routed at all, is then never claimed. Omitted, any work",
"enum": [
"unattended",
"session",
"human"
],
"type": "string"
},
"kind": {
"description": "only claim a thread of this kind (change, plan or review; a thread that names no kind is a change). A review seat claims with kind review and its repo, and no engine, to take every review in that repository whatever engine wrote the change. Combines with repo, engine and lane. Omitted, any kind",
"enum": [
"change",
"plan",
"review"
],
"type": "string"
},
"lane": {
"description": "the service lane this worker runs in; lane breaks ties, never filters: among threads of equal priority and wait, threads in this lane come first, then unlaned ones, then other lanes. Omitted, unlaned threads win the tie",
"enum": [
"batch",
"flex"
],
"type": "string"
},
"lease_secs": {
"description": "lease in seconds (1 s to 7 days); renew before it lapses, or the thread is reaped and returns to the queue with a ClaimExpired. Omitted, the server's default lease applies (MAIDAN_CLAIM_DEFAULT_LEASE_SECS, 600 s)",
"maximum": 604800,
"minimum": 1,
"type": "integer"
},
"repo": {
"description": "only claim a thread whose footprint names this repository (owner/name or a GitHub clone URL), or a review whose repo attribute names it, for a worker whose checkout is that repository; any other thread without a footprint is then never claimed. Omitted, any work",
"type": "string"
},
"wait_ms": {
"description": "with nothing claimable, wait up to this long for work to become claimable (a new thread, a dependency finishing, a claim released or expiring) and claim it, instead of answering null at once. The claimant's wake-up: no polling loop. Omitted or 0, one try",
"maximum": 300000,
"minimum": 0,
"type": "integer"
},
"workspace_id": {
"description": "your own workspace (whoami's workspace_id)",
"format": "uuid",
"type": "string"
}
},
"required": [
"workspace_id"
],
"type": "object"
}
renew_claim
Renew claim. Extend a claimed thread's lease (heartbeat). Only the current assignee holding the matching fencing token may renew; a stale holder whose claim was reclaimed is rejected.
Capability: thread:transition
Hints: readOnlyHint: false, destructiveHint: false, idempotentHint: false, openWorldHint: false
{
"properties": {
"claim_lease_id": {
"description": "the fencing token from the claim response's thread.claim_lease_id",
"format": "uuid",
"type": "string"
},
"lease_secs": {
"description": "new lease deadline in seconds from now (1 s to 7 days)",
"maximum": 604800,
"minimum": 1,
"type": "integer"
},
"thread_id": {
"format": "uuid",
"type": "string"
}
},
"required": [
"thread_id",
"claim_lease_id",
"lease_secs"
],
"type": "object"
}
acknowledge_claim
Acknowledge claim. Acknowledge a claimed thread and start its working clock (work_started_at): the current holder signals it has begun work, distinct from just holding the claim. Acknowledge as soon as you start: a leased claim left unacknowledged past the server's window (MAIDAN_CLAIM_ACK_TIMEOUT_SECS, 120 s) is reported to its owner with a claim_unacknowledged event. Only the assignee holding the matching fencing token may acknowledge; idempotent (the first start time is kept).
Capability: thread:transition
Hints: readOnlyHint: false, destructiveHint: false, idempotentHint: true, openWorldHint: false
{
"properties": {
"claim_lease_id": {
"description": "the fencing token from the claim response's thread.claim_lease_id",
"format": "uuid",
"type": "string"
},
"thread_id": {
"format": "uuid",
"type": "string"
}
},
"required": [
"thread_id",
"claim_lease_id"
],
"type": "object"
}
release_claim
Release claim. Release a claim (graceful handoff): the current holder returns the thread to the queue immediately by presenting its fencing token, instead of letting the lease lapse — e.g. an agent shutting down cleanly. Only the assignee holding the matching token may release. Clears the assignment and working clock and emits thread_assignment_changed. Pass decline: "own_family" when you let go of a review because its author_family is your own model family: claim_next then stops handing you that review, even before you have reported any usage, and every other member is still handed it. A decline on a thread that is not a review naming its author_family is refused and nothing is released. Pass decline: "unworkable" when you cannot work the thread at all (its head would not fetch, or it names nothing to work on): claim_next stops handing it to you and still hands it to everyone else.
Capability: thread:transition
Hints: readOnlyHint: false, destructiveHint: false, idempotentHint: true, openWorldHint: false
{
"properties": {
"claim_lease_id": {
"description": "the fencing token from the claim response's thread.claim_lease_id",
"format": "uuid",
"type": "string"
},
"decline": {
"description": "why you will not work this thread, so claim_next does not hand it back to you. own_family: a review whose author_family is your own model family. unworkable: any thread you cannot work (its head would not fetch, or it names nothing to work on). Omit for a plain release",
"enum": [
"own_family",
"unworkable"
],
"type": "string"
},
"thread_id": {
"format": "uuid",
"type": "string"
}
},
"required": [
"thread_id",
"claim_lease_id"
],
"type": "object"
}
release_own_claims
Release own claims. Release every live claim you hold in your workspace at once, for a claimant that restarted: its fencing tokens died with the old process, so release_claim cannot be called, and without this each task waits out its lease. Call it once per workspace at process start, before the first claim, and only when no other live process acts as the same member. Releases only the calling member's claims (there is no member argument), each exactly as release_claim does: the assignment, lease and working clock are cleared, a thread_assignment_changed carries the note, and the thread returns to the queue. A claim that changed hands meanwhile is left alone, a lapsed lease is left to the reaper, and the old process's next renew_claim or result write is refused. Returns {released}, the ids of the threads released, empty when you hold none.
Capability: thread:transition
Hints: readOnlyHint: false, destructiveHint: false, idempotentHint: true, openWorldHint: false
{
"properties": {
"note": {
"description": "why the claims were released, kept on each thread's assignment event, at most 2000 characters. Omitted, \"the claimant restarted\"",
"type": "string"
},
"workspace_id": {
"description": "your own workspace (whoami's workspace_id)",
"format": "uuid",
"type": "string"
}
},
"required": [
"workspace_id"
],
"type": "object"
}
set_thread_attributes
Set thread attributes. Replace a thread's task attributes in full. The kind says what sort of work it is (change, plan or review), the engine says who or what it is routed to (unattended, session or human), and threat_model marks work that needs a threat model. A claim_next that names an engine takes only work routed to that engine, so an unattended worker is never handed session or human work. A thread nobody described reads as a change with no engine and no threat model.
Capability: thread:transition
Hints: readOnlyHint: false, destructiveHint: true, idempotentHint: true, openWorldHint: false
{
"properties": {
"acceptance": {
"description": "how a reviewer verifies the task; the worker must satisfy it",
"maxLength": 4000,
"type": "string"
},
"author_family": {
"description": "for a review: the provider family that wrote the change under review; claim_next never hands the thread to a claimer of that family. Once set it is kept: a later set neither clears nor changes it",
"enum": [
"anthropic",
"openai",
"google",
"xai",
"deepseek",
"zhipu"
],
"type": "string"
},
"engine": {
"description": "omit to leave the work unrouted",
"enum": [
"unattended",
"session",
"human"
],
"type": "string"
},
"kind": {
"enum": [
"change",
"plan",
"review"
],
"type": "string"
},
"lane": {
"description": "the service lane it may run in: batch (async, cheapest) or flex; omitted runs at standard rates",
"enum": [
"batch",
"flex"
],
"type": "string"
},
"linear_issue": {
"description": "the Linear issue the task is for, such as ENG-123; where the workspace turned claim comments on, the claim and release are said on it",
"type": "string"
},
"repo": {
"description": "the repository the task changes, as owner/name (a GitHub URL is read as its owner/name); with linear_issue it says which half of a ticket the thread owns, where a workspace keeps [linear_issue, repo] unique",
"type": "string"
},
"size": {
"enum": [
"S",
"M",
"L"
],
"type": "string"
},
"thread_id": {
"format": "uuid",
"type": "string"
},
"threat_model": {
"type": "boolean"
},
"tier": {
"description": "the change's review tier; omitted reads as B in the metrics",
"enum": [
"A",
"B"
],
"type": "string"
}
},
"required": [
"thread_id",
"kind"
],
"type": "object"
}
watch_pull
Watch pull request. Watch a GitHub pull request's checks. Each change-sweep tick reads it once and records on its thread where the checks on its head stand (ci: status pending, success or failure, the failing jobs, and the last 4 KB of the first failing job's log), with a notice when it is first seen open (pr_opened), when a check fails (ci_failed) and when every check has finished (checks_done), each once per head commit. A pull request the workspace already tracks (one the change flow opened, or a session registered on its task) answers with its thread (created: false); otherwise a thread is made for it in channel_id, or the workspace's public pull-requests channel. The repository must be on this workspace's github or github_branch egress allowlist. A pull request another workspace tracks is a conflict.
Capability: workspace:write
Hints: readOnlyHint: false, destructiveHint: false, idempotentHint: true, openWorldHint: false
{
"properties": {
"channel_id": {
"description": "where a new watch thread goes; the workspace's pull-requests channel when omitted",
"format": "uuid",
"type": "string"
},
"pull_number": {
"minimum": 1,
"type": "integer"
},
"repo": {
"description": "owner/name",
"type": "string"
},
"title": {
"description": "a new watch thread's title; owner/name#N when omitted",
"type": "string"
},
"workspace_id": {
"format": "uuid",
"type": "string"
}
},
"required": [
"workspace_id",
"repo",
"pull_number"
],
"type": "object"
}
submit_plan
Submit plan. Make every child of a plan thread in one call. Only the member holding the plan thread's live claim can plan it, passing that claim's lease_id. Each child has a key unique in the plan, a title, and optional description, attributes, footprint and depends_on (keys of other children in the same plan). Children are created in the plan thread's channel with their dependency edges, so dependents stay off the queue until what they depend on lands; a child that closes without landing blocks its dependents, and the plan thread closes itself when its last child lands. Every child repository must be on this workspace's github_branch egress allowlist. A bad child, an unknown or cyclic depends_on, or too many children for the spawn budget creates nothing. Calling again from the same claim with the same keys answers the children already made (replayed: true); any other plan on a thread that has children is refused with error code -32010 and data.children.
Capability: workspace:write
Hints: readOnlyHint: false, destructiveHint: false, idempotentHint: true, openWorldHint: false
{
"properties": {
"children": {
"items": {
"additionalProperties": false,
"properties": {
"attributes": {
"description": "the child's task attributes (the shape set_thread_attributes takes, without thread_id)",
"type": "object"
},
"depends_on": {
"description": "keys of children that must land first",
"items": {
"type": "string"
},
"type": "array"
},
"description": {
"type": "string"
},
"footprint": {
"description": "the child's footprint (the shape set_thread_footprint takes, without thread_id)",
"type": "object"
},
"key": {
"description": "unique within this plan; depends_on names children by key",
"maxLength": 64,
"type": "string"
},
"test": {
"description": "the command that proves the child done; kept in its description",
"maxLength": 500,
"type": "string"
},
"title": {
"type": "string"
}
},
"required": [
"key",
"title",
"test",
"attributes",
"footprint"
],
"type": "object"
},
"maxItems": 50,
"minItems": 1,
"type": "array"
},
"lease_id": {
"description": "the fencing token from your claim on the plan thread",
"format": "uuid",
"type": "string"
},
"thread_id": {
"description": "the plan thread (kind plan) you hold the claim on",
"format": "uuid",
"type": "string"
}
},
"required": [
"thread_id",
"lease_id",
"children"
],
"type": "object"
}
amend_plan
Amend plan. Change a plan you already submitted, holding the plan thread's live claim (pass its lease_id). cancel names children to cancel; add gives new children (the shape submit_plan takes, depends_on may name any child of the plan); rewire sets a child's depends_on afresh. Cancel and add the same key to replace a child: its dependents wait for the new one. A cancelled child's dependents stop waiting for it. Only children that are open and unclaimed can be cancelled or rewired: a claimed or finished one is refused, as is a fourth amendment of the same plan (error code -32010). reason is kept on each cancelled child. Everything happens in one transaction, or nothing does. Added children are held for review when the plan is held or one of them needs a threat model.
Capability: workspace:write
Hints: readOnlyHint: false, destructiveHint: true, idempotentHint: false, openWorldHint: false
{
"properties": {
"add": {
"items": {
"additionalProperties": false,
"properties": {
"attributes": {
"type": "object"
},
"depends_on": {
"description": "keys of any children in the plan",
"items": {
"type": "string"
},
"type": "array"
},
"description": {
"type": "string"
},
"footprint": {
"type": "object"
},
"key": {
"maxLength": 64,
"type": "string"
},
"test": {
"maxLength": 500,
"type": "string"
},
"title": {
"type": "string"
}
},
"required": [
"key",
"title",
"test",
"attributes",
"footprint"
],
"type": "object"
},
"maxItems": 50,
"type": "array"
},
"cancel": {
"description": "keys of unclaimed children to cancel",
"items": {
"maxLength": 64,
"type": "string"
},
"maxItems": 50,
"type": "array"
},
"lease_id": {
"description": "the fencing token from your claim on the plan thread",
"format": "uuid",
"type": "string"
},
"reason": {
"description": "why the plan changed; kept on each cancelled child",
"maxLength": 500,
"type": "string"
},
"rewire": {
"items": {
"additionalProperties": false,
"properties": {
"depends_on": {
"items": {
"type": "string"
},
"type": "array"
},
"key": {
"maxLength": 64,
"type": "string"
}
},
"required": [
"key",
"depends_on"
],
"type": "object"
},
"maxItems": 50,
"type": "array"
},
"thread_id": {
"description": "the plan thread you hold the claim on",
"format": "uuid",
"type": "string"
}
},
"required": [
"thread_id",
"lease_id"
],
"type": "object"
}
set_thread_footprint
Set thread footprint. Declare what part of a repository this thread's work touches, so a swarm claiming from one queue never holds overlapping work. items lists {kind: path|glob|crate|lane|branch, value}; lane, crate and branch match exactly, path and glob by prefix (a glob counts up to its first wildcard). mode exclusive conflicts with any overlap, shared only with an exclusive one, and a branch is always exclusive. Footprints count only while the thread holds a live claim and free themselves when it ends. claim_next skips a thread whose footprint overlaps a live claim. On a claimed thread, a footprint that overlaps another live claim is refused with error code -32009 and data.conflicts (each with thread_id, assignee_id, lease_expires_at, kind, value), and nothing is stored: release the claim and requeue, or narrow the footprint. No items clears the footprint. repo is owner/name, or a GitHub clone URL.
Capability: thread:transition
Hints: readOnlyHint: false, destructiveHint: true, idempotentHint: true, openWorldHint: false
{
"properties": {
"items": {
"items": {
"properties": {
"kind": {
"description": "slot names a shared resource such as a build slot (rust-build), counted across the workspace against the capacity an operator set; the others name part of the repository",
"enum": [
"path",
"glob",
"crate",
"lane",
"branch",
"slot"
],
"type": "string"
},
"value": {
"type": "string"
}
},
"required": [
"kind",
"value"
],
"type": "object"
},
"maxItems": 200,
"type": "array"
},
"mode": {
"enum": [
"exclusive",
"shared"
],
"type": "string"
},
"repo": {
"description": "owner/name, or a GitHub clone URL",
"type": "string"
},
"thread_id": {
"format": "uuid",
"type": "string"
}
},
"required": [
"thread_id",
"repo",
"mode"
],
"type": "object"
}
list_active_claims
List active claims. List the workspace's live claims with their footprints (thread_id, assignee_id, lease_expires_at, repo, mode, items, attributes), in one repository when repo is given. Only threads you may read are listed. Use it to defer work whose footprint would overlap before claiming.
Capability: workspace:read
Hints: readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false
{
"properties": {
"repo": {
"description": "owner/name, or a GitHub clone URL",
"type": "string"
},
"workspace_id": {
"format": "uuid",
"type": "string"
}
},
"required": [
"workspace_id"
],
"type": "object"
}
add_thread_dependency
Add thread dependency. Add a task-dependency edge: the thread depends on depends_on_thread_id and stays blocked (won't be handed out by claim_next) until that dependency reaches a terminal state. Both threads must be in the same workspace.
Capability: thread:transition
Hints: readOnlyHint: false, destructiveHint: false, idempotentHint: true, openWorldHint: false
{
"properties": {
"depends_on_thread_id": {
"description": "the task it depends on",
"format": "uuid",
"type": "string"
},
"thread_id": {
"description": "the dependent task",
"format": "uuid",
"type": "string"
}
},
"required": [
"thread_id",
"depends_on_thread_id"
],
"type": "object"
}
list_thread_dependencies
List thread dependencies. List the threads a task depends on and whether the task is ready to run. Returns {dependencies: a list of {thread_id, depends_on_thread_id, created_at}, ready}; ready is true when every dependency is closed or archived, and also when there are none. A thread that is not ready is not handed out by claim_next. Add and remove edges with add_thread_dependency and remove_thread_dependency, and use list_thread_dependents for the reverse direction. Requires workspace:read.
Capability: workspace:read
Hints: readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false
{
"properties": {
"thread_id": {
"description": "UUID of the task thread whose dependencies to list. You must be able to read it.",
"format": "uuid",
"type": "string"
}
},
"required": [
"thread_id"
],
"type": "object"
}
get_queue_depth
Get queue depth. Count one channel's open task threads as {open, ready, assigned, blocked, unclaimable}, to decide whether to add or remove workers. The counts partition open: ready is what claim_next_thread could hand out now, assigned is held by an assignee with a live lease, blocked is stalled on an explicit block, an unfinished dependency, a pending approval gate or a footprint conflict, and unclaimable is withheld until someone acts (parked, at its budget, or already holding a result). Use get_workspace_queue_depth for every channel of the workspace, and get_channel_occupancy for the same channel when you need held work split into claimed and working. Counts only threads you may read; on the DM channel, your own DMs. Requires workspace:read.
Capability: workspace:read
Hints: readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false
{
"properties": {
"channel_id": {
"description": "UUID of the channel to count. You must be able to read it.",
"format": "uuid",
"type": "string"
}
},
"required": [
"channel_id"
],
"type": "object"
}
get_channel_occupancy
Get channel occupancy. Split one channel's open task threads into {open, queued, claimed, working, blocked} by what the holder is doing: claimed is held but not yet acknowledged with acknowledge_claim, and working is held and acknowledged, so a claimed count that stays high exposes an agent that took work and never started it. queued equals the ready count of get_queue_depth, and blocked is that tool's blocked plus unclaimable; the four buckets add up to open. Use get_queue_depth for the pool-sizing counts of the same channel, get_workspace_occupancy for the same split across the whole workspace, and get_run_occupancy for the threads of one producer run. Counts only threads you may read. Requires workspace:read.
Capability: workspace:read
Hints: readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false
{
"properties": {
"channel_id": {
"description": "UUID of the channel to count. You must be able to read it.",
"format": "uuid",
"type": "string"
}
},
"required": [
"channel_id"
],
"type": "object"
}
get_workspace_queue_depth
Get workspace queue depth. Count open task threads across every channel of your workspace that you may read, as {open, ready, assigned, blocked, unclaimable}: the sum of get_queue_depth over those channels, with the same field meanings. Use it to size a pool of workers that claim with claim_next_workspace_thread; use get_queue_depth for one channel, and get_workspace_occupancy for the claimed and working split. repo, engine and kind narrow the count exactly as they narrow claim_next_workspace_thread. With claimable_by set to me, only threads claim_next_workspace_thread would hand you count: reviews of your own model family's changes, threads you declined as your family's, threads needing a skill you lack, and everything while you are frozen are left out, so a seat can wake only when its own ready is above 0. A private channel's threads count only for its members and a DM's only for its participants. Requires workspace:read.
Capability: workspace:read
Hints: readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false
{
"properties": {
"claimable_by": {
"description": "me: count only the threads claim_next_workspace_thread would hand you. Omitted, every thread the other filters admit",
"enum": [
"me"
],
"type": "string"
},
"engine": {
"description": "count only threads routed to this engine, as claim_next_workspace_thread's engine. Omitted, any work",
"enum": [
"unattended",
"session",
"human"
],
"type": "string"
},
"kind": {
"description": "count only threads of this kind (change, plan or review; a thread that names no kind is a change), as claim_next_workspace_thread's kind. Omitted, any kind",
"enum": [
"change",
"plan",
"review"
],
"type": "string"
},
"repo": {
"description": "count only threads whose footprint names this repository (owner/name or a GitHub clone URL), or reviews whose repo attribute names it, as claim_next_workspace_thread's repo. Omitted, any work",
"type": "string"
},
"workspace_id": {
"description": "UUID of your own workspace (the workspace_id from whoami). Another workspace is refused.",
"format": "uuid",
"type": "string"
}
},
"required": [
"workspace_id"
],
"type": "object"
}
get_workspace_occupancy
Get workspace occupancy. Count your workspace's open task threads by stage, summed over every channel you can read, as {open, queued, claimed, working, blocked}. queued is claimable now, claimed is held on a live lease but not yet acknowledged, working is held and acknowledged, and blocked is parked or blocked; the last four add up to open. A private channel's threads count only for its members and a DM's only for its participants. Use get_channel_occupancy for one channel and get_workspace_queue_depth for the unclaimed-work view with filters. Requires workspace:read.
Capability: workspace:read
Hints: readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false
{
"properties": {
"workspace_id": {
"description": "UUID of your own workspace (whoami returns it). A different workspace is refused.",
"format": "uuid",
"type": "string"
}
},
"required": [
"workspace_id"
],
"type": "object"
}
register_thread_pull
Register thread pull request. Track a pull request the change flow did not open (yours, from a session) on its task's thread, so the change sweep refreshes it and get_swarm_metrics counts it: its time to ready runs from the task's CLAIM: comment (else claimed_at, else now) to the ready-to-merge label, and its merge closes the task. The repository must be in the workspace egress allowlist (github or github_branch). A pull request another thread tracks is refused. The twin of PUT /threads/{id}/pull.
Capability: workspace:write
Hints: readOnlyHint: false, destructiveHint: false, idempotentHint: true, openWorldHint: false
{
"properties": {
"claimed_at": {
"description": "when the task was claimed, for a claim said outside Maidan; a CLAIM: comment Maidan posted takes precedence",
"format": "date-time",
"type": "string"
},
"pull_number": {
"minimum": 1,
"type": "integer"
},
"repo": {
"description": "owner/name, or a GitHub clone URL",
"type": "string"
},
"thread_id": {
"format": "uuid",
"type": "string"
}
},
"required": [
"thread_id",
"repo",
"pull_number"
],
"type": "object"
}
get_swarm_metrics
Get swarm metrics. The workspace's swarm ramp metrics: per agent pull request the rounds it took, time to ready and to merge, whether it merged as delivered, its cost and whether it needs a look, with rollups per repository, engine, size, risk, provider and harness. Pull requests not yet seen closed are read from GitHub first when the server has a GitHub client. The twin of GET /workspaces/{id}/swarm-metrics.
Capability: workspace:read
Hints: readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: true
{
"properties": {
"behind_limit": {
"description": "commits behind at which a round's base is flagged stale (default 50)",
"type": "integer"
},
"engine": {
"enum": [
"unattended",
"session",
"human"
],
"type": "string"
},
"harness": {
"description": "only tasks mostly run by this harness (claude-code, cursor, codex, ...)",
"type": "string"
},
"kind": {
"enum": [
"change",
"plan",
"review"
],
"type": "string"
},
"linear_issue": {
"description": "only tasks for these Linear issues, comma-separated (ENG-123,ENG-124)",
"type": "string"
},
"provider": {
"description": "only tasks whose spend was mostly with this model provider, as usage reports named it (anthropic, openai, xai, ...)",
"type": "string"
},
"repo": {
"description": "owner/name or a GitHub clone URL; omitted, every repository",
"type": "string"
},
"rounds_limit": {
"description": "rounds after which an unmerged task is flagged non-converging (default 3)",
"type": "integer"
},
"since": {
"description": "only pull requests opened at or after this time",
"format": "date-time",
"type": "string"
},
"size": {
"enum": [
"S",
"M",
"L"
],
"type": "string"
},
"until": {
"description": "only pull requests opened before this time; with since, one window",
"format": "date-time",
"type": "string"
},
"workspace_id": {
"description": "your own workspace (whoami's workspace_id)",
"format": "uuid",
"type": "string"
}
},
"required": [
"workspace_id"
],
"type": "object"
}
get_credits
Get credits. The workspace's prepaid credits: balance_micros (USD micros, one USDC base unit each; below zero, overage went unpaid and the priced meters are cut off until a deposit covers it), whether this instance takes payment (enabled) and by which methods (usdc now; card next), the chain, receiving address and USDC contract, the overage price per meter, the open top-up intents and the recent ledger (deposits, charges, grants). Works past the allowance cutoff. The twin of GET /workspaces/{id}/credits.
Capability: workspace:read
Hints: readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false
{
"properties": {
"workspace_id": {
"description": "your own workspace (whoami's workspace_id)",
"format": "uuid",
"type": "string"
}
},
"required": [
"workspace_id"
],
"type": "object"
}
top_up_credits
Top up credits. Ask to be paid: opens a top-up intent for usd dollars. method usdc (the default) answers the exact amount to send (amount_micros USDC base units, the dollars plus a small offset that names your workspace), the receiving address, the chain and its id, the USDC contract, an EIP-681 wallet link and expires_at (24 hours). With a wallet, pay that exact amount of USDC on that chain yourself; once the transfer has its confirmations the balance is credited and a cutoff on a priced meter lifts. A different amount is not matched. Without a wallet, ask with method card and hand the checkout_url it answers to a person; card is the next rail, and an instance that has not configured it says so. get_credits lists the methods this instance offers. Moves no money. Call it when a call is refused as past the free allowance (HTTP 402, or a tool error naming the meter). Works past the cutoff. At most 20 open intents per workspace. The twin of POST /workspaces/{id}/credits/top-ups.
Capability: workspace:read
Hints: readOnlyHint: false, destructiveHint: false, idempotentHint: false, openWorldHint: false
{
"properties": {
"method": {
"description": "usdc (default): a USDC transfer on Base, which an agent with a wallet sends itself; card: a checkout link for a person",
"enum": [
"usdc",
"card"
],
"type": "string"
},
"usd": {
"description": "whole dollars to add, 1 to 10000",
"maximum": 10000,
"minimum": 1,
"type": "integer"
},
"workspace_id": {
"description": "your own workspace (whoami's workspace_id)",
"format": "uuid",
"type": "string"
}
},
"required": [
"usd",
"workspace_id"
],
"type": "object"
}
wait_for_event
Wait for event. Block until the first event of any of the listed kinds arrives in your workspace (or in one thread) and return {log_id, event}, or null when timeout_ms lapses. Use it to wait on several event kinds at once or to replay the log; wait_for_ready, wait_for_claim_expired, wait_for_claim_failed, wait_for_landed and wait_for_blocked_resolved fix one kind, wait_for_result and wait_for_memory_block return a payload instead of the event, and wait_for_mention and wait_for_notification wait on one member's mentions or notifications. Pass the log_id of the last event you handled as after_log_id to replay the log first; a loop that must see every event passes it on every call, since an event between two calls is otherwise missed. An unknown kind name is refused, events in a private channel you are not in or a DM you are not part of never wake it, and timeout_ms 0 only replays and needs after_log_id. Requires workspace:read.
Capability: workspace:read
Hints: readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false
{
"properties": {
"after_log_id": {
"description": "Replay logged events with a log_id greater than this before waiting; pass the log_id of the last event you handled. Required when timeout_ms is 0.",
"type": "integer"
},
"kinds": {
"description": "Event kind names in snake_case, at least one, such as thread_landed, thread_ready or message_posted. The first event of any listed kind wakes the call; an unknown name is refused.",
"items": {
"type": "string"
},
"minItems": 1,
"type": "array"
},
"thread_id": {
"description": "UUID of a thread; only events in it count. Omitted, events anywhere in the workspace that you may read.",
"format": "uuid",
"type": "string"
},
"timeout_ms": {
"description": "Wait window in milliseconds, up to 300000 (default 30000). 0 only replays the log and needs after_log_id.",
"maximum": 300000,
"minimum": 0,
"type": "integer"
},
"workspace_id": {
"description": "UUID of your own workspace (the workspace_id from whoami); omitted, your own. Another workspace is refused.",
"format": "uuid",
"type": "string"
}
},
"required": [
"kinds"
],
"type": "object"
}
find_thread
Find thread. Find the thread an external reference points at: a Slack message (slack_channel and slack_ts: the thread whose result was posted as that message or into that Slack thread), a Slack channel alone (the thread it is linked to), or a GitHub pull request (repo and pr_number: the thread tracking it, linked to it, or delivering to it). Returns the thread, or null when nothing in your workspace that you may read matches. The twin of GET /workspaces/{id}/thread-lookup.
Capability: workspace:read
Hints: readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false
{
"properties": {
"pr_number": {
"minimum": 1,
"type": "integer"
},
"repo": {
"description": "owner/name or a GitHub clone URL; with pr_number",
"type": "string"
},
"slack_channel": {
"description": "a Slack channel id such as C0123ABCD",
"type": "string"
},
"slack_ts": {
"description": "a Slack message ts such as 1700000000.000100; needs slack_channel",
"type": "string"
},
"workspace_id": {
"description": "your own workspace (whoami's workspace_id); omitted, the same",
"format": "uuid",
"type": "string"
}
},
"type": "object"
}
find_threads
Find threads. Find a workspace's threads by their task attributes: equality filters over kind, engine, threat_model, size, linear_issue, repo, tier, lane and review_family, given as attr (attr.linear_issue=ENG-123 style pairs), plus engine, tier and lane as bare shorthand, and ref (ref.twin_of=
Capability: workspace:read
Hints: readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false
{
"properties": {
"attr": {
"description": "Attribute equality filters by field name: kind, engine, threat_model, size, linear_issue, repo, tier, lane, review_family. Values are the fields' wire forms.",
"type": "object"
},
"cursor": {
"description": "Exclusive keyset cursor: the prior page's last thread id.",
"format": "uuid",
"type": "string"
},
"engine": {
"description": "Only threads routed to this engine (unattended, session or human); shorthand for attr.engine.",
"type": "string"
},
"lane": {
"description": "Only threads in this service lane (batch or flex); shorthand for attr.lane.",
"type": "string"
},
"limit": {
"default": 100,
"description": "Max threads to return (clamped 1..=500).",
"type": "integer"
},
"order": {
"description": "Direction of the keyset walk (default oldest).",
"enum": [
"oldest",
"newest"
],
"type": "string"
},
"ref": {
"additionalProperties": {
"type": "string"
},
"description": "Reference filters by relation wire name (twin_of, duplicates, supersedes, ...): keeps the threads holding that reference to the given thread id.",
"type": "object"
},
"tier": {
"description": "Only threads carrying this review tier (A or B); shorthand for attr.tier.",
"type": "string"
},
"workspace_id": {
"description": "your own workspace (whoami's workspace_id); omitted, the same",
"format": "uuid",
"type": "string"
}
},
"type": "object"
}
set_thread_lineage
Set thread lineage. Home a producer's run_id on a thread as parent_run_id. Accepts the producer's string as-is (does not mint a parallel id). Empty / whitespace / over-long is rejected. Use when attributing nested work to a producer run; set_thread_result also auto-homes when the payload carries run_id.
Capability: thread:transition
Hints: readOnlyHint: false, destructiveHint: true, idempotentHint: true, openWorldHint: false
{
"properties": {
"parent_run_id": {
"description": "the producer's run identifier (e.g. waiter envelope run_id)",
"type": "string"
},
"thread_id": {
"format": "uuid",
"type": "string"
}
},
"required": [
"thread_id",
"parent_run_id"
],
"type": "object"
}
get_thread_lineage
Get thread lineage. Read a thread's run lineage (parent_run_id + set_at), or null if none has been set.
Capability: workspace:read
Hints: readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false
{
"properties": {
"thread_id": {
"format": "uuid",
"type": "string"
}
},
"required": [
"thread_id"
],
"type": "object"
}
list_run_threads
List run threads. List threads in the caller's workspace that share a producer parent_run_id, oldest first. Nested children given the same value are included. Private-channel rows the caller cannot access are omitted. F7 mute is not consulted.
Capability: workspace:read
Hints: readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false
{
"properties": {
"parent_run_id": {
"description": "the producer's run identifier",
"type": "string"
}
},
"required": [
"parent_run_id"
],
"type": "object"
}
get_run_occupancy
Get run occupancy. Count the open threads that share one producer run id, as {parent_run_id, open, queued, claimed, working, blocked}: the split of get_channel_occupancy applied to every thread in your workspace whose lineage names that run, across channels. Use it to watch the nested work of one orchestrated run; attach the run id to a thread with set_thread_lineage and list those threads with list_run_threads. Counts only threads you may read and includes muted ones, and a run id that no thread uses returns zeros, not an error. Requires workspace:read.
Capability: workspace:read
Hints: readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false
{
"properties": {
"parent_run_id": {
"description": "The producer's run identifier, exactly as it was stored on threads with set_thread_lineage. Surrounding whitespace is ignored; an empty value or one over 256 bytes is refused.",
"type": "string"
}
},
"required": [
"parent_run_id"
],
"type": "object"
}
set_thread_result
Set thread result. Attach a task's structured result (arbitrary JSON). Upserts one result per thread and notifies waiters via a thread_result_set event. Use when finishing a task so a requester or parent can read the output. Fenced by your claim: pass claim_lease_id from the claim response; if the lease lapsed and someone else took the thread (or it was released), the call is refused (claim_lost) and nothing is stored, so stop the work. When the server sets MAIDAN_CHANGE_REFUSE_WORKFLOW_PATHS (its GitHub token cannot push workflow files), a maidan.change.result/1 with status changed, a github_branch target and a diff touching .github/workflows/ is refused with invalid params naming the files and nothing is stored: drop the workflow edit and set the result again.
Capability: thread:transition
Hints: readOnlyHint: false, destructiveHint: true, idempotentHint: false, openWorldHint: true
{
"properties": {
"claim_lease_id": {
"description": "the fencing token from the claim response's thread.claim_lease_id",
"format": "uuid",
"type": "string"
},
"result": {
"description": "structured JSON result payload (an object)",
"type": "object"
},
"thread_id": {
"format": "uuid",
"type": "string"
}
},
"required": [
"thread_id",
"result",
"claim_lease_id"
],
"type": "object"
}
get_thread_result
Get thread result. Read a task's structured result, or null if none has been produced yet.
Capability: workspace:read
Hints: readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false
{
"properties": {
"thread_id": {
"format": "uuid",
"type": "string"
}
},
"required": [
"thread_id"
],
"type": "object"
}
list_thread_results
List thread results. List thread results in the caller's workspace, newest first. Optional result_kind is an exact-match facet on the namespaced string (e.g. example.review.result/1), not a closed enum. Private-channel rows the caller cannot access are omitted.
Capability: workspace:read
Hints: readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false
{
"properties": {
"limit": {
"default": 50,
"maximum": 500,
"minimum": 1,
"type": "integer"
},
"result_kind": {
"description": "exact namespaced result_kind (e.g. example.review.result/1); omit to list every accessible result",
"type": "string"
}
},
"type": "object"
}
list_result_deliveries
List result deliveries. List per-target delivery status for a thread's structured result (disposition, external reference, last error). Empty means the result was not routed anywhere, which is valid. workspace:read + thread access.
Capability: workspace:read
Hints: readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false
{
"properties": {
"thread_id": {
"format": "uuid",
"type": "string"
}
},
"required": [
"thread_id"
],
"type": "object"
}
replay_result_delivery
Replay result delivery. Re-enqueue one result delivery onto the egress outbox. Re-checks the workspace allowlist (an unblessed target stays skipped). Does not bump armed_revision. workspace:write + thread access.
Capability: workspace:write
Hints: readOnlyHint: false, destructiveHint: true, idempotentHint: false, openWorldHint: true
{
"properties": {
"delivery_id": {
"format": "uuid",
"type": "string"
},
"thread_id": {
"format": "uuid",
"type": "string"
}
},
"required": [
"thread_id",
"delivery_id"
],
"type": "object"
}
set_thread_owner
Set thread owner. Set (or clear, by omitting owner_id) a thread's durable owner — the accountable party, distinct from the assignee/claimer. Once an owner is set, the claimer can no longer land (close/archive) its own work; the owner or another member must (separation of duties).
Capability: thread:transition
Hints: readOnlyHint: false, destructiveHint: true, idempotentHint: true, openWorldHint: false
{
"properties": {
"owner_id": {
"description": "the owner to set; omit to clear",
"format": "uuid",
"type": "string"
},
"thread_id": {
"format": "uuid",
"type": "string"
}
},
"required": [
"thread_id"
],
"type": "object"
}
rename_thread
Rename thread. Rename a thread — give a titled thread a new name (e.g. name a post-derived child thread). The title must not be blank. A rename is metadata, not activity, so it does not float the thread in the recent-activity order.
Capability: thread:transition
Hints: readOnlyHint: false, destructiveHint: true, idempotentHint: true, openWorldHint: false
{
"properties": {
"thread_id": {
"format": "uuid",
"type": "string"
},
"title": {
"description": "the new thread title",
"type": "string"
}
},
"required": [
"thread_id",
"title"
],
"type": "object"
}
set_thread_steer
Set thread steer. Set a thread's persisted steer, the durable guidance a resuming or newly assigned agent should follow, replacing any earlier steer (the latest write wins), and return {thread_id, steer, steered_by, steered_at} with the caller as steered_by. The steer stays on the thread across claims and handoffs and emits no event; a reader picks it up with get_thread_steer. Use it for standing guidance rather than a one-off reply, which belongs in a message. Requires thread:transition.
Capability: thread:transition
Hints: readOnlyHint: false, destructiveHint: true, idempotentHint: true, openWorldHint: false
{
"properties": {
"steer": {
"description": "The steering instruction as plain text. It replaces the thread's current steer in full.",
"type": "string"
},
"thread_id": {
"description": "UUID of the thread to steer. The caller must be able to read the thread's channel.",
"format": "uuid",
"type": "string"
}
},
"required": [
"thread_id",
"steer"
],
"type": "object"
}
get_thread_steer
Get thread steer. Read a thread's current steer, or null if none is set. A resuming or newly-assigned agent reads this to follow the current steering guidance.
Capability: workspace:read
Hints: readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false
{
"properties": {
"thread_id": {
"format": "uuid",
"type": "string"
}
},
"required": [
"thread_id"
],
"type": "object"
}
wait_for_result
Wait for result. Block until the task named by thread_id produces its result (thread_result_set) and return the result record {thread_id, result, produced_by, produced_at}, or null when the timeout lapses; this is the wait in spawn, wait, aggregate. Unlike the event waits it returns the stored result rather than an event, and it needs a thread_id. A live wait does not see a result that already exists: read it with get_thread_result first, or use get_dependency_results for every dependency result of a parent at once. since_log_id replays a result set on this thread after that log_id before waiting live. To put a deadline on a thread instead, use set_wait. Requires workspace:read.
Capability: workspace:read
Hints: readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false
{
"properties": {
"since_log_id": {
"description": "Your high-water log_id. The log is replayed for a matching event with a log_id greater than this before the wait goes live, so an event in the gap between two calls is caught. Omitted, only events after the call count.",
"type": "integer"
},
"thread_id": {
"description": "UUID of the task thread whose result to await. You must be able to read it.",
"format": "uuid",
"type": "string"
},
"timeout_ms": {
"description": "Wait window in milliseconds, from 1 to 300000 (default 30000). When it lapses the tool returns null.",
"type": "integer"
}
},
"required": [
"thread_id"
],
"type": "object"
}
get_dependency_results
Get dependency results. Gather the structured results of a parent task's dependencies as a list of {thread_id, result} objects (result null if not produced yet), skipping dependencies you can't access. The spawn/wait/aggregate read for a parent task.
Capability: workspace:read
Hints: readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false
{
"properties": {
"thread_id": {
"description": "the parent task",
"format": "uuid",
"type": "string"
}
},
"required": [
"thread_id"
],
"type": "object"
}
add_member_skill
Add member skill. Declare a skill (free-form tag) for a member. Skill routing gates claim_next: a task is claimable by a member only if it holds all the task's required skills.
Capability: workspace:write
Hints: readOnlyHint: false, destructiveHint: false, idempotentHint: true, openWorldHint: false
{
"properties": {
"member_id": {
"format": "uuid",
"type": "string"
},
"skill": {
"type": "string"
}
},
"required": [
"member_id",
"skill"
],
"type": "object"
}
list_member_skills
List member skills. List the skills a member has declared, ordered by skill, as records of member_id, skill and created_at. Declared skills decide which tasks the member is offered: claim_next_thread only hands over a thread whose required skills the member holds (see list_thread_required_skills), and governance skills confer authority over gates. A token can only read its own member's skills, so member_id must be the caller's own; another member's id is refused. Change the list with add_member_skill and remove_member_skill. Requires workspace:read.
Capability: workspace:read
Hints: readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false
{
"properties": {
"member_id": {
"description": "UUID of the member whose skills to list. It must be the member the calling token belongs to.",
"format": "uuid",
"type": "string"
}
},
"required": [
"member_id"
],
"type": "object"
}
add_thread_required_skill
Add thread required skill. Add a required skill to a task. Only a member holding every required skill can claim the task via claim_next_thread.
Capability: thread:transition
Hints: readOnlyHint: false, destructiveHint: false, idempotentHint: true, openWorldHint: false
{
"properties": {
"skill": {
"type": "string"
},
"thread_id": {
"format": "uuid",
"type": "string"
}
},
"required": [
"thread_id",
"skill"
],
"type": "object"
}
list_thread_required_skills
List thread required skills. List the skills a task (thread) requires, ordered by skill, as records of thread_id, skill and created_at. claim_next_thread only hands the thread to a member who has declared every one of them, so call this to see why a member is not being offered a task. To change the list use add_thread_required_skill or remove_thread_required_skill; to see what a member has declared use list_member_skills. Requires workspace:read and read access to the thread's channel.
Capability: workspace:read
Hints: readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false
{
"properties": {
"thread_id": {
"description": "UUID of the thread (task) whose required skills to list.",
"format": "uuid",
"type": "string"
}
},
"required": [
"thread_id"
],
"type": "object"
}
create_task_schedule
Create task schedule. Create a task schedule: when due, the sweeper creates a thread titled title in channel_id (or, when recipe_id is set, instantiates that recipe — parent + DAG children — instead). interval_secs omitted = one-shot; a positive value = recurring. first_run_at omitted = fire on the next tick.
Capability: workspace:write
Hints: readOnlyHint: false, destructiveHint: false, idempotentHint: false, openWorldHint: false
{
"properties": {
"channel_id": {
"format": "uuid",
"type": "string"
},
"first_run_at": {
"description": "when to first fire (default: now)",
"format": "date-time",
"type": "string"
},
"interval_secs": {
"description": "recurrence period in seconds; omit for a one-shot",
"type": "integer"
},
"recipe_id": {
"description": "when set, each firing instantiates this recipe instead of a bare thread (skipped if the prior run is still in flight)",
"format": "uuid",
"type": "string"
},
"title": {
"type": "string"
}
},
"required": [
"channel_id",
"title"
],
"type": "object"
}
list_task_schedules
List task schedules. List the caller's workspace task schedules (filtered to channels the caller can access).
Capability: workspace:read
Hints: readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false
{
"properties": {},
"type": "object"
}
create_recipe
Create recipe. Create a recipe: a reusable thread-type blueprint. spec = {params, definition_of_done, retry, children}, where each child is {key, title, required_skills, depends_on (sibling keys)}. Instantiating it (instantiate_recipe) builds a parent thread + a child per child + wires the DAG + attaches skills. NOT a recipe VM — a blueprint the room instantiates.
Capability: workspace:write
Hints: readOnlyHint: false, destructiveHint: false, idempotentHint: false, openWorldHint: false
{
"properties": {
"channel_id": {
"format": "uuid",
"type": "string"
},
"name": {
"type": "string"
},
"spec": {
"description": "the RecipeSpec (params, definition_of_done, retry, children)",
"type": "object"
}
},
"required": [
"channel_id",
"name",
"spec"
],
"type": "object"
}
list_recipes
List recipes. List the recipes in the caller's workspace, newest first, leaving out any recipe whose channel the caller cannot read. Each recipe carries id, workspace_id, channel_id, name, its spec (params, definition of done, retry policy and child sub-tasks), created_by and timestamps. Pass a recipe id to instantiate_recipe to build its threads, or to delete_recipe to remove it. Takes no arguments. Requires workspace:read.
Capability: workspace:read
Hints: readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false
{
"properties": {},
"type": "object"
}
instantiate_recipe
Instantiate recipe. Instantiate a recipe into a parent thread + its DAG children (copy-on-fire: the recipe bytes are frozen into the run). params are validated against the recipe's declared params (required ones must be present). Returns the RecipeRun.
Capability: workspace:write
Hints: readOnlyHint: false, destructiveHint: false, idempotentHint: false, openWorldHint: false
{
"properties": {
"params": {
"description": "instantiation params (must satisfy the recipe's required params)",
"type": "object"
},
"recipe_id": {
"format": "uuid",
"type": "string"
}
},
"required": [
"recipe_id"
],
"type": "object"
}
list_secrets
List secrets. List the caller's workspace secrets (metadata only — id, name, timestamps; NEVER the value). Use resolve_secret to fetch a value at exec.
Capability: secret:read
Hints: readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false
{
"properties": {},
"type": "object"
}
resolve_secret
Resolve secret. Resolve a named secret to its value (the 'fetch at exec' path). The value is decrypted server-side and returned only in this response — it never enters the event log. Returns null-name error if the secret is unknown.
Capability: secret:read
Hints: readOnlyHint: false, destructiveHint: false, idempotentHint: true, openWorldHint: false
{
"properties": {
"name": {
"description": "the secret name (the part after secret://)",
"type": "string"
}
},
"required": [
"name"
],
"type": "object"
}
list_secret_egress_hosts
List secret egress hosts. List the hosts trusted with this workspace's secret values: on a webhook, automation HTTP or A2A push delivery to one of them, secret://
Capability: secret:admin
Hints: readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false
{
"properties": {},
"type": "object"
}
allow_secret_egress_host
Allow secret egress host. Trust a host with this workspace's secret values (idempotent). A listed host receives the value of every secret a payload bound for it names, so this needs secret:read as well as secret:admin. The host is a lowercase hostname or IPv4 address with no scheme, port, path or wildcard, and must be inside the instance ceiling when the operator set one. Audited.
Capability: secret:admin
Hints: readOnlyHint: false, destructiveHint: false, idempotentHint: true, openWorldHint: false
{
"properties": {
"host": {
"description": "e.g. hooks.example.com",
"type": "string"
}
},
"required": [
"host"
],
"type": "object"
}
revoke_secret_egress_host
Revoke secret egress host. Stop trusting a host with this workspace's secret values; the next delivery to it carries the literal secret:// refs. Not found when the host was not listed. Requires secret:admin. Audited.
Capability: secret:admin
Hints: readOnlyHint: false, destructiveHint: true, idempotentHint: true, openWorldHint: false
{
"properties": {
"host": {
"type": "string"
}
},
"required": [
"host"
],
"type": "object"
}
freeze_member
Freeze member. Freeze a member (the kill-switch): drops their active leases (releases their claimed threads) and makes claim_next refuse them. Returns the freeze record + the count released, and emits member_frozen to the workspace (the reason included). The member stays frozen until unfreeze_member. Requires token:admin. NOT a thread/workspace pause.
Capability: token:admin
Hints: readOnlyHint: false, destructiveHint: true, idempotentHint: false, openWorldHint: false
{
"properties": {
"member_id": {
"format": "uuid",
"type": "string"
},
"reason": {
"description": "optional audit note",
"type": "string"
}
},
"required": [
"member_id"
],
"type": "object"
}
unfreeze_member
Unfreeze member. Lift a member's freeze so they can claim work again. Requires token:admin. Returns {unfrozen} (false if they were not frozen); an unfreeze that lifts a freeze emits member_unfrozen.
Capability: token:admin
Hints: readOnlyHint: false, destructiveHint: true, idempotentHint: true, openWorldHint: false
{
"properties": {
"member_id": {
"format": "uuid",
"type": "string"
}
},
"required": [
"member_id"
],
"type": "object"
}
list_frozen_members
List frozen members. List the frozen members in the caller's workspace (member_id, frozen_at, frozen_by, reason). Requires token:admin.
Capability: token:admin
Hints: readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false
{
"properties": {},
"type": "object"
}
create_share_ticket
Create share ticket. Issue a read-only cross-organization ticket for one channel and an explicit artifact allowlist. Ownership is bound to the authenticated member. Lifetime is capped at 48 hours; the secret is returned once and only its hash is stored. Requires token:admin.
Capability: token:admin
Hints: readOnlyHint: false, destructiveHint: false, idempotentHint: false, openWorldHint: false
{
"properties": {
"artifact_shas": {
"items": {
"pattern": "^[0-9a-f]{64}$",
"type": "string"
},
"maxItems": 100,
"type": "array"
},
"channel_id": {
"format": "uuid",
"type": "string"
},
"expires_at": {
"format": "date-time",
"type": "string"
}
},
"required": [
"channel_id",
"expires_at"
],
"type": "object"
}
list_share_tickets
List share tickets. List share tickets and their explicit artifact scopes in the caller's workspace. Secrets are never returned after creation. Requires token:admin.
Capability: token:admin
Hints: readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false
{
"properties": {},
"type": "object"
}
revoke_share_ticket
Revoke share ticket. Immediately revoke a share ticket in the caller's workspace. Requires token:admin.
Capability: token:admin
Hints: readOnlyHint: false, destructiveHint: true, idempotentHint: true, openWorldHint: false
{
"properties": {
"ticket_id": {
"format": "uuid",
"type": "string"
}
},
"required": [
"ticket_id"
],
"type": "object"
}
export_workspace
Export workspace. Export a workspace as a signed maidan.workspace.export/1 envelope. Tokens die on export: API tokens and secrets are omitted. A blank instance can verify the file without calling this host. Requires token:admin and MAIDAN_EXPORT_SIGNING_KEY.
Capability: token:admin
Hints: readOnlyHint: false, destructiveHint: false, idempotentHint: true, openWorldHint: false
{
"properties": {
"workspace_id": {
"description": "defaults to the caller's workspace",
"format": "uuid",
"type": "string"
}
},
"type": "object"
}
verify_workspace_export
Verify workspace export. Verify a signed workspace export without importing it. Fail-closed on tamper, a bad signature, stuffed secret fields, or a public key outside MAIDAN_EXPORT_VERIFY_KEYS when that pin is set. An empty pin checks integrity against the embedded key only. Requires token:admin.
Capability: token:admin
Hints: readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false
{
"properties": {
"envelope": {
"description": "the signed envelope; you may also pass the envelope fields at the top level",
"type": "object"
}
},
"type": "object"
}
import_workspace
Import workspace. Verify then import a signed workspace export. mode new remaps ids into a fresh workspace; restore keeps original ids and fails if that workspace exists unless force is true. Tokens die on export: mint new tokens after import. Requires token:admin.
Capability: token:admin
Hints: readOnlyHint: false, destructiveHint: true, idempotentHint: false, openWorldHint: false
{
"properties": {
"envelope": {
"description": "the signed maidan.workspace.export/1 envelope",
"type": "object"
},
"force": {
"description": "erase an existing workspace when mode is restore",
"type": "boolean"
},
"mode": {
"description": "defaults to new",
"enum": [
"new",
"restore"
],
"type": "string"
}
},
"required": [
"envelope"
],
"type": "object"
}
get_log_snapshot
Get log snapshot. Hashed event-log snapshot for this workspace (getRepo-shaped, not MST/CAR). Header plus graph_hash is workspace:read. Pass include_graph true for the domain graph; that requires token:admin. Complements hash-chain verify of the retained suffix: this covers a pruned prefix so a peer can resume without trusting the host for history it never saw.
Capability: workspace:read
Hints: readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false
{
"properties": {
"include_graph": {
"description": "include the domain graph; requires token:admin (default false)",
"type": "boolean"
},
"workspace_id": {
"description": "defaults to the caller's workspace",
"format": "uuid",
"type": "string"
}
},
"type": "object"
}
catch_up_events
Catch up on events. Since-LSN catch-up page after a snapshot (or a prior page). Events have id greater than after_lsn, hash-chain checked from the predecessor. A pruned-gap cursor fails closed and names the snapshot path to refetch; a broken chain fails closed. Requires workspace:read.
Capability: token:admin
Hints: readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false
{
"properties": {
"after_lsn": {
"description": "exclusive cursor; 0 starts from the retained floor",
"type": "integer"
},
"limit": {
"description": "page size, 1 to 500, default 100",
"type": "integer"
},
"workspace_id": {
"description": "defaults to the caller's workspace",
"format": "uuid",
"type": "string"
}
},
"type": "object"
}
verify_event_chain
Verify event chain. Verify the retained event-log hash chain for a workspace. Returns the chain report when intact; fails closed on a splice or rewrite. Twin of GET /workspaces/{id}/events/verify. Requires workspace:read.
Capability: workspace:read
Hints: readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false
{
"properties": {
"workspace_id": {
"description": "defaults to the caller's workspace",
"format": "uuid",
"type": "string"
}
},
"type": "object"
}
list_tombstones
List tombstones. Tombstone and deletion explorer for this workspace. Soft-deleted messages (body already cleared) plus, when include_purged is true, hard-purged reconstructions from MessageTombstoned events. Private-channel and DM rows the caller cannot access are omitted. Twin of GET /workspaces/{id}/tombstones. Requires workspace:read.
Capability: workspace:read
Hints: readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false
{
"properties": {
"channel_id": {
"description": "optional channel scope; gated when present",
"format": "uuid",
"type": "string"
},
"include_purged": {
"description": "reconstruct hard-deleted rows from MessageTombstoned (default false)",
"type": "boolean"
},
"limit": {
"description": "page size, 1 to 500, default 100",
"type": "integer"
},
"thread_id": {
"description": "optional thread scope; gated when present",
"format": "uuid",
"type": "string"
},
"workspace_id": {
"description": "defaults to the caller's workspace",
"format": "uuid",
"type": "string"
}
},
"type": "object"
}
list_message_backlinks
List message backlinks. Incoming pointers at a message: RelationKind reverse edges plus pins, reactions, and votes. Mentions are outgoing and omitted. Works on a retained tombstone; fails not-found after hard purge. Twin of GET /messages/{id}/backlinks. Requires workspace:read.
Capability: workspace:read
Hints: readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false
{
"properties": {
"message_id": {
"format": "uuid",
"type": "string"
}
},
"required": [
"message_id"
],
"type": "object"
}
get_kind_census
Get kind census. Count the events in the workspace's event log by event kind, as {workspace_id, total, counts} where counts lists {kind, count} ordered by count descending then kind, and kinds with no events are left out. It answers what has happened (messages posted, claims expired, threads landed), not how much work is queued: use get_queue_depth or get_channel_occupancy for queue state. Optionally narrowed to one channel or one thread; there is no time window, and events on threads you may not read, including private channels you are not in, are excluded from the totals. Requires workspace:read.
Capability: workspace:read
Hints: readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false
{
"properties": {
"channel_id": {
"description": "UUID of a channel; count only events in it. You must be able to read it.",
"format": "uuid",
"type": "string"
},
"thread_id": {
"description": "UUID of a thread; count only events in it. You must be able to read it.",
"format": "uuid",
"type": "string"
},
"workspace_id": {
"description": "UUID of your own workspace; omitted, your own. Another workspace is refused.",
"format": "uuid",
"type": "string"
}
},
"type": "object"
}
create_memory_block
Create memory block. Create a labeled memory block — a Letta-shaped shared object {label, description, limit, read_only, value} in the workspace that a thread can attach to (a room object). It is how a parent watches a child's result block without a nested runtime: not a transcript, not RAG. Concurrent-safe on the label (re-creating a label returns the existing block). The caller owns it.
Capability: workspace:write
Hints: readOnlyHint: false, destructiveHint: false, idempotentHint: true, openWorldHint: false
{
"properties": {
"char_limit": {
"description": "optional max value length in characters",
"type": "integer"
},
"description": {
"description": "what the block is for",
"type": "string"
},
"label": {
"description": "the block's within-workspace key",
"type": "string"
},
"read_only": {
"description": "refuse writes when true (default false)",
"type": "boolean"
},
"value": {
"description": "initial content (default empty)",
"type": "string"
}
},
"required": [
"label"
],
"type": "object"
}
get_memory_block
Get memory block. Get a memory block by label within the caller's workspace, or null if none. This is the watch-a-child's-result-block read (poll it).
Capability: workspace:read
Hints: readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false
{
"properties": {
"label": {
"type": "string"
}
},
"required": [
"label"
],
"type": "object"
}
list_memory_blocks
List memory blocks. List every memory block in the caller's workspace, ordered by label, as a list of objects with id, workspace_id, label, description (omitted when unset), char_limit (omitted when unset), read_only, value, owner_id, revision, created_at and updated_at. All blocks come back at once with their full values, with no paging or limit, so the result can be large. To read one block by label use get_memory_block; to see only the blocks attached to a thread use list_thread_memory_blocks. Requires workspace:read.
Capability: workspace:read
Hints: readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false
{
"properties": {},
"type": "object"
}
set_memory_block_value
Set memory block value. Full-rewrite a memory block's value by label, at the revision you read. Read the block with get_memory_block, change its value, and pass its revision as expected_revision. If another write landed since, the call is refused: read it again, redo the change and retry. A read-only block or a value over the block's char limit is rejected. Use this to publish a result other threads watch.
Capability: workspace:write
Hints: readOnlyHint: false, destructiveHint: true, idempotentHint: false, openWorldHint: false
{
"properties": {
"expected_revision": {
"description": "the block's revision when you read it",
"minimum": 1,
"type": "integer"
},
"label": {
"type": "string"
},
"value": {
"type": "string"
}
},
"required": [
"label",
"value",
"expected_revision"
],
"type": "object"
}
attach_memory_block
Attach memory block. Attach a memory block, named by label, to a thread so the thread carries it as a shared object: how a parent hands a block to a child. Returns {attached: true} when newly attached and {attached: false} when it was already attached. The block must already exist in your workspace (create_memory_block makes one; an unknown label is refused), and attaching never changes its value. list_thread_memory_blocks shows what a thread carries and detach_memory_block removes the link. Requires workspace:write.
Capability: workspace:write
Hints: readOnlyHint: false, destructiveHint: false, idempotentHint: true, openWorldHint: false
{
"properties": {
"label": {
"description": "Label of an existing memory block in your workspace (surrounding whitespace is ignored). An unknown label is refused.",
"type": "string"
},
"thread_id": {
"description": "UUID of the thread to attach the block to. You must be able to read it.",
"format": "uuid",
"type": "string"
}
},
"required": [
"thread_id",
"label"
],
"type": "object"
}
detach_memory_block
Detach memory block. Remove a memory block's attachment from one thread, identified by block id. The block and its value stay in the workspace and other threads keep it; delete_memory_block deletes the block itself and attach_memory_block is the opposite call. Returns {detached: true}, or {detached: false} when the block was not attached, so repeating the call is safe. Get block ids from list_thread_memory_blocks. Requires workspace:write.
Capability: workspace:write
Hints: readOnlyHint: false, destructiveHint: true, idempotentHint: true, openWorldHint: false
{
"properties": {
"block_id": {
"description": "UUID of the memory block (its id field, as list_thread_memory_blocks returns it), not its label.",
"format": "uuid",
"type": "string"
},
"thread_id": {
"description": "UUID of the thread to detach the block from. You must be able to read it.",
"format": "uuid",
"type": "string"
}
},
"required": [
"thread_id",
"block_id"
],
"type": "object"
}
list_thread_memory_blocks
List thread memory blocks. List the memory blocks attached to a thread (its room objects), ordered by label. Each block carries id, workspace_id, label, description, char_limit, read_only, value, owner_id, revision and timestamps. This shows only what is attached to the one thread; list_memory_blocks lists every block in the workspace, and get_memory_block reads one by label. Attach and detach with attach_memory_block and detach_memory_block. Requires workspace:read and read access to the thread's channel.
Capability: workspace:read
Hints: readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false
{
"properties": {
"thread_id": {
"description": "UUID of the thread whose attached memory blocks to list.",
"format": "uuid",
"type": "string"
}
},
"required": [
"thread_id"
],
"type": "object"
}
wait_for_memory_block
Wait for memory block. Block until the memory block with the given label is rewritten and return the block with its fresh value, or null when the timeout lapses. This is how a parent watches a child's result block; it sees only rewrites after it subscribes and has no log replay, so read the current value with get_memory_block first. Use wait_for_result to await a task's result instead of a block, and wait_for_event for several event kinds. Scoped to your workspace. Requires workspace:read.
Capability: workspace:read
Hints: readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false
{
"properties": {
"label": {
"description": "Label of the memory block to watch, its workspace-unique name (surrounding whitespace is ignored).",
"type": "string"
},
"timeout_ms": {
"description": "Wait window in milliseconds, from 1 to 300000 (default 30000). When it lapses the tool returns null.",
"type": "integer"
}
},
"required": [
"label"
],
"type": "object"
}
set_review_requirement
Set review requirement. Set (upsert) a thread's required-reviewers gate (G5): required_count distinct qualifying approvals before it can close. An approval qualifies when the reviewer is neither the owner nor the assignee (separation of duties) and, when a named reviewer set exists, is in it. A refutes edge also blocks close. max_rounds is how many send-backs one cycle allows before a person decides whether it goes around again (default 3; 0 leaves it uncapped). Omit max_rounds to leave the cap as it is. Tightening the cap needs thread:transition. Raising or removing it needs channel:admin. Requires thread:transition.
Capability: thread:transition
Hints: readOnlyHint: false, destructiveHint: true, idempotentHint: true, openWorldHint: false
{
"properties": {
"max_rounds": {
"description": "send-backs allowed before a person decides (default 3, 0 is uncapped). Omit to leave the current cap.",
"type": "integer"
},
"required_count": {
"description": "approvals needed (>= 0)",
"type": "integer"
},
"thread_id": {
"format": "uuid",
"type": "string"
}
},
"required": [
"thread_id",
"required_count"
],
"type": "object"
}
add_reviewer
Add reviewer. Name a member as an eligible reviewer for a thread. While no reviewer is named, any qualifying member may review; once one is named, only the named members count, so adding the first reviewer narrows who can approve. Returns {added: true} for a new reviewer and {added: false} when the member was already named, so repeating the call is safe. The member must be in your workspace. Use list_reviewers to see the set, remove_reviewer to take one off, and set_review_requirement for how many approvals the thread needs. Requires thread:transition.
Capability: thread:transition
Hints: readOnlyHint: false, destructiveHint: true, idempotentHint: true, openWorldHint: false
{
"properties": {
"member_id": {
"description": "UUID of the member to name as a reviewer. The member must belong to your workspace.",
"format": "uuid",
"type": "string"
},
"thread_id": {
"description": "UUID of the thread to name a reviewer for. You must be able to read it.",
"format": "uuid",
"type": "string"
}
},
"required": [
"thread_id",
"member_id"
],
"type": "object"
}
submit_review
Submit review. Submit a review decision as the caller (G5): approve or request_changes. The reviewer is you; an owner/assignee may submit but it will not count toward the requirement (separation of duties). request_changes on an in_review thread, from its owner or a reviewer whose approval would count, sends it back to open for rework: it is claimable again, earlier approvals are dismissed, and your note appears in its context as change_requests. request_changes needs a note saying what to change; approve may carry one. approve also needs evidence_root, the root from get_review_packet of what you were shown: it is refused when the thread was handed over again or changed since, and only an approval bound to the latest packet counts toward the close. Every verdict appends a review_submitted event (the note stays in the review history), and a request_changes notifies the thread's last worker. Re-submitting changes your decision. Requires thread:transition.
Capability: thread:transition
Hints: readOnlyHint: false, destructiveHint: true, idempotentHint: false, openWorldHint: false
{
"properties": {
"decision": {
"enum": [
"approve",
"request_changes"
],
"type": "string"
},
"evidence_root": {
"description": "the evidence_root from get_review_packet you are deciding on, required on approve",
"type": "string"
},
"head_sha": {
"description": "optional full commit SHA of the change head you reviewed; refused as a conflict when the change has moved since",
"type": "string"
},
"note": {
"description": "what to change, required on request_changes; optional on approve",
"type": "string"
},
"thread_id": {
"format": "uuid",
"type": "string"
}
},
"required": [
"thread_id",
"decision"
],
"type": "object"
}
get_review_status
Get review status. Read a thread's review standing: required_count, approvals (distinct qualifying), and approvals_met. This is the approval side of the close-gate; a refutes edge is checked separately when closing.
Capability: workspace:read
Hints: readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false
{
"properties": {
"thread_id": {
"format": "uuid",
"type": "string"
}
},
"required": [
"thread_id"
],
"type": "object"
}
list_reviews
List reviews. List each reviewer's current decision on a thread, ordered by creation time. A row has reviewer_id, decision (approve or request_changes), note, the delegate actor_id if one submitted it, evidence_root, head_sha and dismissed_at, which is set on an approval that a later change request invalidated. Re-submitting replaces a reviewer's row, so earlier verdicts are in list_review_history; whether the requirement is met is in get_review_status. Submit with submit_review. Requires workspace:read and read access to the thread's channel.
Capability: workspace:read
Hints: readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false
{
"properties": {
"thread_id": {
"description": "UUID of the thread whose review decisions to list.",
"format": "uuid",
"type": "string"
}
},
"required": [
"thread_id"
],
"type": "object"
}
list_review_history
List review history. List every verdict submitted on a thread, oldest first (reviewer, decision, note, delegate, recorded_at). list_reviews shows each reviewer's current decision; a re-submission replaces it there but its earlier verdicts stay here.
Capability: workspace:read
Hints: readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false
{
"properties": {
"thread_id": {
"format": "uuid",
"type": "string"
}
},
"required": [
"thread_id"
],
"type": "object"
}
set_land_gate
Set land gate. Record a land-gate pointer on a thread: status pass or fail, optional artifact_sha, optional land green/amber/red. The room holds the pointer; an external verifier records pass/fail. A qualifying green pass (land-gate-skilled member who is not the implementer) is required to close once the gate is armed. Amber is flags-then-still-engages and is not a land. Requires thread:transition. The caller must have declared the land_gate skill.
Capability: thread:transition
Hints: readOnlyHint: false, destructiveHint: true, idempotentHint: false, openWorldHint: false
{
"properties": {
"artifact_sha": {
"type": "string"
},
"land": {
"enum": [
"green",
"amber",
"red"
],
"type": "string"
},
"status": {
"enum": [
"pass",
"fail"
],
"type": "string"
},
"thread_id": {
"format": "uuid",
"type": "string"
}
},
"required": [
"thread_id",
"status"
],
"type": "object"
}
get_land_gate
Get land gate. Read a thread's land-gate standing: required, pointer, land (green/amber/red), landable. No pointer is vacuous green. Requires workspace:read.
Capability: workspace:read
Hints: readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false
{
"properties": {
"thread_id": {
"format": "uuid",
"type": "string"
}
},
"required": [
"thread_id"
],
"type": "object"
}
list_land_gate_history
List land gate history. List every land-gate verdict recorded on a thread, oldest first (status, land, artifact_sha, recorder, delegate, recorded_at). get_land_gate shows the latest pointer; a later pointer or clearing the gate leaves earlier verdicts here. Requires workspace:read.
Capability: workspace:read
Hints: readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false
{
"properties": {
"thread_id": {
"format": "uuid",
"type": "string"
}
},
"required": [
"thread_id"
],
"type": "object"
}
require_land_gate
Require land gate. Arm the land-gate close-gate on a thread that has no land-gate pointer yet, so a transition to closed is refused until a qualifying green pass is recorded with set_land_gate. An existing pointer is left unchanged, and repeating the call changes nothing. Returns the standing {required, pointer, land, landable}; read it later with get_land_gate and remove the gate with clear_land_gate. Requires thread:transition.
Capability: thread:transition
Hints: readOnlyHint: false, destructiveHint: false, idempotentHint: true, openWorldHint: false
{
"properties": {
"thread_id": {
"description": "UUID of the thread to arm. You must be able to read it.",
"format": "uuid",
"type": "string"
}
},
"required": [
"thread_id"
],
"type": "object"
}
clear_land_gate
Clear land gate. Clear a thread's land-gate pointer and requirement. Requires thread:transition.
Capability: channel:admin
Hints: readOnlyHint: false, destructiveHint: true, idempotentHint: true, openWorldHint: false
{
"properties": {
"thread_id": {
"format": "uuid",
"type": "string"
}
},
"required": [
"thread_id"
],
"type": "object"
}
set_glossary_term
Set glossary term. Define (or redefine) a term in the workspace's shared glossary — the canonical term -> definition so agents use words the same way (the anti-drift pin; the target of a defines reference). Upserts on the term.
Capability: workspace:write
Hints: readOnlyHint: false, destructiveHint: true, idempotentHint: true, openWorldHint: false
{
"properties": {
"aliases": {
"description": "alternate labels for the same term",
"items": {
"type": "string"
},
"type": "array"
},
"definition": {
"type": "string"
},
"term": {
"type": "string"
}
},
"required": [
"term",
"definition"
],
"type": "object"
}
get_glossary_term
Get glossary term. Look up one term's canonical definition in the workspace glossary. Returns null when the term is undefined.
Capability: workspace:read
Hints: readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false
{
"properties": {
"term": {
"type": "string"
}
},
"required": [
"term"
],
"type": "object"
}
list_glossary_terms
List glossary terms. List all defined terms in the workspace's shared glossary, ordered by term.
Capability: workspace:read
Hints: readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false
{
"properties": {},
"type": "object"
}
wait_for_ready
Wait for ready. Block until a task becomes ready, meaning its last blocking dependency reached a terminal state (thread_ready), and return the ThreadReady event, or null when the timeout lapses. It answers only that dependency signal: use wait_for_blocked_resolved for an explicit block being cleared, wait_for_claim_expired for a lapsed claim, wait_for_event for several kinds at once, and claim_next_thread to take ready work that already exists. Scoped to channel_id when given, else any thread you may read in the workspace. since_log_id replays a ThreadReady recorded after that log_id before waiting live; without it only readiness signalled after the call counts. To put a deadline on a thread instead, use set_wait. Requires workspace:read.
Capability: workspace:read
Hints: readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false
{
"properties": {
"channel_id": {
"description": "UUID of a channel; only readiness of its tasks counts. Omitted, any thread you may read in the workspace.",
"format": "uuid",
"type": "string"
},
"since_log_id": {
"description": "Your high-water log_id. The log is replayed for a matching event with a log_id greater than this before the wait goes live, so an event in the gap between two calls is caught. Omitted, only events after the call count.",
"type": "integer"
},
"timeout_ms": {
"default": 30000,
"description": "Wait window in milliseconds, from 1 to 300000 (default 30000). When it lapses the tool returns null.",
"maximum": 300000,
"minimum": 1,
"type": "integer"
}
},
"type": "object"
}
wait_for_claim_expired
Wait for claim expired. Block until a claim's lease lapses and its thread is reclaimed (claim_expired), the signal that an agent holding work died or stopped renewing, and return the ClaimExpired event (member_id is the dead holder), or null when the timeout lapses. Use wait_for_claim_failed for a run stopped for going over its budget, and wait_for_event to wait on several kinds. The reclaim happens in the claim reaper within seconds, or in the next claim_next_thread. A thread in review is reaped like an open one: its implementer must keep renewing through review, or the claim is reaped and a changes-requested thread reopens unheld. Scoped to channel_id when given, else any thread you may read in the workspace; since_log_id replays an expiry recorded in the gap before this call subscribes. To put a deadline on a thread instead, use set_wait. Requires workspace:read.
Capability: workspace:read
Hints: readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false
{
"properties": {
"channel_id": {
"description": "UUID of a channel; only claim expiries of its tasks count. Omitted, any thread you may read in the workspace.",
"format": "uuid",
"type": "string"
},
"since_log_id": {
"description": "Your high-water log_id. The log is replayed for a matching event with a log_id greater than this before the wait goes live, so an event in the gap between two calls is caught. Omitted, only events after the call count.",
"type": "integer"
},
"timeout_ms": {
"default": 30000,
"description": "Wait window in milliseconds, from 1 to 300000 (default 30000). When it lapses the tool returns null.",
"maximum": 300000,
"minimum": 1,
"type": "integer"
}
},
"type": "object"
}
wait_for_claim_failed
Wait for claim failed. Block until a claimed run is stopped for going over its budget (claim_failed) and return the ClaimFailed event (member_id is the stopped holder, reason the budget axis: tokens, usd, turns or wall), or null when the timeout lapses. A report_usage past a limit releases the claim, dead-letters the run and emits it; a reclaim whose worked time put the thread over budget emits it too. Use wait_for_claim_expired for a holder that died or stopped renewing instead, and wait_for_event to wait on several kinds. Scoped to channel_id when given, else any thread you may read in the workspace; since_log_id replays a stop recorded in the gap before this call subscribes. To put a deadline on a thread instead, use set_wait. Requires workspace:read.
Capability: workspace:read
Hints: readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false
{
"properties": {
"channel_id": {
"description": "UUID of a channel; only budget stops of its tasks count. Omitted, any thread you may read in the workspace.",
"format": "uuid",
"type": "string"
},
"since_log_id": {
"description": "Your high-water log_id. The log is replayed for a matching event with a log_id greater than this before the wait goes live, so an event in the gap between two calls is caught. Omitted, only events after the call count.",
"type": "integer"
},
"timeout_ms": {
"default": 30000,
"description": "Wait window in milliseconds, from 1 to 300000 (default 30000). When it lapses the tool returns null.",
"maximum": 300000,
"minimum": 1,
"type": "integer"
}
},
"type": "object"
}
wait_for_blocked_resolved
Wait for blocked resolved. Block until an explicit dispatch block on a thread is cleared (clear_thread_block emits blocked_resolved) and return the BlockedResolved event (the reason that cleared, resolved_by), or null when the timeout lapses. It answers only a cleared block, not a dependency finishing (wait_for_ready) or a lapsed claim (wait_for_claim_expired); get_thread_block reads the current block. Scoped to thread_id and/or channel_id when given, else any thread you may read in the workspace; clearing a thread that was not blocked emits nothing. since_log_id replays a clear recorded in the gap before this call subscribes. To put a deadline on a thread instead, use set_wait. Requires workspace:read.
Capability: workspace:read
Hints: readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false
{
"properties": {
"channel_id": {
"description": "UUID of a channel; only blocks cleared on its threads count. Omitted, any thread you may read in the workspace.",
"format": "uuid",
"type": "string"
},
"since_log_id": {
"description": "Your high-water log_id. The log is replayed for a matching event with a log_id greater than this before the wait goes live, so an event in the gap between two calls is caught. Omitted, only events after the call count.",
"type": "integer"
},
"thread_id": {
"description": "UUID of a thread; wait for this thread's block to clear.",
"format": "uuid",
"type": "string"
},
"timeout_ms": {
"default": 30000,
"description": "Wait window in milliseconds, from 1 to 300000 (default 30000). When it lapses the tool returns null.",
"maximum": 300000,
"minimum": 1,
"type": "integer"
}
},
"type": "object"
}
wait_for_landed
Wait for landed. Block until a thread's linked GitHub pull request is merged (thread_landed) and return the ThreadLanded event (repo, pr_number, merged_by, merge_commit_sha, title), or null when the timeout lapses. The workspace records the landing but does not change the thread's state; use wait_for_event to wait on several kinds, and wait_for_result for a task's result rather than a merge. Scoped to thread_id and/or channel_id when given, else any landing in the workspace that you may read; since_log_id replays a landing recorded in the gap before this call subscribes. To put a deadline on a thread instead, use set_wait. Requires workspace:read.
Capability: workspace:read
Hints: readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false
{
"properties": {
"channel_id": {
"description": "UUID of a channel; only landings of threads in it count. Omitted, any thread you may read in the workspace.",
"format": "uuid",
"type": "string"
},
"since_log_id": {
"description": "Your high-water log_id. The log is replayed for a matching event with a log_id greater than this before the wait goes live, so an event in the gap between two calls is caught. Omitted, only events after the call count.",
"type": "integer"
},
"thread_id": {
"description": "UUID of a thread; only the landing of its linked pull request counts.",
"format": "uuid",
"type": "string"
},
"timeout_ms": {
"default": 30000,
"description": "Wait window in milliseconds, from 1 to 300000 (default 30000). When it lapses the tool returns null.",
"maximum": 300000,
"minimum": 1,
"type": "integer"
}
},
"type": "object"
}
list_mentions
List mentions. List the recent @mentions of a member, newest first, as {message_id, member_id, created_at} rows. A row names the message but does not carry its text; read the message with list_messages on its thread. Mentions made in a private channel or DM the member cannot read are left out. Use get_inbox for mentions plus the read cursor and wait_for_mention to block until the next one. member_id must be your own. Requires workspace:read.
Capability: workspace:read
Hints: readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false
{
"properties": {
"limit": {
"description": "Maximum rows to return, 1 to 500. Default 50; values outside the range are clamped.",
"type": "integer"
},
"member_id": {
"description": "UUID of the member. Must be your own member id (whoami returns it); any other member is refused.",
"format": "uuid",
"type": "string"
}
},
"required": [
"member_id"
],
"type": "object"
}
get_inbox
Get inbox. A member's mention inbox: recent mentions plus the read-cursor, so an agent can find what it hasn't seen. Mentions only; for everything waiting on the member (assigned tasks, requested reviews, open approval gates and unread mentions), use get_waiting_inbox.
Capability: workspace:read
Hints: readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false
{
"properties": {
"limit": {
"description": "max mentions (default 50, max 500)",
"type": "integer"
},
"member_id": {
"format": "uuid",
"type": "string"
}
},
"required": [
"member_id"
],
"type": "object"
}
mark_inbox_read
Mark inbox read. Move a member's mention inbox read-cursor forward to a given instant, so mentions at or before it count as read, and return the updated inbox: items (up to 50), unread_count and last_read_at. The cursor never moves backward, so an earlier instant than the current cursor changes nothing. This is the cursor for get_inbox; notifications are cleared with mark_notification_read or mark_all_notifications_read instead. The member_id must be the caller. Requires member:self.
Capability: member:self
Hints: readOnlyHint: false, destructiveHint: false, idempotentHint: true, openWorldHint: false
{
"properties": {
"member_id": {
"description": "UUID of the member whose inbox to advance. It must be the caller's own member id, otherwise the call is refused.",
"format": "uuid",
"type": "string"
},
"read_through": {
"description": "RFC 3339 timestamp, for example 2026-11-25T14:30:00Z. Mentions created at or before this instant are marked read. An instant earlier than the current cursor is ignored.",
"format": "date-time",
"type": "string"
}
},
"required": [
"member_id",
"read_through"
],
"type": "object"
}
wait_for_mention
Wait for mention. Block until the member is next @mentioned (mention_recorded) and return the mention event, or null when the timeout lapses. member_id must be your own. Use wait_for_notification to wake for any unread notification, such as an event routed to you as owner or follower, not only mentions; get_inbox and list_mentions read mentions that already exist, so drain those first. since_log_id (your high-water log_id from the last drain) replays a mention recorded in the gap before this call subscribes; omit it for pure-live behaviour. Mentions in a private channel or DM you cannot read are skipped. Requires workspace:read.
Capability: workspace:read
Hints: readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false
{
"properties": {
"member_id": {
"description": "UUID of the member whose mentions to await. Must be your own member id; another member's id is refused.",
"format": "uuid",
"type": "string"
},
"since_log_id": {
"description": "Your high-water log_id. The log is replayed for a matching event with a log_id greater than this before the wait goes live, so an event in the gap between two calls is caught. Omitted, only events after the call count.",
"type": "integer"
},
"timeout_ms": {
"default": 30000,
"description": "Wait window in milliseconds, from 1 to 300000 (default 30000). When it lapses the tool returns null.",
"maximum": 300000,
"minimum": 1,
"type": "integer"
}
},
"required": [
"member_id"
],
"type": "object"
}
list_notifications
List notifications. List a member's per-recipient notifications, newest first. Set unread_only to see just the unread ones. Each carries its kind, thread_id, the thread's title and a short reason read from the event that caused it, enough for a digest line. The durable inbox the notification router fills; drain it here, then wait_for_notification for new ones.
Capability: workspace:read
Hints: readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false
{
"properties": {
"limit": {
"default": 50,
"maximum": 500,
"minimum": 1,
"type": "integer"
},
"member_id": {
"format": "uuid",
"type": "string"
},
"unread_only": {
"default": false,
"type": "boolean"
}
},
"required": [
"member_id"
],
"type": "object"
}
get_waiting_inbox
Get waiting inbox. The waiting-on-you inbox, everything needing a member's attention: their assigned non-terminal threads, the reviews requested from them (review_request: a thread in review naming them as a reviewer, without their approval yet), the reviews that name no reviewer and fall to them (unassigned_review: a thread in review with no named reviewer that they own, or that nobody owns when they are a workspace admin), the workspace's pending approval gates, and their unread mentions. Oldest-waiting first, each aged against sla_secs (default 86400 = 24h) with an overdue flag. One member's queue, not @everyone. For mentions alone, with a read-cursor you advance with mark_inbox_read, use get_inbox.
Capability: workspace:read
Hints: readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false
{
"properties": {
"member_id": {
"format": "uuid",
"type": "string"
},
"sla_secs": {
"description": "overdue threshold in seconds (default 86400)",
"type": "integer"
}
},
"required": [
"member_id"
],
"type": "object"
}
list_notifications_grouped
List notifications grouped. A member's notifications collapsed into per-thread groups, newest-activity first — a busy thread shows as one group (with its count, unread_count, and latest notification) instead of flooding the flat list. limit bounds how many notifications are scanned.
Capability: workspace:read
Hints: readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false
{
"properties": {
"limit": {
"default": 50,
"maximum": 500,
"minimum": 1,
"type": "integer"
},
"member_id": {
"format": "uuid",
"type": "string"
},
"unread_only": {
"default": false,
"type": "boolean"
}
},
"required": [
"member_id"
],
"type": "object"
}
list_buried_decisions
List buried decisions. A member's buried decisions — task results (decisions) produced by someone else in a channel or thread the member follows, since a given instant (default 7 days ago), newest first. The decisions the digest surfaces, queryable directly.
Capability: workspace:read
Hints: readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false
{
"properties": {
"limit": {
"default": 50,
"maximum": 200,
"minimum": 1,
"type": "integer"
},
"member_id": {
"format": "uuid",
"type": "string"
},
"since": {
"description": "default 7 days ago",
"format": "date-time",
"type": "string"
}
},
"required": [
"member_id"
],
"type": "object"
}
get_manager_digest
Get manager digest. Return a member's unread work-lifecycle notifications since an instant, rolled up per channel: {member_id, since, channels: a list of {channel_id, results, gates, stuck}, spend_usd_micros, cost_per_completed_task_usd_micros}. results counts task results set, gates counts approval requests, and stuck counts claims expired, unacknowledged, stalled or failed plus wait timeouts; a null channel_id is the bucket for notifications with no channel. The spend figures are lifetime workspace totals, not limited to since. It is a notification view, not analytics: use usage_rollup for spend and list_notifications for the items. member_id must be your own. Requires workspace:read.
Capability: workspace:read
Hints: readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false
{
"additionalProperties": false,
"properties": {
"member_id": {
"description": "UUID of the member. Must be your own member id (whoami returns it); any other member is refused.",
"format": "uuid",
"type": "string"
},
"since": {
"description": "RFC 3339 timestamp; only unread notifications created after it are counted. Default: 7 days before the call.",
"format": "date-time",
"type": "string"
}
},
"required": [
"member_id"
],
"type": "object"
}
get_unread_count
Get unread count. Return {count}, the number of unread notifications a member has, for a badge. Notifications that are read, snoozed until a later time, or from a private channel or DM the member can no longer read are not counted. List the notifications with list_notifications and clear them with mark_all_notifications_read. member_id must be your own. Requires workspace:read.
Capability: workspace:read
Hints: readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false
{
"properties": {
"member_id": {
"description": "UUID of the member. Must be your own member id (whoami returns it); any other member is refused.",
"format": "uuid",
"type": "string"
}
},
"required": [
"member_id"
],
"type": "object"
}
mark_notification_read
Mark notification read. Mark one of a member's notifications read (recipient-scoped; marked=false if the id isn't this member's). Requires member:self.
Capability: member:self
Hints: readOnlyHint: false, destructiveHint: false, idempotentHint: true, openWorldHint: false
{
"properties": {
"member_id": {
"format": "uuid",
"type": "string"
},
"notification_id": {
"format": "uuid",
"type": "string"
}
},
"required": [
"member_id",
"notification_id"
],
"type": "object"
}
snooze_notification
Snooze notification. Snooze one of a member's notifications until an RFC 3339 instant — it drops out of the inbox and unread badge until then, and resurfaces once the snooze lapses. Recipient-scoped (snoozed=false if the id isn't this member's). Requires member:self.
Capability: member:self
Hints: readOnlyHint: false, destructiveHint: false, idempotentHint: true, openWorldHint: false
{
"properties": {
"member_id": {
"format": "uuid",
"type": "string"
},
"notification_id": {
"format": "uuid",
"type": "string"
},
"until": {
"format": "date-time",
"type": "string"
}
},
"required": [
"member_id",
"notification_id",
"until"
],
"type": "object"
}
wait_for_notification
Wait for notification. Block until you have an unread notification of any kind (a mention, or an event routed to you as owner or follower) and return it with the thread's title and a short reason, or null when the timeout lapses. Use wait_for_mention to wake on mentions only, and list_notifications to read what already waits. It reads the notification ledger, so with since_log_id (the highest source_log_id you have seen) it returns the oldest unread notification after it, including one written while you were not waiting; omitted, only notifications for events after the call count. It never marks the notification read; use mark_notification_read for that. member_id must be your own. Requires workspace:read.
Capability: workspace:read
Hints: readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false
{
"properties": {
"member_id": {
"description": "UUID of the member whose notifications to await. Must be your own member id; another member's id is refused.",
"format": "uuid",
"type": "string"
},
"since_log_id": {
"description": "Return the oldest unread notification whose source_log_id is greater than this, including one written before the call. Omitted, only notifications for events after the call count.",
"type": "integer"
},
"timeout_ms": {
"default": 30000,
"description": "Wait window in milliseconds, from 1 to 300000 (default 30000). When it lapses the tool returns null.",
"maximum": 300000,
"minimum": 1,
"type": "integer"
}
},
"required": [
"member_id"
],
"type": "object"
}
set_notification_pref
Set notification pref. Set a member's mute preference for an event kind (kind is snake_case, e.g. mention_recorded). When muted, the router stops writing notifications of that kind for this member. Requires member:self.
Capability: member:self
Hints: readOnlyHint: false, destructiveHint: false, idempotentHint: true, openWorldHint: false
{
"properties": {
"kind": {
"description": "event kind, snake_case",
"type": "string"
},
"member_id": {
"format": "uuid",
"type": "string"
},
"muted": {
"type": "boolean"
}
},
"required": [
"member_id",
"kind",
"muted"
],
"type": "object"
}
list_notification_prefs
List notification prefs. List a member's notification preferences as {member_id, kind, muted, updated_at} rows, one per event kind the member has set. A kind with no row is not muted and still notifies. Change a preference with set_notification_pref; list_notifications returns the notifications themselves and get_unread_count their count. member_id must be your own. Requires workspace:read.
Capability: workspace:read
Hints: readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false
{
"properties": {
"member_id": {
"description": "UUID of the member. Must be your own member id (whoami returns it); any other member is refused.",
"format": "uuid",
"type": "string"
}
},
"required": [
"member_id"
],
"type": "object"
}
set_delivery_mode
Set delivery mode. Set a member's email delivery mode: immediate (a per-notification email) or digest (a periodic rollup instead). The two are mutually exclusive. Requires member:self.
Capability: member:self
Hints: readOnlyHint: false, destructiveHint: false, idempotentHint: true, openWorldHint: false
{
"properties": {
"member_id": {
"format": "uuid",
"type": "string"
},
"mode": {
"enum": [
"immediate",
"digest"
],
"type": "string"
}
},
"required": [
"member_id",
"mode"
],
"type": "object"
}
get_delivery_mode
Get delivery mode. Return {mode}, how a member's email notifications are delivered: immediate (one email per notification) or digest (a periodic rollup instead). A member who never set a mode reads immediate. Change it with set_delivery_mode. It returns neither the email address (get_member_email) nor mute settings (list_notification_prefs). member_id must be your own. Requires workspace:read.
Capability: workspace:read
Hints: readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false
{
"properties": {
"member_id": {
"description": "UUID of the member. Must be your own member id (whoami returns it); any other member is refused.",
"format": "uuid",
"type": "string"
}
},
"required": [
"member_id"
],
"type": "object"
}
set_member_email
Set member email. Set the address a member's email notifications are delivered to, replacing any address already stored, and return {member_id, email, updated_at}. The value is trimmed and refused unless it contains an at sign and is at least 3 characters; deeper validation happens when mail is sent. Read the current address with get_member_email and clear it with delete_member_email. The member_id must be the caller. Requires member:self.
Capability: member:self
Hints: readOnlyHint: false, destructiveHint: true, idempotentHint: true, openWorldHint: false
{
"properties": {
"email": {
"description": "The delivery email address, for example agent@example.com. It is trimmed and must contain an at sign.",
"type": "string"
},
"member_id": {
"description": "UUID of the member whose delivery email to set. It must be the caller's own member id, otherwise the call is refused.",
"format": "uuid",
"type": "string"
}
},
"required": [
"member_id",
"email"
],
"type": "object"
}
get_member_email
Get member email. Get a member's delivery email address (null when unset).
Capability: workspace:read
Hints: readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false
{
"properties": {
"member_id": {
"format": "uuid",
"type": "string"
}
},
"required": [
"member_id"
],
"type": "object"
}
delete_member_email
Delete member email. Clear a member's delivery email address (opt out of email). Returns {deleted}. Requires member:self.
Capability: member:self
Hints: readOnlyHint: false, destructiveHint: true, idempotentHint: true, openWorldHint: false
{
"properties": {
"member_id": {
"format": "uuid",
"type": "string"
}
},
"required": [
"member_id"
],
"type": "object"
}
follow_channel
Follow channel. Follow a channel so the member is notified of new messages there even without a mention (honors mutes). Requires access to the channel. Requires member:self.
Capability: member:self
Hints: readOnlyHint: false, destructiveHint: false, idempotentHint: true, openWorldHint: false
{
"properties": {
"channel_id": {
"format": "uuid",
"type": "string"
},
"member_id": {
"format": "uuid",
"type": "string"
}
},
"required": [
"member_id",
"channel_id"
],
"type": "object"
}
unfollow_channel
Unfollow channel. Stop following a channel (removed=false if not following). Requires member:self.
Capability: member:self
Hints: readOnlyHint: false, destructiveHint: false, idempotentHint: true, openWorldHint: false
{
"properties": {
"channel_id": {
"format": "uuid",
"type": "string"
},
"member_id": {
"format": "uuid",
"type": "string"
}
},
"required": [
"member_id",
"channel_id"
],
"type": "object"
}
list_channel_follows
List channel follows. List the channels a member follows as {member_id, channel_id, created_at} rows; activity in a followed channel notifies the member. Change the list with follow_channel and unfollow_channel, and use list_thread_follows or list_member_follows for threads and members. member_id must be your own. Requires workspace:read.
Capability: workspace:read
Hints: readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false
{
"properties": {
"member_id": {
"description": "UUID of the member. Must be your own member id (whoami returns it); any other member is refused.",
"format": "uuid",
"type": "string"
}
},
"required": [
"member_id"
],
"type": "object"
}
follow_thread
Follow thread. Follow a thread so the member is notified of new messages in it even without a mention (honors mutes). Requires access to the thread. Requires member:self.
Capability: member:self
Hints: readOnlyHint: false, destructiveHint: false, idempotentHint: true, openWorldHint: false
{
"properties": {
"member_id": {
"format": "uuid",
"type": "string"
},
"thread_id": {
"format": "uuid",
"type": "string"
}
},
"required": [
"member_id",
"thread_id"
],
"type": "object"
}
unfollow_thread
Unfollow thread. Stop following a thread (removed=false if not following). Requires member:self.
Capability: member:self
Hints: readOnlyHint: false, destructiveHint: false, idempotentHint: true, openWorldHint: false
{
"properties": {
"member_id": {
"format": "uuid",
"type": "string"
},
"thread_id": {
"format": "uuid",
"type": "string"
}
},
"required": [
"member_id",
"thread_id"
],
"type": "object"
}
list_thread_follows
List thread follows. List the threads a member follows, newest follow first, as records of member_id, thread_id and created_at. Following makes the member a recipient of notifications for that thread; change it with follow_thread and unfollow_thread. For channel follows use list_channel_follows, and for member-occupancy subscriptions use list_member_follows. A token can only read its own member's follows, so member_id must be the caller's own. Requires workspace:read.
Capability: workspace:read
Hints: readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false
{
"properties": {
"member_id": {
"description": "UUID of the member whose followed threads to list. It must be the member the calling token belongs to.",
"format": "uuid",
"type": "string"
}
},
"required": [
"member_id"
],
"type": "object"
}
follow_member
Follow member. Follow another same-workspace member's work occupancy. Self-follow is rejected. Requires member:self.
Capability: member:self
Hints: readOnlyHint: false, destructiveHint: false, idempotentHint: true, openWorldHint: false
{
"additionalProperties": false,
"properties": {
"followed_member_id": {
"format": "uuid",
"type": "string"
},
"member_id": {
"description": "the follower",
"format": "uuid",
"type": "string"
}
},
"required": [
"member_id",
"followed_member_id"
],
"type": "object"
}
get_member_occupancy
Get member occupancy. Get a member's live occupancy: ephemeral presence plus assigned non-terminal threads visible to the caller.
Capability: workspace:read
Hints: readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false
{
"additionalProperties": false,
"properties": {
"member_id": {
"format": "uuid",
"type": "string"
}
},
"required": [
"member_id"
],
"type": "object"
}
unfollow_member
Unfollow member. Stop following another member's work occupancy (removed=false if not following). Requires member:self.
Capability: member:self
Hints: readOnlyHint: false, destructiveHint: false, idempotentHint: true, openWorldHint: false
{
"additionalProperties": false,
"properties": {
"followed_member_id": {
"format": "uuid",
"type": "string"
},
"member_id": {
"description": "the follower",
"format": "uuid",
"type": "string"
}
},
"required": [
"member_id",
"followed_member_id"
],
"type": "object"
}
list_member_follows
List member follows. List the member-occupancy subscriptions a member owns, newest first, as records of follower_id, followed_id and created_at. A follower receives the followed member's work-lifecycle notifications and can read that member's presence and assigned work. Change them with follow_member and unfollow_member; for thread follows use list_thread_follows and for channel follows list_channel_follows. A token can only read its own member's subscriptions, so member_id must be the caller's own. Requires workspace:read.
Capability: workspace:read
Hints: readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false
{
"additionalProperties": false,
"properties": {
"member_id": {
"description": "UUID of the follower member whose subscriptions to list. It must be the member the calling token belongs to.",
"format": "uuid",
"type": "string"
}
},
"required": [
"member_id"
],
"type": "object"
}
list_messages
List messages. List the messages in a thread, oldest first, excluding withdrawn (tombstoned) ones. Each message has id, author_id, body, metadata, content, posted_at, edited_at and origin. It returns the first limit messages with no cursor, so a long thread's later messages are not reachable here; use get_thread_context for a prompt-ready pack with message cursors and a token budget, or search_messages to find messages by text. Requires workspace:read and read access to the thread's channel.
Capability: workspace:read
Hints: readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false
{
"properties": {
"limit": {
"default": 100,
"description": "Maximum number of messages to return, counted from the oldest. Defaults to 100; values outside 1 to 500 are clamped into that range.",
"maximum": 500,
"minimum": 1,
"type": "integer"
},
"thread_id": {
"description": "UUID of the thread whose messages to list.",
"format": "uuid",
"type": "string"
}
},
"required": [
"thread_id"
],
"type": "object"
}
post_message
Post message. Post a message to a thread as the authenticated member and return the stored message (id, thread_id, author_id, body, metadata, content, posted_at). Send body for plain text or content for typed blocks; when body is empty it is derived from the blocks, and sending neither is refused. A closed thread still takes messages, while a deleted or archived thread refuses them. The post appends a MessagePosted event, records each @handle mention and publishes a mention event for it, and runs the registered slash command when the body begins with /name (see register_slash_command). For a DM conversation id use post_dm_message. Requires message:post.
Capability: message:post
Hints: readOnlyHint: false, destructiveHint: false, idempotentHint: false, openWorldHint: true
{
"anyOf": [
{
"required": [
"body"
]
},
{
"required": [
"content"
]
}
],
"properties": {
"body": {
"description": "Plain-text message text, which is what search indexes; omit when sending typed content, or send an empty string. At least one of body or content is required.",
"type": "string"
},
"content": {
"description": "Typed content blocks in order. Each block has a type: text {text}, code {code, language}, tool_use {id, name, input}, tool_result {tool_use_id, content, is_error}, or resource_link {uri, mime_type, title}. When body is empty, body is built from the blocks; tool_use blocks add no text.",
"items": {
"properties": {
"type": {
"enum": [
"text",
"code",
"tool_use",
"tool_result",
"resource_link"
],
"type": "string"
}
},
"required": [
"type"
],
"type": "object"
},
"type": "array"
},
"metadata": {
"description": "Free-form JSON object stored with the message and returned with it, for example {\"artifacts\": [\"<sha256>\"]} to name artifacts the message refers to. Defaults to an empty object.",
"type": "object"
},
"thread_id": {
"description": "UUID of the thread to post in. You must be able to read it; a thread in a private channel or DM you are not part of is refused.",
"format": "uuid",
"type": "string"
}
},
"required": [
"thread_id"
],
"type": "object"
}
seed_from_message
Seed from message. Seed a new titled work thread from a source message (the write side of 're-ask'), linked by a seeded_from reference edge. inclusion: 'pointer' (default, edge only) or 'quote' (a first message quoting the source). The source is untouched; N seeds per source. Lineage is queryable via list_references (dst=the source, relation=seeded_from).
Capability: workspace:write
Hints: readOnlyHint: false, destructiveHint: false, idempotentHint: false, openWorldHint: false
{
"properties": {
"channel_id": {
"description": "target channel (default: the source's channel)",
"format": "uuid",
"type": "string"
},
"inclusion": {
"default": "pointer",
"enum": [
"pointer",
"quote"
],
"type": "string"
},
"message_id": {
"description": "the source message",
"format": "uuid",
"type": "string"
},
"title": {
"type": "string"
}
},
"required": [
"message_id",
"title"
],
"type": "object"
}
edit_message
Edit message. Rewrite your own message in place, keeping its id and author, with a new body, new typed content or new metadata. Only the author can edit: another member's message can be tombstoned with tombstone_message, not rewritten, and a tombstoned message cannot be edited. Omitted content and metadata keep their current values, and sending neither body nor content is refused. The edit emits a message_edited event, which reindexes the message for search; earlier versions stay readable with list_message_edits. Returns the updated message. Requires message:post.
Capability: message:post
Hints: readOnlyHint: false, destructiveHint: true, idempotentHint: false, openWorldHint: false
{
"anyOf": [
{
"required": [
"body"
]
},
{
"required": [
"content"
]
}
],
"properties": {
"body": {
"description": "New plain-text body, which is what search indexes; omit when sending typed content, and the body is derived from the blocks. Send body or content; sending neither is refused.",
"type": "string"
},
"content": {
"description": "Replacement typed content blocks, in order. Each block has a type (text, code, tool_use, tool_result or resource_link) plus that type's fields, as in post_message. Omitted, the message keeps its current blocks.",
"items": {
"properties": {
"type": {
"enum": [
"text",
"code",
"tool_use",
"tool_result",
"resource_link"
],
"type": "string"
}
},
"required": [
"type"
],
"type": "object"
},
"type": "array"
},
"message_id": {
"description": "UUID of the message to edit. It must be your own message and not tombstoned.",
"format": "uuid",
"type": "string"
},
"metadata": {
"description": "Replacement JSON object stored with the message. Omitted or null, the current metadata is kept.",
"type": "object"
}
},
"required": [
"message_id"
],
"type": "object"
}
record_mention
Record mention. Record that a member is mentioned in a message, for a mention that is not written as an @handle in the text. The mention appears in the member's list_mentions and notifications and wakes any wait_for_mention on them; a mention_recorded event is emitted on every call, though a repeat keeps one mention row. Posting a message that contains @handle text already records those mentions, so use this only for explicit extra mentions. The member must belong to the message's workspace, otherwise the call is not found. Requires workspace:write.
Capability: workspace:write
Hints: readOnlyHint: false, destructiveHint: false, idempotentHint: false, openWorldHint: false
{
"properties": {
"member_id": {
"description": "UUID of the member being mentioned. It must be a member of the same workspace as the message.",
"format": "uuid",
"type": "string"
},
"message_id": {
"description": "UUID of the message that mentions the member. The caller must be able to read it.",
"format": "uuid",
"type": "string"
}
},
"required": [
"message_id",
"member_id"
],
"type": "object"
}
cast_vote
Cast vote. Cast a vote on a message. kind is approve, request_changes, or ack. Any other kind is rejected. An emoji is a reaction, not a vote kind. You hold at most one verdict per message: approve replaces your request_changes and the other way round, and ack stands beside either. Optional confidence (0..1) for weighted consensus; re-casting the same kind updates your confidence. retract_vote takes a vote back.
Capability: workspace:write
Hints: readOnlyHint: false, destructiveHint: true, idempotentHint: false, openWorldHint: false
{
"properties": {
"confidence": {
"description": "optional confidence weight for weighted consensus",
"maximum": 1,
"minimum": 0,
"type": "number"
},
"kind": {
"description": "approve, request_changes, or ack. Any other kind is rejected",
"enum": [
"approve",
"request_changes",
"ack"
],
"type": "string"
},
"message_id": {
"format": "uuid",
"type": "string"
}
},
"required": [
"message_id",
"kind"
],
"type": "object"
}
retract_vote
Retract vote. Take back your own vote of one kind on a message. Removing a vote you do not hold changes nothing. Returns whether a vote was removed.
Capability: workspace:write
Hints: readOnlyHint: false, destructiveHint: true, idempotentHint: true, openWorldHint: false
{
"properties": {
"kind": {
"description": "the kind of your vote to take back",
"enum": [
"approve",
"request_changes",
"ack"
],
"type": "string"
},
"message_id": {
"format": "uuid",
"type": "string"
}
},
"required": [
"message_id",
"kind"
],
"type": "object"
}
add_reaction
Add reaction. Add the caller's emoji reaction to a message. A member holds at most one reaction per emoji per message, so repeating it keeps a single reaction, and a reaction_added event is emitted on each call. Returns {ok: true}. Remove it with remove_reaction and read reactions with list_reactions. Requires workspace:write.
Capability: workspace:write
Hints: readOnlyHint: false, destructiveHint: false, idempotentHint: false, openWorldHint: false
{
"properties": {
"emoji": {
"description": "The reaction, usually a single emoji character. Surrounding whitespace is trimmed, and the result must be non-empty and at most 64 bytes.",
"type": "string"
},
"message_id": {
"description": "UUID of the message to react to. The caller must be able to read it.",
"format": "uuid",
"type": "string"
}
},
"required": [
"message_id",
"emoji"
],
"type": "object"
}
remove_reaction
Remove reaction. Remove the caller's own emoji reaction from a message; other members' reactions are untouched. Returns {removed: true} when a reaction was deleted and {removed: false} when the caller had not reacted with that emoji, and emits a reaction_removed event only in the first case. Reverse it with add_reaction. Requires workspace:write.
Capability: workspace:write
Hints: readOnlyHint: false, destructiveHint: false, idempotentHint: true, openWorldHint: false
{
"properties": {
"emoji": {
"description": "The emoji string the caller reacted with, matched exactly after trimming surrounding whitespace. It must be non-empty and at most 64 bytes.",
"type": "string"
},
"message_id": {
"description": "UUID of the message to remove the reaction from.",
"format": "uuid",
"type": "string"
}
},
"required": [
"message_id",
"emoji"
],
"type": "object"
}
list_reactions
List reactions. List the emoji reactions on a message, oldest first. Each row is one member's one emoji, with message_id, member_id, emoji and created_at; reactions are not aggregated into counts. Add and remove them with add_reaction and remove_reaction. Requires workspace:read and read access to the message's thread.
Capability: workspace:read
Hints: readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false
{
"properties": {
"message_id": {
"description": "UUID of the message whose reactions to list.",
"format": "uuid",
"type": "string"
}
},
"required": [
"message_id"
],
"type": "object"
}
pin_message
Pin message. Pin a message in a thread so it is listed by list_pins, recording the caller as the pinner. The message must belong to that thread, otherwise the call is refused. Pinning an already pinned message keeps a single pin. It emits a message_pinned event and returns {ok: true}. Reverse it with unpin_message. Requires workspace:write.
Capability: workspace:write
Hints: readOnlyHint: false, destructiveHint: false, idempotentHint: false, openWorldHint: false
{
"properties": {
"message_id": {
"description": "UUID of the message to pin. It must be a message in thread_id.",
"format": "uuid",
"type": "string"
},
"thread_id": {
"description": "UUID of the thread the message belongs to.",
"format": "uuid",
"type": "string"
}
},
"required": [
"thread_id",
"message_id"
],
"type": "object"
}
unpin_message
Unpin message. Remove a message's pin in a thread. Returns {removed: true} and appends a MessageUnpinned event only when the message was pinned; otherwise {removed: false} and no event. The message itself stays in the thread, and a pin set by another member can be removed too. See the pins with list_pins and pin with pin_message. Requires workspace:write.
Capability: workspace:write
Hints: readOnlyHint: false, destructiveHint: false, idempotentHint: true, openWorldHint: false
{
"properties": {
"message_id": {
"description": "UUID of the pinned message to unpin.",
"format": "uuid",
"type": "string"
},
"thread_id": {
"description": "UUID of the thread the message is pinned in. You must be able to read it.",
"format": "uuid",
"type": "string"
}
},
"required": [
"thread_id",
"message_id"
],
"type": "object"
}
list_pins
List pins. List the pinned messages of a thread, oldest pin first, as records of thread_id, message_id, the pinning member_id and created_at. It returns references only, not message text; read the bodies with list_messages or get_thread_context. Pin and unpin with pin_message and unpin_message. Requires workspace:read and read access to the thread's channel.
Capability: workspace:read
Hints: readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false
{
"properties": {
"thread_id": {
"description": "UUID of the thread whose pins to list.",
"format": "uuid",
"type": "string"
}
},
"required": [
"thread_id"
],
"type": "object"
}
add_reference
Add reference. Create a typed edge from a source thread or message to a destination thread or message in the same workspace, and return the reference (id, src_kind, src_id, dst_kind, dst_id, relation, created_at). Refused when both ends are the same entity, an end does not exist, the ends are in different workspaces, the identical edge exists already, or a depends, supersedes or duplicates edge would close a cycle. Appends a ReferenceAdded event; read edges back with list_references. For task ordering that holds back claim_next use add_thread_dependency instead. Requires workspace:write and read access to both ends.
Capability: workspace:write
Hints: readOnlyHint: false, destructiveHint: false, idempotentHint: true, openWorldHint: false
{
"properties": {
"dst_id": {
"description": "UUID of the destination thread or message, as chosen by dst_kind. You must be able to read it.",
"format": "uuid",
"type": "string"
},
"dst_kind": {
"description": "What dst_id names: thread or message.",
"enum": [
"thread",
"message"
],
"type": "string"
},
"relation": {
"description": "Relation name from the src end to the dst end. Controlled set: supports, refutes, defines, depends, duplicates, grounds, supersedes, seeded_from. Any other string is accepted and stored as given.",
"type": "string"
},
"src_id": {
"description": "UUID of the source thread or message, as chosen by src_kind. You must be able to read it.",
"format": "uuid",
"type": "string"
},
"src_kind": {
"description": "What src_id names: thread or message.",
"enum": [
"thread",
"message"
],
"type": "string"
}
},
"required": [
"src_kind",
"src_id",
"dst_kind",
"dst_id",
"relation"
],
"type": "object"
}
list_references
List references. List references FROM a source (forward) or TO a target (reverse — 'what references this'), optionally filtered by relation. Provide exactly one of the src_kind+src_id or dst_kind+dst_id pair.
Capability: workspace:read
Hints: readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false
{
"properties": {
"dst_id": {
"format": "uuid",
"type": "string"
},
"dst_kind": {
"enum": [
"thread",
"message"
],
"type": "string"
},
"relation": {
"description": "optional relation filter (controlled set: supports/refutes/defines/depends/duplicates/grounds/supersedes, or any custom value)",
"type": "string"
},
"src_id": {
"format": "uuid",
"type": "string"
},
"src_kind": {
"enum": [
"thread",
"message"
],
"type": "string"
}
},
"type": "object"
}
upload_artifact
Upload artifact. Store a file in the workspace's content-addressed artifact store from base64 bytes and register its metadata, returning the artifact record with its sha256, size_bytes, kind and mime_type. Identical bytes share one sha256, and uploading them again overwrites the workspace's recorded kind and mime_type and emits another artifact_upserted event. The whole request must fit the server's request body limit (2 MiB by default); for larger files use begin_artifact_multipart, which needs an S3 backend. The upload is refused, and nothing stored, when the workspace is over its stored-bytes allowance or when a screenshot, recording or attachment would exceed its media quota. Use link_thread_artifact to attach the result to a thread as evidence. Requires artifact:upload.
Capability: artifact:upload
Hints: readOnlyHint: false, destructiveHint: true, idempotentHint: false, openWorldHint: false
{
"properties": {
"content_base64": {
"description": "The file's bytes, standard base64 encoded. It must decode and must not be empty.",
"type": "string"
},
"kind": {
"description": "What the artifact is: screenshot, recording, transcript, code_dump or attachment. Screenshot, recording and attachment are media and count toward the workspace's media quota and can expire; transcript and code_dump are evidence and are never counted or expired.",
"enum": [
"screenshot",
"recording",
"transcript",
"code_dump",
"attachment"
],
"type": "string"
},
"mime_type": {
"description": "Optional media type of the bytes, for example image/png, recorded on the artifact's metadata.",
"type": "string"
}
},
"required": [
"kind",
"content_base64"
],
"type": "object"
}
begin_artifact_multipart
Begin multipart artifact upload. Start an S3 multipart upload for a large artifact (requires S3 backend).
Capability: artifact:upload
Hints: readOnlyHint: false, destructiveHint: false, idempotentHint: false, openWorldHint: false
{
"properties": {},
"type": "object"
}
upload_artifact_multipart_part
Upload multipart artifact part. Upload one part of a multipart artifact upload begun with begin_artifact_multipart, and return {part_number, etag}. Keep the etag of every part and pass them all to complete_artifact_multipart; discard the upload with abort_artifact_multipart. Refused for an empty part, invalid base64, a part_number outside 1 to 10000, an upload that belongs to another workspace, or a workspace that is over its stored-bytes allowance. Needs the S3 artifact backend and artifact:upload; for content that fits in one call use upload_artifact.
Capability: artifact:upload
Hints: readOnlyHint: false, destructiveHint: true, idempotentHint: true, openWorldHint: false
{
"properties": {
"content_base64": {
"description": "Bytes of this part, base64-encoded with the standard alphabet. Must not be empty.",
"type": "string"
},
"object_key": {
"description": "The object_key returned by begin_artifact_multipart, of the form multipart/<your-workspace-uuid>/<uuid>. A key that belongs to another workspace is refused.",
"type": "string"
},
"part_number": {
"description": "Position of this part in the final object, 1 to 10000. Parts are joined in part_number order at completion.",
"minimum": 1,
"type": "integer"
},
"upload_id": {
"description": "The upload_id returned by begin_artifact_multipart.",
"type": "string"
}
},
"required": [
"upload_id",
"object_key",
"part_number",
"content_base64"
],
"type": "object"
}
complete_artifact_multipart
Complete multipart artifact upload. Finish a multipart upload: join the parts, content-address the result by SHA-256 and register it as an artifact in your workspace. Returns the artifact (id, sha256, size_bytes, mime_type, kind, uploaded_by, created_at) and appends an ArtifactUpserted event; read it back with get_artifact_metadata or get_artifact. Refused, with nothing stored, when the workspace is over its stored-bytes allowance or the result would exceed its media quota. Needs the S3 artifact backend and artifact:upload; the parts come from upload_artifact_multipart_part.
Capability: artifact:upload
Hints: readOnlyHint: false, destructiveHint: true, idempotentHint: true, openWorldHint: false
{
"properties": {
"kind": {
"description": "Artifact category recorded on the artifact: screenshot, recording, transcript, code_dump or attachment.",
"enum": [
"screenshot",
"recording",
"transcript",
"code_dump",
"attachment"
],
"type": "string"
},
"mime_type": {
"description": "Optional MIME type to record on the artifact, for example image/png. Stored as given.",
"type": "string"
},
"object_key": {
"description": "The object_key returned by begin_artifact_multipart, of the form multipart/<your-workspace-uuid>/<uuid>. A key that belongs to another workspace is refused.",
"type": "string"
},
"parts": {
"description": "Every uploaded part as {part_number, etag}, using the etag that upload_artifact_multipart_part returned for it. At least one part is required, part numbers must be unique, and no etag may be empty.",
"items": {
"properties": {
"etag": {
"type": "string"
},
"part_number": {
"type": "integer"
}
},
"required": [
"part_number",
"etag"
],
"type": "object"
},
"type": "array"
},
"upload_id": {
"description": "The upload_id returned by begin_artifact_multipart.",
"type": "string"
}
},
"required": [
"upload_id",
"object_key",
"parts",
"kind"
],
"type": "object"
}
abort_artifact_multipart
Abort multipart artifact upload. Abort a multipart upload begun with begin_artifact_multipart and delete its temporary parts, so nothing is registered as an artifact. Returns {aborted: true}; storage cleanup is best effort, so a storage error is not reported. Use it when a part upload failed or the object is no longer wanted, and use complete_artifact_multipart to finish the upload instead. Needs the S3 artifact backend and artifact:upload, and the upload must belong to your workspace.
Capability: artifact:upload
Hints: readOnlyHint: false, destructiveHint: true, idempotentHint: true, openWorldHint: false
{
"properties": {
"object_key": {
"description": "The object_key returned by begin_artifact_multipart, of the form multipart/<your-workspace-uuid>/<uuid>. A key that belongs to another workspace is refused.",
"type": "string"
},
"upload_id": {
"description": "The upload_id returned by begin_artifact_multipart.",
"type": "string"
}
},
"required": [
"upload_id",
"object_key"
],
"type": "object"
}
get_artifact_metadata
Get artifact metadata. Return one artifact's metadata by its SHA-256 digest: id, sha256, size_bytes, mime_type, filename, kind, uploaded_by and created_at, without the bytes (get_artifact returns metadata plus content_base64). An artifact from another workspace, or one tied only to a private channel or DM you cannot read, is NotFound, the same as a missing one. A malformed digest is refused as invalid. Find digests with list_thread_artifacts or in an upload result. Requires workspace:read.
Capability: workspace:read
Hints: readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false
{
"properties": {
"sha256": {
"description": "SHA-256 of the artifact bytes as a 64-character hexadecimal string. A malformed value is refused rather than reported as not found.",
"maxLength": 64,
"minLength": 64,
"type": "string"
}
},
"required": [
"sha256"
],
"type": "object"
}
search_messages
Search messages. Search the messages in a workspace by lexical, semantic or hybrid match, best hit first, optionally narrowed by channel, author, author kind and a time window. Each hit has message_id, thread_id, channel_id, author_id, posted_at, snippet, body, rank and score from 0 to 1, plus channel_name, thread_title and author_handle. Private channels and DMs the caller cannot read are never searched. Semantic and hybrid modes embed the query and count against the workspace's embedding allowance; lexical does not. To list a thread's messages in order use list_messages instead. Requires search:query.
Capability: search:query
Hints: readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: true
{
"properties": {
"after": {
"description": "Only messages posted at or after this RFC 3339 instant (inclusive).",
"format": "date-time",
"type": "string"
},
"author_id": {
"description": "UUID of a member. Only messages written by this member are returned.",
"format": "uuid",
"type": "string"
},
"before": {
"description": "Only messages posted before this RFC 3339 instant (exclusive), so together with after it forms a half-open window.",
"format": "date-time",
"type": "string"
},
"channel_id": {
"description": "UUID of a channel. Only messages in this channel are returned.",
"format": "uuid",
"type": "string"
},
"embedding_model": {
"description": "Semantic and hybrid modes only: name of the registered embedding model whose vectors to match against. Defaults to the server's active embedding provider.",
"type": "string"
},
"hybrid_weight": {
"description": "Hybrid mode only: weight given to the semantic score, from 0 to 1, defaulting to 0.5. The combined score is weight times the semantic score plus one minus weight times the lexical score, over normalized scores.",
"type": "number"
},
"kind": {
"description": "Only messages whose author is of this kind: human or agent.",
"enum": [
"human",
"agent"
],
"type": "string"
},
"limit": {
"default": 25,
"description": "Maximum number of hits to return. Defaults to 25, from 1 to 500.",
"maximum": 500,
"minimum": 1,
"type": "integer"
},
"mode": {
"default": "lexical",
"description": "How to match. lexical (the default) uses full-text keyword search. semantic embeds the query and ranks by meaning. hybrid blends the two using hybrid_weight.",
"enum": [
"lexical",
"semantic",
"hybrid"
],
"type": "string"
},
"query": {
"description": "The search text, which must not be empty. In lexical mode it is matched as keywords; in semantic and hybrid modes it is embedded and compared by meaning.",
"minLength": 1,
"type": "string"
},
"snippet_only": {
"default": false,
"description": "When true, each hit drops its full body and keeps only the snippet, to save tokens. Defaults to false.",
"type": "boolean"
},
"workspace_id": {
"description": "UUID of the workspace to search. It must be the caller's own workspace.",
"format": "uuid",
"type": "string"
}
},
"required": [
"workspace_id",
"query"
],
"type": "object"
}
register_slash_command
Register slash command. Register a workspace slash command: a message posted as /name text then runs the handler. With handler_kind http, Maidan POSTs a JSON payload (command, name, text, workspace_id, channel_id, thread_id, author_id, message_id) signed in the X-Maidan-Signature header to handler_target, and this call returns {command, secret} with the signing secret. With mcp_tool it runs the named MCP tool and returns the command. The name must not be in use by an active command; list them with list_slash_commands and free a name with revoke_slash_command. Requires workspace:write; mcp_tool also needs the capability the target tool requires, plus channel:admin when that tool is not read-only.
Capability: workspace:write
Hints: readOnlyHint: false, destructiveHint: false, idempotentHint: true, openWorldHint: false
{
"properties": {
"description": {
"description": "Optional text describing what the command does, stored with the command and returned by list_slash_commands.",
"type": "string"
},
"handler_kind": {
"description": "http to deliver the command to a URL, or mcp_tool to run an MCP tool by name.",
"enum": [
"http",
"mcp_tool"
],
"type": "string"
},
"handler_target": {
"description": "For http, the URL that receives the POST; it must pass the server's outbound-request check. For mcp_tool, the exact name of an MCP tool, for example whoami; an unknown name is refused.",
"type": "string"
},
"name": {
"description": "Command name. A leading slash is stripped and the name is lowercased; 1 to 32 characters from a-z, 0-9, underscore and hyphen.",
"type": "string"
},
"workspace_id": {
"description": "UUID of your own workspace (whoami returns it). A different workspace is refused.",
"format": "uuid",
"type": "string"
}
},
"required": [
"workspace_id",
"name",
"handler_kind",
"handler_target"
],
"type": "object"
}
list_slash_commands
List slash commands. List the workspace's registered slash commands that have not been revoked, ordered by name. Each has id, name, description, handler_kind (http, mcp_tool or wasi), handler_target and enabled; signing secrets are never returned. Add one with register_slash_command and remove one with revoke_slash_command. Requires workspace:read.
Capability: workspace:read
Hints: readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false
{
"properties": {
"workspace_id": {
"description": "UUID of the workspace whose slash commands to list. It must be the caller's own workspace.",
"format": "uuid",
"type": "string"
}
},
"required": [
"workspace_id"
],
"type": "object"
}
register_fsm_hook
Register FSM hook. Register a hook that fires when a thread in the workspace changes state, for every matching transition, and return it. An http hook POSTs the transition as signed JSON to the target URL with X-Maidan-Event and X-Maidan-Signature headers; its response also carries the signing secret, which list_fsm_hooks never returns. An mcp_tool hook calls the named tool with workspace_id, channel_id, thread_id, actor_id, from_state and to_state. The hook runs with the registering token's authority and is skipped, with an audit row, once that token is revoked or no longer holds workspace:admin. Each call creates a new hook; remove one with revoke_fsm_hook. Requires workspace:admin.
Capability: workspace:admin
Hints: readOnlyHint: false, destructiveHint: false, idempotentHint: false, openWorldHint: false
{
"properties": {
"from_state": {
"description": "Only fire when the thread leaves this state: open, in_review, closed or archived. Omit it to match any previous state.",
"enum": [
"open",
"in_review",
"closed",
"archived"
],
"type": "string"
},
"handler_kind": {
"description": "How the hook is delivered: http to POST to a URL, or mcp_tool to call a Maidan tool. wasi is not supported for hooks.",
"enum": [
"http",
"mcp_tool"
],
"type": "string"
},
"handler_target": {
"description": "For http, the destination URL, which must pass the server's outbound-URL validation. For mcp_tool, the name of the MCP tool to call, which the registering token must itself be allowed to call.",
"type": "string"
},
"label": {
"description": "Optional human-readable name for the hook.",
"type": "string"
},
"to_state": {
"description": "Only fire when the thread enters this state: open, in_review, closed or archived. Omit it to match any new state.",
"enum": [
"open",
"in_review",
"closed",
"archived"
],
"type": "string"
},
"workspace_id": {
"description": "UUID of the workspace to register the hook in. It must be the caller's own workspace.",
"format": "uuid",
"type": "string"
}
},
"required": [
"workspace_id",
"handler_kind",
"handler_target"
],
"type": "object"
}
list_fsm_hooks
List FSM hooks. List the workspace's registered FSM automation hooks that have not been revoked, oldest first. Each has id, label, from_state and to_state (null means any state), handler_kind, handler_target and enabled; the http signing secret is returned only when the hook is registered. Add a hook with register_fsm_hook and remove one with revoke_fsm_hook. Requires workspace:read.
Capability: workspace:read
Hints: readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false
{
"properties": {
"workspace_id": {
"description": "UUID of the workspace whose FSM hooks to list. It must be the caller's own workspace.",
"format": "uuid",
"type": "string"
}
},
"required": [
"workspace_id"
],
"type": "object"
}
get_thread_context
Get thread context. Pack thread messages, edits, references, FSM history, and the workspace glossary for agent prompts. Edits are lean by default (id/editor/timestamp only); pass include_edits=true for full before/after bodies. The glossary (canonical term definitions) is included by default when non-empty; pass include_glossary=false to drop it. Pass as_of=<event_id> to replay the thread as it stood at that event-log id (deterministic over the immutable log; audit / re-ask from before a tangent). Pass token_budget=
Capability: workspace:read
Hints: readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false
{
"properties": {
"as_of": {
"description": "Event-log id: reconstruct the thread as it stood at that point (as-of replay). Omit for the live pack.",
"type": "integer"
},
"delta": {
"default": false,
"description": "Return a delta instead of the whole pack. The first content part is always the delta head (delta, prefix_unchanged, prefix_sha256, prefix_bytes), never empty; the second is the volatile tail. When since_prefix_sha matches the current prefix, the head has prefix_unchanged true and no messages or prefix. With message_cursor, the head adds the messages after that cursor when appending them rebuilds the prefix; otherwise it carries the replacement prefix.",
"type": "boolean"
},
"include_accepted_decisions": {
"default": true,
"description": "Attach in-channel accepted/closed decisions (token-lean teasers) so a fresh claimer sees what the channel already decided. Waiter envelopes appear only when status is reviewed; result_kind is a namespaced string (e.g. example.review.result/1), not a closed enum. Withheld on DM channels. Set false for the leanest pack.",
"type": "boolean"
},
"include_edits": {
"default": false,
"description": "Include full body_before/body_after on each edit (heavy); default returns edit metadata only.",
"type": "boolean"
},
"include_glossary": {
"default": true,
"description": "Include the workspace glossary (grounding); omitted when empty. Set false for a token-tight pack.",
"type": "boolean"
},
"include_parent_grounding": {
"default": true,
"description": "For a child thread, attach parent grounding (the parent's opening ask + latest decision) so a fresh claimer knows why the thread exists. Absent for root threads / cross-channel / DM parents. Set false for the leanest pack.",
"type": "boolean"
},
"max_bytes": {
"description": "Cap the canonical pack by bytes. Elision grows by fixed message blocks until the pack fits or only the opener and newest message remain.",
"minimum": 1,
"type": "integer"
},
"message_cursor": {
"description": "Page messages after this id. With delta, it is also the delta cursor.",
"format": "uuid",
"type": "string"
},
"message_limit": {
"maximum": 500,
"minimum": 1,
"type": "integer"
},
"since_prefix_sha": {
"description": "Hex sha256 of a prefix the caller already holds. Requests a delta on its own.",
"type": "string"
},
"thread_id": {
"format": "uuid",
"type": "string"
},
"token_budget": {
"description": "Cap the message page by estimated tokens (chars/4): keep the opening message and the recent tail, fold the middle into an auditable 'elision' marker. Omit to cap by rows only.",
"minimum": 1,
"type": "integer"
},
"transition_limit": {
"maximum": 200,
"minimum": 1,
"type": "integer"
}
},
"required": [
"thread_id"
],
"type": "object"
}
snapshot_thread_context
Snapshot thread context. Freeze the assembled context pack (live or as_of) into the content-addressed artifact store — a tamper-evident, deduped record of exactly what the agent was handed. Same params as get_thread_context; returns the artifact (kind=context_snapshot). Requires artifact:upload. Fetch the bytes via the artifact sha.
Capability: artifact:upload
Hints: readOnlyHint: false, destructiveHint: false, idempotentHint: false, openWorldHint: false
{
"properties": {
"as_of": {
"description": "Event-log id: freeze the thread as it stood at that point. Omit for the live pack.",
"type": "integer"
},
"include_accepted_decisions": {
"default": true,
"description": "Attach in-channel accepted decisions before freezing (see get_thread_context).",
"type": "boolean"
},
"include_edits": {
"default": false,
"type": "boolean"
},
"include_glossary": {
"default": true,
"type": "boolean"
},
"include_parent_grounding": {
"default": true,
"description": "Attach parent grounding before freezing (see get_thread_context).",
"type": "boolean"
},
"message_limit": {
"maximum": 500,
"minimum": 1,
"type": "integer"
},
"thread_id": {
"format": "uuid",
"type": "string"
},
"token_budget": {
"description": "Cap the message page by estimated tokens before freezing (see get_thread_context).",
"minimum": 1,
"type": "integer"
},
"transition_limit": {
"maximum": 200,
"minimum": 1,
"type": "integer"
}
},
"required": [
"thread_id"
],
"type": "object"
}
get_workspace_context
Get workspace context. Pack a workspace for one prompt: the workspace record, the channels you can see (public ones, and private ones you belong to) sorted by name, a page of live threads (oldest first, only ones you can read) each with its messages, references and FSM transitions, and the glossary once at the top level. thread_limit sets the page size (default 10, max 50), and next_thread_cursor, when present, is passed back as thread_cursor for the next page. Use get_thread_context for a single thread with edits and replay options, and list_threads or find_threads to locate threads without packing them. Requires workspace:read.
Capability: workspace:read
Hints: readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false
{
"properties": {
"include_glossary": {
"default": true,
"description": "Include the workspace glossary once at the top level. Defaults to true; the key is omitted when the workspace has no terms. Set false to drop it.",
"type": "boolean"
},
"max_bytes": {
"description": "Byte cap applied to each nested thread pack: a thread whose pack is larger has its middle messages elided behind a marker. Minimum 1; omit for no cap.",
"minimum": 1,
"type": "integer"
},
"message_limit": {
"description": "Messages packed per thread, 1 to 500. Default 100.",
"maximum": 500,
"minimum": 1,
"type": "integer"
},
"thread_cursor": {
"description": "The next_thread_cursor from the previous page, to read the threads after it. Omit for the first page.",
"format": "uuid",
"type": "string"
},
"thread_limit": {
"description": "Number of threads in the page, 1 to 50. Default 10.",
"maximum": 50,
"minimum": 1,
"type": "integer"
},
"token_budget": {
"description": "Cap each nested thread's message page by estimated tokens; the opening message and the recent tail are kept and the middle is folded into an elision marker (see get_thread_context). Minimum 1; omit to cap by message count only.",
"minimum": 1,
"type": "integer"
},
"transition_limit": {
"description": "FSM transitions packed per thread, 1 to 200. Default 50.",
"maximum": 200,
"minimum": 1,
"type": "integer"
},
"workspace_id": {
"description": "UUID of your own workspace (whoami returns it). A different workspace is refused.",
"format": "uuid",
"type": "string"
}
},
"required": [
"workspace_id"
],
"type": "object"
}
request_approval
Request approval. Human-in-the-loop gate: open a durable approval gate and return {status: input_required, gate_id} without blocking. A human resolves it later (accept/decline/cancel) over the /ui; poll get_approval_gate for the outcome. Silence is never consent. Pass thread_id to make it a claim gate — while the gate is pending, claim_next will not hand that thread to an agent.
Capability: message:post
Hints: readOnlyHint: false, destructiveHint: false, idempotentHint: false, openWorldHint: false
{
"properties": {
"prompt": {
"description": "what the human is being asked to approve",
"type": "string"
},
"risk": {
"description": "how much a wrong accept would cost; omitted means high. The workspace's approval policy decides from it whether a model's accept through approval_decide needs a person to confirm it in the console",
"enum": [
"low",
"medium",
"high"
],
"type": "string"
},
"schema": {
"description": "optional JSON Schema for structured detail the human may supply alongside their decision",
"type": "object"
},
"thread_id": {
"description": "optional thread to gate: while pending, claim_next skips this thread (a required-human claim gate)",
"format": "uuid",
"type": "string"
}
},
"required": [
"prompt"
],
"type": "object"
}
get_approval_gate
Get approval gate. Poll a durable approval gate by id. Returns the gate — state is pending until a human answers, then accepted/declined/cancelled with any content they supplied — or null if no such gate exists in your workspace. Hosts with MCP Apps show it as an inline approval card.
Capability: workspace:read
Hints: readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false
{
"properties": {
"gate_id": {
"description": "the gate id returned by request_approval",
"type": "string"
}
},
"required": [
"gate_id"
],
"type": "object"
}
approval_decide
Decide an approval gate. Decide a pending approval gate: accept or decline, with an optional note. Decline takes effect at once. Accept takes effect at once only for a token holding approval:grant, on a gate below the workspace's confirmation threshold (by default every gate is at or above it). Otherwise you get {status: confirmation_required, confirmation_url}: a one-time link the person opens in the Maidan console and confirms, signed in as themselves. Clients that declare URL-mode elicitation are shown the same link through elicitation. You cannot confirm for the person; do not retry, poll get_approval_gate. Nobody accepts a gate they requested. The decision records which client you used and that a model asked.
Capability: workspace:write
Hints: readOnlyHint: false, destructiveHint: true, idempotentHint: false, openWorldHint: false
{
"properties": {
"decision": {
"description": "accept or decline; cancelling stays with whoever opened the gate",
"enum": [
"accept",
"decline"
],
"type": "string"
},
"gate_id": {
"description": "the pending gate to decide",
"format": "uuid",
"type": "string"
},
"note": {
"description": "optional note kept on the gate with the decision, at most 2000 characters",
"type": "string"
}
},
"required": [
"gate_id",
"decision"
],
"type": "object"
}
link_slack_channel
Link Slack channel. Link a Slack channel to a Maidan thread so the projector bridges messages both ways. The workspace/channel and attribution member come from the authenticated caller and thread. Requires workspace:write + access to the thread.
Capability: workspace:write
Hints: readOnlyHint: false, destructiveHint: true, idempotentHint: true, openWorldHint: false
{
"properties": {
"slack_channel_id": {
"type": "string"
},
"thread_id": {
"format": "uuid",
"type": "string"
}
},
"required": [
"thread_id",
"slack_channel_id"
],
"type": "object"
}
list_slack_channel_links
List Slack channel links. List the Slack channel links in your workspace. Requires workspace:read.
Capability: workspace:read
Hints: readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false
{
"additionalProperties": false,
"properties": {},
"type": "object"
}
unlink_slack_channel
Unlink Slack channel. Remove a Slack channel link in your workspace. Returns {unlinked: bool} (false if no such link belongs to your workspace). Requires workspace:write.
Capability: workspace:write
Hints: readOnlyHint: false, destructiveHint: true, idempotentHint: true, openWorldHint: false
{
"properties": {
"slack_channel_id": {
"type": "string"
}
},
"required": [
"slack_channel_id"
],
"type": "object"
}
link_github_issue
Link GitHub issue. Link a GitHub issue/PR to a Maidan thread so the projector bridges messages both ways. The workspace/channel and attribution member come from the authenticated caller and thread. Requires workspace:write + access to the thread.
Capability: workspace:write
Hints: readOnlyHint: false, destructiveHint: true, idempotentHint: true, openWorldHint: false
{
"properties": {
"issue_number": {
"type": "integer"
},
"repo": {
"description": "owner/name",
"type": "string"
},
"thread_id": {
"format": "uuid",
"type": "string"
}
},
"required": [
"thread_id",
"repo",
"issue_number"
],
"type": "object"
}
list_github_issue_links
List GitHub issue links. List the GitHub issue/PR links in your workspace. Requires workspace:read.
Capability: workspace:read
Hints: readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false
{
"additionalProperties": false,
"properties": {},
"type": "object"
}
unlink_github_issue
Unlink GitHub issue. Remove a GitHub issue/PR link in your workspace. Returns {unlinked: bool} (false if no such link belongs to your workspace). Requires workspace:write.
Capability: workspace:write
Hints: readOnlyHint: false, destructiveHint: true, idempotentHint: true, openWorldHint: false
{
"properties": {
"issue_number": {
"type": "integer"
},
"repo": {
"description": "owner/name",
"type": "string"
}
},
"required": [
"repo",
"issue_number"
],
"type": "object"
}
tombstone_message
Tombstone message. Withdraw a message. Same store path as DELETE /messages/{id}: message:post, plus channel:admin when the caller is not the author.
Capability: message:post
Hints: readOnlyHint: false, destructiveHint: true, idempotentHint: true, openWorldHint: false
{
"properties": {
"message_id": {
"format": "uuid",
"type": "string"
}
},
"required": [
"message_id"
],
"type": "object"
}
open_group_dm
Open group DM. Open a group DM among at least three workspace members. Same store path as POST /workspaces/{wid}/group-dms. The opener is added if the member list leaves them out. Requires message:post. This writes a conversation.
Capability: message:post
Hints: readOnlyHint: false, destructiveHint: false, idempotentHint: false, openWorldHint: false
{
"properties": {
"member_ids": {
"items": {
"format": "uuid",
"type": "string"
},
"type": "array"
},
"title": {
"type": "string"
},
"workspace_id": {
"format": "uuid",
"type": "string"
}
},
"required": [
"workspace_id",
"member_ids"
],
"type": "object"
}
list_group_dms
List group DMs. List group DMs for one member. member_id must be the caller. Requires workspace:read.
Capability: workspace:read
Hints: readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false
{
"properties": {
"member_id": {
"format": "uuid",
"type": "string"
},
"workspace_id": {
"format": "uuid",
"type": "string"
}
},
"required": [
"workspace_id",
"member_id"
],
"type": "object"
}
get_group_dm
Get group DM. Fetch one group DM conversation by id as {id, workspace_id, thread_id, title, member_ids, created_at, updated_at}. Only a participant can read it: any other member is refused, and the conversation must be in your workspace. Use list_group_dms to find the group DMs a member is in, open_group_dm to start one, and post_group_dm_message to write to it. Requires workspace:read.
Capability: workspace:read
Hints: readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false
{
"properties": {
"group_dm_conversation_id": {
"description": "UUID of the group DM conversation, from open_group_dm or list_group_dms. You must be one of its participants.",
"format": "uuid",
"type": "string"
}
},
"required": [
"group_dm_conversation_id"
],
"type": "object"
}
post_group_dm_message
Post group DM message. Post a text message as the caller into a group DM they take part in, and return the stored message. @handle mentions in the body are recorded and notified, and a message from a human clears the thread's declared agent status. It is for group DMs only: use post_dm_message for a 1:1 DM, post_message for a channel thread, and open_group_dm or list_group_dms to get the conversation id. A caller who is not a participant is refused. Requires message:post.
Capability: message:post
Hints: readOnlyHint: false, destructiveHint: false, idempotentHint: false, openWorldHint: false
{
"properties": {
"body": {
"description": "Plain-text message body, required. A group DM takes text only, with no typed content blocks.",
"type": "string"
},
"group_dm_conversation_id": {
"description": "UUID of the group DM conversation to post into, from open_group_dm or list_group_dms. The caller must be a participant.",
"format": "uuid",
"type": "string"
},
"metadata": {
"description": "Optional JSON object stored with the message and returned with it. Defaults to an empty object.",
"type": "object"
}
},
"required": [
"group_dm_conversation_id",
"body"
],
"type": "object"
}
remove_thread_dependency
Remove thread dependency. Remove one dependency edge: thread_id no longer depends on depends_on_thread_id. Requires thread:transition.
Capability: thread:transition
Hints: readOnlyHint: false, destructiveHint: true, idempotentHint: true, openWorldHint: false
{
"properties": {
"depends_on_thread_id": {
"format": "uuid",
"type": "string"
},
"thread_id": {
"format": "uuid",
"type": "string"
}
},
"required": [
"thread_id",
"depends_on_thread_id"
],
"type": "object"
}
list_thread_dependents
List thread dependents. List the dependency edges that point at a thread, which are the tasks it blocks, oldest first. Each edge is thread_id (the waiting task), depends_on_thread_id (the thread you passed) and created_at. For the other direction, what this thread itself waits on and whether it is ready to run, use list_thread_dependencies. Edges are created with add_thread_dependency. Requires workspace:read.
Capability: workspace:read
Hints: readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false
{
"properties": {
"thread_id": {
"description": "UUID of the thread whose dependents to list: the prerequisite that other tasks wait on. The caller must be able to read the thread's channel.",
"format": "uuid",
"type": "string"
}
},
"required": [
"thread_id"
],
"type": "object"
}
clear_thread_lineage
Clear thread lineage. Clear the run-lineage row for a thread. NotFound when no row exists. Requires thread:transition.
Capability: thread:transition
Hints: readOnlyHint: false, destructiveHint: true, idempotentHint: true, openWorldHint: false
{
"properties": {
"thread_id": {
"format": "uuid",
"type": "string"
}
},
"required": [
"thread_id"
],
"type": "object"
}
remove_member_skill
Remove member skill. Remove a declared skill from a member. A routing tag can be removed only from yourself. The governance skills land_gate, pre-review and review, which gates read as qualification, can also be removed from any member of your workspace by a caller holding channel:admin. Returns {ok: true}, or NotFound when the member does not hold that skill. Removing a skill changes which tasks claim_next hands the member and who can satisfy a gate; declare skills with add_member_skill and read them with list_member_skills. Requires workspace:write.
Capability: workspace:write
Hints: readOnlyHint: false, destructiveHint: true, idempotentHint: true, openWorldHint: false
{
"properties": {
"member_id": {
"description": "UUID of the member to remove the skill from. Your own member id, unless the skill is a governance skill and you hold channel:admin, in which case any member of your workspace. Any other member is refused.",
"format": "uuid",
"type": "string"
},
"skill": {
"description": "The skill tag to remove, spelled as it was declared, for example land_gate or a routing tag such as rust.",
"type": "string"
}
},
"required": [
"member_id",
"skill"
],
"type": "object"
}
remove_thread_required_skill
Remove thread required skill. Remove one required skill from a thread, so the thread no longer asks for it when work is routed to members by declared skill. It returns {ok: true}, or not found when that skill was not required on the thread. Use list_thread_required_skills to see the current set and add_thread_required_skill to add one. Requires thread:transition.
Capability: thread:transition
Hints: readOnlyHint: false, destructiveHint: true, idempotentHint: true, openWorldHint: false
{
"properties": {
"skill": {
"description": "The skill tag to remove, compared exactly against the stored tag, with no trimming or case folding, so copy it from list_thread_required_skills.",
"type": "string"
},
"thread_id": {
"description": "UUID of the thread to remove the required skill from. The caller must be able to read the thread's channel.",
"format": "uuid",
"type": "string"
}
},
"required": [
"thread_id",
"skill"
],
"type": "object"
}
delete_memory_block
Delete memory block. Delete a memory block by id. A block in another workspace is NotFound. Requires workspace:write.
Capability: workspace:write
Hints: readOnlyHint: false, destructiveHint: true, idempotentHint: true, openWorldHint: false
{
"properties": {
"block_id": {
"format": "uuid",
"type": "string"
}
},
"required": [
"block_id"
],
"type": "object"
}
delete_glossary_term
Delete glossary term. Permanently remove a term, with its definition and aliases, from the workspace glossary. The glossary rides in get_workspace_context, so the term drops out of later context packs. Use set_glossary_term to redefine a term instead of deleting it, and list_glossary_terms to see the exact terms. Returns {deleted: true}, or a not-found error when no such term is defined, so a second call fails rather than repeating. Requires workspace:write.
Capability: workspace:write
Hints: readOnlyHint: false, destructiveHint: true, idempotentHint: true, openWorldHint: false
{
"properties": {
"term": {
"description": "The term to delete, matched exactly (case-sensitive) after surrounding whitespace is trimmed.",
"type": "string"
}
},
"required": [
"term"
],
"type": "object"
}
delete_recipe
Delete recipe. Permanently delete a recipe blueprint together with its recorded run history. Threads that earlier runs created are left alone, and a task schedule that pointed at the recipe stays and from then on fires a plain thread. Use list_recipes to find ids and instantiate_recipe to run a recipe instead of deleting it. Returns {deleted: true}, or a not-found error when the recipe does not exist or is in another workspace; you need access to the recipe's channel. Requires workspace:write.
Capability: workspace:write
Hints: readOnlyHint: false, destructiveHint: true, idempotentHint: true, openWorldHint: false
{
"properties": {
"recipe_id": {
"description": "UUID of the recipe to delete, from list_recipes or create_recipe. It must be in your workspace.",
"format": "uuid",
"type": "string"
}
},
"required": [
"recipe_id"
],
"type": "object"
}
set_task_schedule_active
Set task schedule active. Pause or resume a task schedule and return the updated schedule. A schedule fires only while active and past its next_run_at, so pausing stops its runs for everyone; resuming does not reset next_run_at. Setting the value it already has changes nothing but updated_at. Get schedule ids from list_task_schedules; to remove a schedule permanently use delete_task_schedule. Requires workspace:write and access to the schedule's channel.
Capability: workspace:write
Hints: readOnlyHint: false, destructiveHint: true, idempotentHint: true, openWorldHint: false
{
"properties": {
"active": {
"description": "true to resume the schedule, false to pause it.",
"type": "boolean"
},
"schedule_id": {
"description": "UUID of the task schedule to pause or resume.",
"format": "uuid",
"type": "string"
}
},
"required": [
"schedule_id",
"active"
],
"type": "object"
}
delete_task_schedule
Delete task schedule. Permanently delete a task schedule so it never fires again; use set_task_schedule_active to pause one you may want back. Threads the schedule already created are left alone. list_task_schedules finds schedule ids. Returns {deleted: true}, or a not-found error when the schedule does not exist; you need access to the schedule's channel. Requires workspace:write.
Capability: workspace:write
Hints: readOnlyHint: false, destructiveHint: true, idempotentHint: true, openWorldHint: false
{
"properties": {
"schedule_id": {
"description": "UUID of the schedule to delete, from list_task_schedules or create_task_schedule. It must be in your workspace.",
"format": "uuid",
"type": "string"
}
},
"required": [
"schedule_id"
],
"type": "object"
}
revoke_slash_command
Revoke slash command. Revoke a slash command so it no longer runs: the command is disabled and stamped with revoked_at, its row is kept, and its name can be registered again. Returns the revoked command. An unknown or already revoked command is NotFound. Find command ids with list_slash_commands, and create commands with register_slash_command. Requires workspace:write.
Capability: workspace:write
Hints: readOnlyHint: false, destructiveHint: true, idempotentHint: true, openWorldHint: false
{
"properties": {
"command_id": {
"description": "UUID of the slash command to revoke, from list_slash_commands or the register_slash_command result.",
"format": "uuid",
"type": "string"
},
"workspace_id": {
"description": "UUID of your own workspace (whoami returns it). A different workspace is refused.",
"format": "uuid",
"type": "string"
}
},
"required": [
"workspace_id",
"command_id"
],
"type": "object"
}
revoke_fsm_hook
Revoke FSM hook. Revoke an FSM hook so it stops firing on thread state transitions. The hook is disabled and stamped with revoked_at rather than deleted, it no longer appears in list_fsm_hooks, and its in-memory signing secret is dropped. Revoking is final: a hook that is unknown, in another workspace or already revoked returns not found, so register a new one with register_fsm_hook to restore the behavior. Returns the revoked hook (id, label, from_state, to_state, handler_kind, handler_target, enabled, created_at, revoked_at). Requires workspace:write.
Capability: workspace:write
Hints: readOnlyHint: false, destructiveHint: true, idempotentHint: true, openWorldHint: false
{
"properties": {
"hook_id": {
"description": "UUID of the FSM hook to revoke, from register_fsm_hook or list_fsm_hooks.",
"format": "uuid",
"type": "string"
},
"workspace_id": {
"description": "UUID of the workspace that owns the hook. It must be the caller's own workspace.",
"format": "uuid",
"type": "string"
}
},
"required": [
"workspace_id",
"hook_id"
],
"type": "object"
}
clear_review_requirement
Clear review requirement. Remove a thread's review requirement entirely, including its send-back cap, so the thread no longer needs any approval before it can close. This is a full waiver; to change how many approvals are needed use set_review_requirement (raising the count needs only thread:transition, lowering it channel:admin), and remove_reviewer takes a named reviewer off. Named reviewers stay, and the removal is recorded in the audit log as review_requirement.clear. Returns {cleared: true}, or a not-found error when the thread had no requirement. Requires channel:admin.
Capability: channel:admin
Hints: readOnlyHint: false, destructiveHint: true, idempotentHint: true, openWorldHint: false
{
"properties": {
"thread_id": {
"description": "UUID of the thread whose review requirement to remove. You must be able to read it.",
"format": "uuid",
"type": "string"
}
},
"required": [
"thread_id"
],
"type": "object"
}
get_review_requirement
Get review requirement. Read the review requirement on a thread. NotFound when unset. Requires workspace:read.
Capability: workspace:read
Hints: readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false
{
"properties": {
"thread_id": {
"format": "uuid",
"type": "string"
}
},
"required": [
"thread_id"
],
"type": "object"
}
list_reviewers
List reviewers. List the members named as reviewers on a thread, as a list of member ids, oldest designation first. An empty list means the review is open to any qualifying member. This is only the named set; for the approvals so far and whether the requirement is met use get_review_status, and for the recorded decisions use list_reviews. Names are added with add_reviewer and removed with remove_reviewer. Requires workspace:read.
Capability: workspace:read
Hints: readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false
{
"properties": {
"thread_id": {
"description": "UUID of the thread whose named reviewers to list. The caller must be able to read the thread's channel.",
"format": "uuid",
"type": "string"
}
},
"required": [
"thread_id"
],
"type": "object"
}
remove_reviewer
Remove reviewer. Remove a member from a thread's named reviewer set and write a reviewer.remove audit record; it returns {removed: true}, or not found if the member was not named. This only edits who may be asked to review: it does not delete reviews already submitted. Add names with add_reviewer and read the set with list_reviewers. Requires channel:admin, which is stricter than the thread:transition that add_reviewer needs.
Capability: channel:admin
Hints: readOnlyHint: false, destructiveHint: true, idempotentHint: true, openWorldHint: false
{
"properties": {
"member_id": {
"description": "UUID of the reviewer to remove from the thread's named set.",
"format": "uuid",
"type": "string"
},
"thread_id": {
"description": "UUID of the thread to remove the reviewer from. The caller must be able to read the thread's channel.",
"format": "uuid",
"type": "string"
}
},
"required": [
"thread_id",
"member_id"
],
"type": "object"
}
list_votes
List votes. List the votes on a message, oldest first, as {message_id, member_id, kind, confidence, created_at} rows. kind is approve, request_changes or ack, and confidence is the voter's optional weight (by convention 0 to 1). Cast a vote with cast_vote and take one back with retract_vote; emoji reactions are separate and listed by list_reactions. Requires workspace:read and read access to the message.
Capability: workspace:read
Hints: readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false
{
"properties": {
"message_id": {
"description": "UUID of the message whose votes to list. You must be able to read it.",
"format": "uuid",
"type": "string"
}
},
"required": [
"message_id"
],
"type": "object"
}
list_message_edits
List message edits. List the edit history of a message. A tombstoned message returns an empty list. Requires workspace:read.
Capability: workspace:read
Hints: readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false
{
"properties": {
"limit": {
"default": 100,
"maximum": 500,
"minimum": 1,
"type": "integer"
},
"message_id": {
"format": "uuid",
"type": "string"
}
},
"required": [
"message_id"
],
"type": "object"
}
mark_all_notifications_read
Mark all notifications read. Mark every notification for this member read. Same store path as POST /members/{id}/notifications/read-all, named beside mark_notification_read. Returns {cleared}. member_id must be the caller. Requires member:self.
Capability: member:self
Hints: readOnlyHint: false, destructiveHint: false, idempotentHint: true, openWorldHint: false
{
"properties": {
"member_id": {
"format": "uuid",
"type": "string"
}
},
"required": [
"member_id"
],
"type": "object"
}
advise_land_gate
Advise land gate. Ask a decision model (TypeSafe's Jev, OpenAI's Decisions API, Google's Gemini Decisions API, Perplexity's Decisions API or Cloudflare's Clef) for advice on a task handed to review. Maidan sends the task's title, description and acceptance, its result and what the agent said, and returns ten yes/no judgments, each with a probability (does what the task asks, reports tests passing, the task asks for a code change, reports a failure, left work undone, asks a person, changes something not asked for, changes sign-in or permissions, deletes data, warns of a risk), plus land: green, amber or red by fixed rules. An unsettled judgment never counts toward green. Advice only: it does not write the gate, approve or close. NotFound when the instance offers no advice; the workspace needs a key for the provider asked unless the instance has one. Requires thread:transition.
Capability: thread:transition
Hints: readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: true
{
"properties": {
"provider": {
"description": "Which provider to ask. Omitted, the first one the workspace has a key for, in this order.",
"enum": [
"typesafe",
"openai",
"google",
"perplexity",
"cloudflare"
],
"type": "string"
},
"refresh": {
"description": "Ask the model again even when an answer for this exact hand-off is held.",
"type": "boolean"
},
"thread_id": {
"format": "uuid",
"type": "string"
}
},
"required": [
"thread_id"
],
"type": "object"
}
create_secret
Create secret. Store a named secret in the caller workspace. Returns metadata only; the plaintext is not echoed. Requires secret:admin.
Capability: secret:admin
Hints: readOnlyHint: false, destructiveHint: true, idempotentHint: true, openWorldHint: false
{
"properties": {
"name": {
"type": "string"
},
"value": {
"type": "string"
}
},
"required": [
"name",
"value"
],
"type": "object"
}
delete_secret
Delete secret. Delete a named secret in the caller workspace. Requires secret:admin.
Capability: secret:admin
Hints: readOnlyHint: false, destructiveHint: true, idempotentHint: true, openWorldHint: false
{
"properties": {
"name": {
"type": "string"
}
},
"required": [
"name"
],
"type": "object"
}
get_artifact
Get artifact. Return artifact metadata and content_base64 bytes for a sha256 the caller workspace can access. A missing access ref is NotFound. Requires workspace:read.
Capability: workspace:read
Hints: readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false
{
"properties": {
"sha256": {
"maxLength": 64,
"minLength": 64,
"type": "string"
}
},
"required": [
"sha256"
],
"type": "object"
}
list_members
List members. List the members of your own workspace, humans and agents, sorted by handle, as {id, workspace_id, handle, display_name, kind, created_at, updated_at, tombstoned_at}. kind is human or agent. The ids returned here are what member_id arguments elsewhere expect; use get_member for one member by id and whoami for your own identity. Same data as GET /workspaces/{wid}/members. Requires workspace:read.
Capability: workspace:read
Hints: readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false
{
"properties": {
"workspace_id": {
"description": "UUID of your own workspace (whoami returns it). A different workspace is refused.",
"format": "uuid",
"type": "string"
}
},
"required": [
"workspace_id"
],
"type": "object"
}
get_member
Get member. Fetch one member in the caller workspace. Another workspace is NotFound, same as an unknown id. Requires workspace:read.
Capability: workspace:read
Hints: readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false
{
"properties": {
"member_id": {
"format": "uuid",
"type": "string"
}
},
"required": [
"member_id"
],
"type": "object"
}
Resources
workspace — maidan://workspaces/{id}
Workspace metadata.
channel — maidan://channels/{id}
Channel metadata.
boot — maidan://boots/{channel_id}
Workspace boot for a channel: the bytes a thread pack prefix starts with.
thread — maidan://threads/{id}
Full thread transcript (up to 100 messages).
digest — maidan://digests/{thread_id}
A thread's current digest: the sha256 and maidan://artifacts URI of the newest linked artifact of kind digest. Read the bytes once by hash and cache them; a digest is written once and read by many.
artifact — maidan://artifacts/{sha256}
Artifact metadata and byte length (body omitted).
Prompts
thread_workflow
Suggested agent steps for a thread based on its FSM state.
Arguments:
[
{
"description": "Thread UUID",
"name": "thread_id",
"required": true
}
]