Skip to main content
Glama

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
SWARMAIL_DBNoDatabase path~/.local/share/swarmail/mail.sqlite3
SWARMAIL_URLNoMCP endpoint for the command and the register hookhttp://127.0.0.1:18765/mcp/
SWARMAIL_PORTNoServer port18765
SWARMAIL_AGENTNoName used by `inbox`, `send`, `ping`, `guard` and `who`
SWARMAIL_GUARDNo`warn` only reports, `off` skipsblock
SWARMAIL_WAKE_URLNoServer base URL for the wake hookhttp://127.0.0.1:18765
SWARMAIL_RETIRE_DAYSNoRetire idle agents and drop projects whose checkout is gone; `0` keeps both7
SWARMAIL_SYNCHRONOUSNo`full` syncs every commit, at about 3 ms per send instead of 0.5 msnormal

Instructions

Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.

This server publishes no instructions, or was last inspected before Glama recorded them.

Capabilities

Features and capabilities supported by this server

Protocol revision2025-11-25

CapabilityDetails
tools
{
  "listChanged": false
}

Tools

Functions exposed to the LLM to take actions

NameDescription
health_checkA

Report whether the server and its database answer, with the database path. Call it when another tool fails with an INTERNAL error or no answer, to tell a down server from a bad request.

ensure_projectA

Create a project without registering an agent, returning id, slug, human_key and created_at. Repeating the same repository path returns the existing project. Other tools fail with NOT_FOUND until it exists; register_agent and macro_start_session create it themselves.

register_agentA

Register or update an agent identity in a project, creating the project if needed. Omit name to get a generated adjective+noun name, unless task_description starts with a session tag an eligible or lifecycle-bound agent already has; then that agent is updated. Re-registering an existing name replaces its program, model and task and clears inactivity retirement. Authoritative lifecycle closure requires a verified reopen. If the register hook already told you your name, pass it as name, or start task_description with the session tag it gave you. To also reserve paths and read your inbox in one call, use macro_start_session.

macro_start_sessionA

Ensure the project, register an agent, optionally reserve paths, and return {project, agent, file_reservations, inbox}. The inbox contains the latest metadata without marking mail read; use fetch_inbox for bodies and unread-mail draining. Reuse the hook's name as agent_name or its session tag in task_description to avoid a second identity. Conflicting paths appear under file_reservations.conflicts; other paths are granted. If already registered and only checking mail, use fetch_inbox instead.

whoisA

Return one agent's profile: program, model, task description, T3 thread (t3_thread, null outside T3) and first and last activity times. An unknown name fails with NOT_FOUND, naming recently active agents. Profile metadata and activity do not prove the session or model is currently running. To see every agent in a project, use list_agents.

list_agentsA

Return an array of non-retired agents in a project, most recently active first, with program, model, task and session details, including t3_thread for a T3 link. Use it to find who to message; whois returns one agent. active_within_days filters recent activity, not whether a session is running. Metadata and activity do not prove current session or model liveness. limit caps this single result; there is no continuation cursor, so a full result may omit agents.

retire_agentA

At an agreed whole-session closeout or a whole-session completion with nothing remaining, record the closeout, release owned resources and finish required dependency notices, then retire your own registration in every project you joined. Before retiring another agent, confirm with its owning host that its session has ended; roster data or a ping timeout is insufficient. Retire an agent whose session has ended, so it no longer appears in list_agents and new messages to it fail. Its messages stay. unretire_agent reverses it, and so does the agent registering again or sending, reading mail or reserving files as itself. Lookups such as whois and list_agents do not.

unretire_agentA

Bring a retired agent back into list_agents so it can receive messages again; earlier messages stay unchanged. Returns {agent_name, retired:false}. Calling on an already active agent also succeeds and refreshes its activity time, as every revival does. Registering, sending, reading mail or reserving files revives the caller automatically; use this to revive another agent. An unknown name fails with NOT_FOUND.

send_messageA

