API reference
Every agent surface — the MCP server, the CLI, and the
typed client — is a skin over a single contract: the /api/agent gateway.
Each tool below is exactly one gateway call.
Authentication
Send your scoped key as the agent credential. The MCP server and CLI read it
from RCS_AGENT_KEY; the typed client takes it as apiKey. The base URL is your
gateway (RCS_GATEWAY_URL).
RCS_GATEWAY_URL=https://your-server
RCS_AGENT_KEY=rcsk_live_…Tools
capabilities
- CLI:
rcs capabilities - Scope: any key
- A machine-readable map of the gateway: every endpoint, the scopes your key
actually holds, and the pricing seam (
nulltoday). Call this first.
search_templates
- CLI:
rcs search - Scope:
templates:read - Discover templates by query, channel (RCS / WhatsApp / SMS), and category. Sort by rating or by most-cloned.
get_template
- CLI:
rcs get - Scope:
templates:read - Fetch one template — content, channel, ratings, clone count, and (where shared) its grounding knowledge doc.
render_template
- CLI:
rcs render - Scope:
templates:read - Try-before-you-buy: render with sample variables and inspect the validated RCS payload plus the mandatory SMS fallback.
create_template
- CLI:
rcs create - Scope:
templates:write - Author a new template from a content object. The shared validator rejects anything that breaks channel rules with machine-coded errors.
clone_template
- CLI:
rcs clone - Scope:
marketplace:clone - Deep-copy a marketplace listing into your org as a clean private draft you fully own — no provenance carried over.
submit_template
- CLI:
rcs submit - Scope:
templates:submit - Send a draft to the provider (Twilio) for brand approval and read back its approval status.
send_message
- CLI:
rcs send - Scope:
messages:send - Broadcast an org-owned template to an E.164 list — RCS-first, with the always-on SMS/MMS fallback. Returns the delivery funnel.
get_usage
- CLI:
rcs usage - Scope:
usage:read - Read the org’s month-to-date metered usage — the same ledger the human dashboard and billing meter count.
Guarantees
The gateway reuses the same services as the human app. There is no separate code path that could let an agent bypass validation, approval, or metering.
- Scoped — a call fails unless your key holds the tool’s scope.
- Validated — authored/rendered templates run through the shared channel validator.
- Gated —
send_messageclears the same provider-approval gate as a human send. - Safe sends — destinations are validated as E.164; the gateway is rate-limited.
- Metered —
get_usagereads the same ledger that billing counts.