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.

ToolScopeRead-only
journeys_listjourneys.readyes
journeys_getjourneys.readyes
journeys_upsert_draftjourneys.writeno
templates_listtemplates.readyes
templates_gettemplates.readyes
templates_upsert_drafttemplates.writeno
segments_listsegments.readyes
segments_upsert_draftsegments.writeno
attributes_listattributes.readyes
analytics_summaryanalytics.readyes

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.