Tool reference
Tools are defined in packages/mcp/src/tools.ts. The Settings MCP & API tab lists the same wire names returned by tools/list.
| Tool | Scope | Read-only |
|---|---|---|
journeys_list | journeys.read | yes |
journeys_get | journeys.read | yes |
journeys_upsert_draft | journeys.write | no |
templates_list | templates.read | yes |
templates_get | templates.read | yes |
templates_upsert_draft | templates.write | no |
segments_list | segments.read | yes |
segments_upsert_draft | segments.write | no |
attributes_list | attributes.read | yes |
analytics_summary | analytics.read | yes |
Scopes such as deliverability.read and broadcasts.write are mintable on tokens; additional tools for deliverability and broadcasts follow the same grant checks as the admin UI and will appear in tools/list when implemented on the handler.
journeys_list
Input: {}
Output: Array of journey metadata (id, name, status, trigger).
Example:
{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"journeys_list","arguments":{}}}
journeys_get
Input: { "journeyId": "uuid" }
Output: Single journey definition for the token's brand.
journeys_upsert_draft
Input: { "name": "Welcome", "journeyId?": "uuid", "description?": "...", "triggerEvent?": "lead_captured" }
Output: Draft id. Does not publish. UI confirmation required to go live.
templates_upsert_draft
Input: { "name": "Intake reminder", "templateId?": "uuid", "channel?": "email" | "sms" }
Output: Draft template id.
segments_upsert_draft
Input: { "name": "Active GLP-1", "definition": { ... }, "segmentId?": "uuid", "kind?": "dynamic" | "static" }
Output: Draft segment id. No membership roster.
attributes_list
Input: {}
Output: Attribute names, types, and enums without profile values.
analytics_summary
Input: { "days?": 1-90 }
Output: Aggregate send counts for the window.
Authorization header
All calls use Authorization: Bearer tlc_mcp_<placeholder>. Never commit a real token.