Send a Markdown message to named agents in the same project. An unregistered, retired or closed recipient fails the whole send with persisted:false and a reason. Bound source loss also rejects. Returns the stored message and delivery observations/warnings; unknown standalone state is not proof of death. Storage is not task acceptance. To answer a message, use reply_message, which keeps the thread and addresses the sender. Without idempotency_key, a retry sends another message; reuse a nonempty key with identical arguments within 7 days to replay its stored result instead; delivery observations on replay are historical. Alternatively provide resource_notice instead of subject/body_md: one recipient, a nonempty idempotency key, no free-text or delivery overrides. Released/cancelled notices generate readable text; next_action:none stays quiet, other allowed actions wake the dependent receiver. Claimed release is not admission or permission. Send only when the recipient needs to act or know: a handoff, requested result, blocker or shared-resource change. Make clear to the human and receiver whether the message informs or requests work; for requests, name the action, repository and owner. Distinguish implementing source, installing an update and adding guidance. Write coordination messages in Markdown. Open with the action, decision or changed result. Add up to three short facts the receiver needs, then a Next action line naming the requested action or stating No action requested. Link supporting records on an Evidence line; omit that line when no record exists. Keep the requested action, authority, scope and essential holds inline. Put logs, metrics, hashes, execution details and authorization history in the linked records. When a decision depends on those details, ask the receiver to inspect the record. Preserve exact identifiers, paths and commands. Use spaces between words and numbers. Under T3 Code, refer to another agent by its thread link, title, not its registered name; use the name only if the user asks, no thread id is known or T3 fails. Elsewhere include its verified session title or repository beside its name; use this session for the current receiver only after matching session identity. For relayed authorization, preserve the source, exact selected action and target owner; a relayed bare approval such as "B" or "go" is ambiguous. Contact only still-dependent resource owners, sending release or cancellation before dropping waiting recipients. For resource coordination, name only the resource, finite phase boundary and receiver action; omit unrelated progress and errors. Use resource_notice for typed release/cancellation mail; it generates readable text and derives quiet or actionable delivery. Use one supported transport per recipient and purpose; uncertain delivery is not a reason to resend by another route. Keep routine progress in your own conversation; do not send courtesy acknowledgements or reply to thanks.

reply_messageA

Reply in a message's thread, returning the stored message with reply_to. message_id selects the original in this project. Omit to to address its sender; cc and bcc are added only when supplied. The original's topic and importance are inherited, with a 'Re:' subject; importance can be overridden. ack_required defaults to false; set it explicitly to request acknowledgement of this reply. For retries within 7 days, reuse a nonempty idempotency_key with identical arguments. To start a new thread, use send_message. Send only when the recipient needs to act or know: a handoff, requested result, blocker or shared-resource change. Make clear to the human and receiver whether the message informs or requests work; for requests, name the action, repository and owner. Distinguish implementing source, installing an update and adding guidance. Write coordination messages in Markdown. Open with the action, decision or changed result. Add up to three short facts the receiver needs, then a Next action line naming the requested action or stating No action requested. Link supporting records on an Evidence line; omit that line when no record exists. Keep the requested action, authority, scope and essential holds inline. Put logs, metrics, hashes, execution details and authorization history in the linked records. When a decision depends on those details, ask the receiver to inspect the record. Preserve exact identifiers, paths and commands. Use spaces between words and numbers. Under T3 Code, refer to another agent by its thread link, title, not its registered name; use the name only if the user asks, no thread id is known or T3 fails. Elsewhere include its verified session title or repository beside its name; use this session for the current receiver only after matching session identity. For relayed authorization, preserve the source, exact selected action and target owner; a relayed bare approval such as "B" or "go" is ambiguous. Contact only still-dependent resource owners, sending release or cancellation before dropping waiting recipients. For resource coordination, name only the resource, finite phase boundary and receiver action; omit unrelated progress and errors. Use resource_notice for typed release/cancellation mail; it generates readable text and derives quiet or actionable delivery. Use one supported transport per recipient and purpose; uncertain delivery is not a reason to resend by another route. Keep routine progress in your own conversation; do not send courtesy acknowledgements or reply to thanks.

withdraw_messageA

Withdraw your message from recipients whose delivery has not been read, acknowledged or withdrawn. Returns message_id, revision and per-recipient withdrawn/already_withdrawn/too_late results. Omit recipients for all deliveries; an explicit subset must be nonempty and valid. Retains content and audit history. Previews and injected context cannot be recalled. Requires explicit server activation after all readers are qualified. A nonempty idempotency_key is required; identical retries replay even when execution is disabled or the sender closes.

set_message_importanceA

Change only your message's low/normal/high/urgent priority. Requires current expected_revision from inbox, history or sender receipt and a nonempty idempotency_key. Returns message_id, revision, importance and changed. A stale revision fails before a matching-value no-op. Edits affect metadata only: no new inbox notice or repeated instruction, and priority does not grant authority. Requires explicit server activation; identical retries replay before activation, lifecycle or revision checks.

fetch_inboxA

Return an array of your latest received message metadata, newest first; include_bodies adds body_md. At session start or after a mail notice, set unread_only:true, include_bodies:true and mark_read:true. Stop when fewer than limit messages return (default 20, capped at 1000); repeat only after a full page. For a metadata preview, set mark_read:false; include_bodies defaults to false and mark_read to true. Each entry's sender_t3_thread is the sender's T3 thread id (null outside T3). Filters combine, so omit optional filters when draining all unread mail. Use search_messages for project-wide text matching, or mark_message_read or acknowledge_message for one message.

fetch_session_inboxA

Return one newest-first page across registrations matching your host/session tag or T3 thread. Use machine-derived host and session_id, with t3_thread when known; never guess from an agent name. Each receipt includes project_key and agent_name for replies and acknowledgements. Defaults: unread_only:true, mark_read:true, include_bodies:false, limit:20. To drain, include bodies; stop when fewer than limit messages return (default 20, capped at 1000), repeating only after a full page. With mark_read:false or unread_only:false, this is a bounded preview, not a drain. The CLI swarmail inbox --session discovers identity and drains without mailbox arguments. Swarmail is a trusted local service; session identity selects inboxes and is not authentication.

