Skip to main content
Glama

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
HOSTNoServer bind host127.0.0.1
PORTNoServer bind port8765
LOG_LEVELNoFuture: server log levelinfo
MCP_MAIL_STORENoRoot for per-project archives and SQLite~/.mcp-agent-mail
ATTACHMENT_POLICYNoFuture: auto, file, or inline default for image conversionauto
IMAGE_INLINE_MAX_BYTESNoThreshold for inlining WebP images during send_message (if enabled)65536

Instructions

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

You are the MCP Agent Mail coordination server. Provide message routing, coordination tooling, and project context to cooperating agents. Outputs are JSON by default; pass format='toon' (or set MCP_AGENT_MAIL_OUTPUT_FORMAT=toon) to receive {format:'toon', data:''}.

Capabilities

Features and capabilities supported by this server

Protocol revision2025-11-25

CapabilityDetails
tools
{
  "listChanged": true
}
logging
{}
prompts
{
  "listChanged": true
}
resources
{
  "subscribe": false,
  "listChanged": true
}

Tools

Functions exposed to the LLM to take actions

NameDescription
health_checkC

Return basic readiness information for the Agent Mail server.

ensure_projectA

Idempotently create or ensure a project exists for the given human key.

register_agentB

Create or update an agent identity within a project and persist its profile to Git.

deregister_agentB

Remove an agent from a project. Marks the agent as inactive and removes it from the active roster. Messages from/to the agent are preserved for audit but the agent can no longer send or receive new messages.

retire_agentA

Soft-delete an agent: mark it as retired so it stops accepting new messages while preserving message history. Retired agents are hidden from active agent lists but visible in 'all agents' views.

sweep_stale_agentsB

Retire abandoned agents in the caller's project using the server's conservative inactivity heuristic. The caller is never retired, the threshold has a 60-second floor, and active file reservations block retirement by default.

unretire_agentB

Restore a retired agent back to active status. The agent will resume accepting new messages.

archive_projectA

Soft-delete a project: mark it as archived so it is hidden from active project lists. All messages are preserved and the project can be restored with unarchive_project.

unarchive_projectB

Restore an archived project back to active status.

hard_delete_agentA

IRREVERSIBLY delete an agent and ALL associated data: messages sent by the agent, message recipient records, file reservations, agent links, window identities, and on-disk archive files (inbox, outbox, attachments). This is NOT soft-delete — data is permanently destroyed and cannot be recovered. Requires the confirmation parameter to be exactly 'I UNDERSTAND'.

hard_delete_projectA

IRREVERSIBLY delete a project and ALL associated data: every agent, message, message recipient, file reservation, agent link, window identity, message summary, sibling suggestion, product link, and the entire on-disk project archive directory. This is NOT soft-delete — data is permanently destroyed and cannot be recovered. Requires the confirmation parameter to be exactly 'I UNDERSTAND'.

whoisC

Return enriched profile details for an agent, optionally including recent archive commits.

create_agent_identityC

Create a new, unique agent identity and persist its profile to Git.

list_window_identitiesB

List active window identities for a project.

Returns all non-expired window identities with their display names, last activity timestamps, and age.

rename_windowC

Update the display name of a window identity.

expire_windowC

Mark a window identity as expired.

send_messageB

Send a Markdown message to one or more recipients and persist canonical and mailbox copies to Git.

purge_old_messagesC

Delete messages older than the configured retention period. Defaults to retention_max_age_days from config (180 days). Returns count of messages purged.

reply_messageC

Reply to an existing message, preserving or establishing a thread.

request_contactB

Request contact approval to message another agent.

Creates (or refreshes) a pending AgentLink and sends a small ack_required intro message.

respond_contactC

Approve or deny a contact request.

list_contactsC

List contact links for an agent in a project.

set_contact_policyC

Set contact policy for an agent: open | auto | contacts_only | block_all.

fetch_inboxC

Retrieve recent messages for an agent without mutating read/ack state.

fetch_topicB

Fetch all messages in a project with a given topic tag, regardless of recipient.

mark_message_readC

