Set up CallRail
manage_callrailConnect CallRail call tracking to a business's line. Order: (1) connect {api_key, account_id?}; (2) get_callrail status lists the companies the key can see; (3) link_company {company_id, target_business_id?} once per business; (4) set_writeback {enabled}; (5) get_callrail list_trackers; (6) route_tracker only after the owner says yes. The API key: the person may paste their CallRail API v3 key straight into this chat. Take it and pass it as api_key; do not send them elsewhere to paste it. KaiCalls stores it encrypted and never returns it. One agency-level key serves every company that CallRail login can see, so connect once and link each firm with its own link_company. They create the key in CallRail under Integrations > API Keys > Create API V3 Key, signed in as a login that can see every company to link. CallRail shows the key only once. If they would rather paste it themselves: https://www.kaicalls.com/dashboard/settings/connections?connector=callrail. If connect answers choose_account, call it again with one of the returned account ids. link_company subscribes that CallRail company's calls: calls Kai answers get the CallRail source, campaign, keyword and landing page, and Kai's outcome is written back to CallRail as a KaiCalls tag, a summary note and good_lead when Kai qualified the caller. route_tracker {link_id, tracker_id, mode} changes where a live tracking number rings: mode kai_answers sends every call to Kai; business_first sends it to a KaiCalls line that rings the owner first so Kai takes only the misses. restore_tracker puts the earlier destination back. Leaving numbers unrouted is tracking-only. unlink_company {link_id}; disconnect. Requires current admin role on every business involved. Changing a tracker changes a live phone line: confirm with the owner first.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"business_id": "<business_id>",
"action": "<action>"
},
"name": "manage_callrail"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | No | ||
| action | Yes | ||
| api_key | No | CallRail API v3 key, as the person pasted it in chat. Stored encrypted; never returned. | |
| enabled | No | ||
| link_id | No | ||
| account_id | No | Only when connect answered choose_account: one of the account ids it listed. | |
| company_id | No | A company id from get_callrail status (companies[].id). | |
| kai_number | No | ||
| tracker_id | No | ||
| business_id | Yes | ||
| target_business_id | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| error | No | ||
| success | Yes |