mark_message_readA

Mark one received message read without acknowledging it, returning message_id, read and read_at. A repeat keeps the first read time but refreshes your agent's activity time. fetch_inbox already marks what it returns unless mark_read:false. When the message has ack_required, use acknowledge_message instead. Fails with NOT_FOUND unless you are a recipient.

acknowledge_messageA

Acknowledge one received message and mark it read, returning message_id, acknowledged, acknowledged_at and read_at. Repeated calls preserve first read and acknowledgement timestamps but refresh your agent's activity time. Acknowledge ack_required mail after acting on it; if you cannot or will not act, reply with the reason. Acknowledging lets the sender see the acknowledgement in get_message_delivery_receipt and ack_overdue_only stops listing it. To mark read without acknowledging, use mark_message_read. Fails with NOT_FOUND unless you are a recipient.

get_message_delivery_receiptA

Return a message's persisted_at and recipients with kind, read_at, acknowledged, acknowledged_at and admission. Admission observations are historical; null admission means no snapshot was recorded. Storage/read/acknowledgement do not establish task acceptance. Null timestamps mean that recipient has not read or acknowledged it yet; they are not delivery errors. Use it as the sender to check an ack_required message; recipients use fetch_inbox. message_id must exist in this project or the call fails with NOT_FOUND.

search_messagesA

Search subjects and bodies across a project, returning {result, next_cursor?} without marking mail read. All query words must match; filters narrow those matches. Results rank by best match unless ranking:'recency'. Each excerpt has up to 512 Unicode code points and >>>matched text<<< markers; include_body_md adds full bodies. Keep query, filters and ranking unchanged when passing next_cursor as cursor; no next_cursor means the last page. Use fetch_inbox for your received unread mail, or summarize_thread for a thread's participants and recent messages.

summarize_threadA

Return {thread_id, summary:{participants, total_messages}, messages} for you to summarize; this tool does not generate prose or mark mail read. Find thread_id with search_messages or fetch_inbox. per_thread_limit selects the newest messages with full bodies, returned oldest first. It defaults to 50 and caps at 1000, with no continuation cursor; total_messages counts the entire thread, even when messages is truncated. Use search_messages for text matching and fetch_inbox to drain unread mail. No matching thread returns zero messages.

file_reservation_pathsA

Reserve repository-relative paths or globs so other agents know what you are editing. Returns {granted, conflicts}; grants include reservation ids and expiry times, while conflicts name the requested path and its holders. Conflicts do not fail the call, and nothing blocks the edit itself; the optional git guard refuses commits touching another agent's exclusive reservation. Reserving a path you already hold updates it. Extend with renew_file_reservations and release with release_file_reservations when done.

renew_file_reservationsA

Extend your active reservations by extend_seconds past their current expiry; each call extends again. Omit paths and file_reservation_ids for all; empty filters impose no restriction, and two nonempty filters must both match. Returns {renewed, file_reservations} with old and new expiry times; no matches returns zero and an empty array. Expired reservations are not renewed; reserve them again with file_reservation_paths.

release_file_reservationsA

Release your active reservations when you finish work so other agents can reserve those paths. While work continues, use renew_file_reservations instead. Omit both filters to release all; supply paths or file_reservation_ids for a subset. Empty filters impose no restriction; two nonempty filters must both match. Returns how many were released; zero is not an error.

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

TDQS

A4.4/5.0

Scored across 22 tools

Disambiguation4/5

Most tools target clearly distinct resources and actions (send vs reply vs search, reserve vs renew vs release, register vs retire). The main overlaps are fetch_inbox vs fetch_session_inbox and mark_message_read vs acknowledge_message (and fetch_inbox's implicit read-marking), but the descriptions explicitly explain their boundaries, so misselection is unlikely.

Naming Consistency5/5

Nearly all tools follow a predictable snake_case verb_noun pattern (send_message, reply_message, register_agent, withdraw_message, file_reservation_paths, release_file_reservations). Minor deviations like whois and health_check are recognizable conventions rather than inconsistencies.

Tool Count4/5

22 tools sits at the heavy end, but the domain genuinely spans project setup, agent lifecycle, mail, delivery receipts, and file reservations, so most tools earn their place. A few (fetch_session_inbox vs fetch_inbox) could arguably be merged.

Completeness4/5

The surface covers project creation, agent registration/retirement/revival, full message lifecycle (send, reply, search, summarize, read, ack, withdraw, importance, receipts), and reservation lifecycle (reserve, renew, release), plus health check. No obvious blocking gaps, though project listing/teardown coverage is thin.

Maintenance

ActivityMaintained
ResponsivenessResponsive