Documentation Index
Fetch the complete documentation index at: https://docs.actionlayer.dev/llms.txt
Use this file to discover all available pages before exploring further.
Every MCP-compatible client gets the same surface area. Auth is Authorization: Bearer nc_live_… at the transport layer; tools resolve to your workspace via the bearer token.
| Tool | Purpose |
|---|
list_threads | List threads with filters |
get_thread | Full thread + message + draft history |
list_drafts | List drafts with filters |
get_draft | One draft by ID |
submit_draft | Submit a new draft for human approval |
approve_draft | Approve a pending draft (does not send) |
reject_draft | Reject with optional reason |
edit_draft | Edit a pending draft |
send_draft | Send an approved draft (or pending — bypasses approval) |
list_identities | List sender identities |
get_identity | One identity by ID |
list_contacts | List contacts |
get_contact | One contact by ID |
list_threads
Filter and page through inbox threads.
| Parameter | Type | Notes |
|---|
status | open|waiting|draft_pending|closed | optional |
needs_review | bool | optional |
identity_id | UUID | optional — scope to one identity |
limit | int | default 20 |
offset | int | default 0 |
get_thread
| Parameter | Type | Notes |
|---|
thread_id | UUID | required |
Returns the thread, all messages, and all drafts attached to it. Use this to read context before drafting.
list_drafts
| Parameter | Type | Notes |
|---|
thread_id | UUID | optional |
identity_id | UUID | optional |
status | pending|approved|sent|stale|rejected|failed | optional |
limit / offset | int | pagination |
get_draft
| Parameter | Type | Notes |
|---|
draft_id | UUID | required |
submit_draft
The core agent action. The server runs a soft stale check; if a newer inbound exists, the response includes stale_warning: true.
| Parameter | Type | Notes |
|---|
thread_id | UUID | required |
identity_id | UUID | required |
based_on_message_id | UUID | required — last inbound message your agent read |
body_text | string | one of body_text/body_html required |
body_html | string | |
subject_override | string | optional, defaults to thread subject |
cc | string[] | optional |
bcc | string[] | optional |
rationale | string | optional but recommended — surfaced to approvers |
approve_draft
Marks a pending draft as approved. Does not send — call send_draft next.
| Parameter | Type | Notes |
|---|
draft_id | UUID | required |
reject_draft
| Parameter | Type | Notes |
|---|
draft_id | UUID | required |
reason | string | optional |
Rejection resets the thread status to open and fires the draft.rejected webhook.
edit_draft
Only drafts with status: "pending" can be edited. Each edit snapshots prior state.
| Parameter | Type | Notes |
|---|
draft_id | UUID | required |
body_text / body_html | string | optional |
subject_override | string | optional |
cc / bcc | string[] | optional |
rationale | string | optional |
send_draft
Queues delivery via Postmark. Returns 202 immediately; delivery is async.
| Parameter | Type | Notes |
|---|
draft_id | UUID | required |
The hard stale check runs here. If a newer inbound arrived since the draft was generated, the call fails with 409 stale_draft (status moves to stale, draft.stale webhook fires).
list_identities / get_identity
| Parameter | Type | Notes |
|---|
status | active|disabled | list only |
domain_id | UUID | list only |
identity_id | UUID | get only |
Contacts are external senders that have appeared on your inbound threads.
| Parameter | Type | Notes |
|---|
q | string | list — fuzzy search across name + email |
status | trusted|pending|blocked | list only |
contact_id | UUID | get only |
Resources
Resources are read-only context blocks that your agent can attach without calling a tool.
| URI | Returns |
|---|
workspace://current | Current workspace name, slug, plan, plan status, settings |
identities://active | All active sender identities for this workspace |
threads://recent | The 25 most recently active threads |
Prompts
Prompts are pre-baked instruction templates your agent can invoke.
draft_reply
Walks the agent through reading a thread and submitting a draft reply.
| Parameter | Required |
|---|
thread_id | yes |
message_id | yes (the last inbound) |
identity_id | yes |
Effect: agent calls get_thread, drafts a reply, calls submit_draft with based_on_message_id set correctly, and reports the result.
triage_inbox
Read-only triage. Surfaces threads that need attention, ranked by urgency. Does not submit any drafts — pure reading.
No required parameters. Optional limit (default 25) and identity_id (default: all).
Sample interactions
“List my open threads.” → list_threads(status="open")
“What’s in thread abc-123?” → get_thread(thread_id="abc-123")
“Draft a reply to my latest email.”
Agent flow: list_threads(needs_review=true) → get_thread(...) → submit_draft(...). Approval channel pings you.
“Triage my inbox.” → invokes the triage_inbox prompt; agent reads but submits nothing.
Server-side enforcement
These constraints apply to every tool call regardless of client:
submit_draft never auto-approves unless the identity has auto_approve_replies: true.
send_draft blocks stale drafts with 409.
send_draft enforces plan limits before queuing delivery.
- All Postmark sends use
TrackOpens: false and TrackLinks: "None".
- ActionLayer makes no AI provider calls. Your agent supplies the intelligence; ActionLayer supplies the email plumbing.