Mark a specific message as read for the given agent.

acknowledge_messageC

Acknowledge a message addressed to an agent (and mark as read).

macro_start_sessionC

Macro helper that boots a project session: ensure project, register agent, optionally file_reservation paths, and fetch the latest inbox snapshot.

macro_prepare_threadC

Macro helper that aligns an agent with an existing thread by ensuring registration, summarising the thread, and fetching recent inbox context.

macro_file_reservation_cycleC

Reserve a set of file paths and optionally release them at the end of the workflow.

macro_contact_handshakeC

Request contact permissions and optionally auto-approve plus send a welcome message.

search_messagesC

Full-text search over subject and body for a project.

summarize_threadB

Extract participants, key points, and action items for one or more threads.

Single-thread mode (thread_id is a single ID):

  • Returns detailed summary with optional example messages

  • Response: { thread_id, summary: {participants[], key_points[], action_items[]}, examples[] }

Multi-thread mode (thread_id is comma-separated IDs like "TKT-1,TKT-2,TKT-3"):

  • Returns aggregate digest across all threads

  • Response: { threads: [{thread_id, summary}], aggregate: {top_mentions[], key_points[], action_items[]} }

summarize_recentA

Summarize all recent project messages within a time window.

Fetches messages from the last since_hours hours, groups them by thread, and produces a combined project-wide summary. Results are stored in the message_summaries table for fast retrieval via fetch_summary.

Idempotent: if a summary already exists for the same time window (within 5-minute tolerance) it is returned from cache.

fetch_summaryC

Retrieve stored project-wide summaries.

install_precommit_guardA

Install the Agent Mail pre-commit guard into a git repository.

The guard blocks a commit that stages files another agent holds an exclusive file reservation on (set AGENT_MAIL_GUARD_MODE=warn to only warn). Commits must run with AGENT_NAME set to the committing agent. Any existing pre-commit hook is kept and still runs. Does nothing when worktree features are disabled (WORKTREES_ENABLED=0).

uninstall_precommit_guardA

Remove the Agent Mail commit guards from a git repository.

Removes Agent Mail's own pre-commit and pre-push guard plugins (and a legacy single-file Agent Mail hook); other hooks in the repository are left in place.

file_reservation_pathsC

Request advisory file reservations (leases) on project-relative paths/globs.

release_file_reservationsC

Release active file reservations held by an agent.

force_release_file_reservationA

Force-release a stale file reservation held by another agent after inactivity heuristics.

The tool validates that the reservation appears abandoned (agent inactive beyond threshold and no recent mail/filesystem/git activity). When released, an optional notification is sent to the previous holder summarizing the heuristics.

renew_file_reservationsB

Extend expiry for active file reservations held by an agent without reissuing them.

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription
environment_resource_exact
tooling_directory_resource_exact
tooling_schemas_resource_exact
tooling_metrics_resource_exact
tooling_locks_resource_exact
projects_resource_exact

TDQS

C2.9/5.0

Scored across 41 tools

Disambiguation3/5

Many tools have clearly distinct purposes, but several clusters overlap heavily: deregister_agent vs retire_agent vs hard_delete_agent, archive_project vs hard_delete_project, and register_agent vs create_agent_identity. Macro helpers also duplicate combinations of atomic tools, so an agent must read descriptions carefully to choose correctly.

Naming Consistency4/5

Almost all tools use lowercase snake_case, and most follow a predictable verb_noun pattern. The main deviations are outliers like whois, noun-first file_reservation_paths, and macro_ prefixed composite helpers, but these remain readable.

Tool Count2/5

With 41 tools, the surface is very large for an agent mail server and likely exceeds what most agents can comfortably navigate. The many lifecycle, macro, summary, guard, and reservation tools could reasonably be consolidated.

Completeness3/5

The server covers messaging, contacts, agent/project lifecycle, summaries, reservations, and pre-commit guards comprehensively. However, obvious discovery gaps remain: there is no list_projects or list_agents tool despite references to project and active-agent lists, and individual message deletion/update is absent.

Maintenance

ActivityActive
ResponsivenessUsually handled