What can I ask?
The TONIC MCP server gives your AI assistant access to live TONIC publisher data. Below you will find the available tools, example questions you can ask, and what you will get back.
List the countries available in the TONIC platform.
Look up which countries are supported in TONIC, or check whether a specific country is available.
Example questions to ask your AI assistant:
- “Which countries can I run TONIC campaigns in?”
- “Is Germany (DE) a supported country?”
- “List all TONIC countries with their codes.”
What you get back:
A list of country names and their two-letter codes (e.g. DE = Germany), with the total count.
Technical details (for developers)
Tool name: get_countries
api-bo:read
Reference lookup. Returns the canonical country code + name list, with offset/limit pagination and an optional substring search over code/name.
| Parameter | Type | Required | Constraints |
|---|---|---|---|
offset |
integer | no | >= 0, default 0 |
limit |
integer | no | 1-1000, default 200 |
search |
string | no | optional substring, e.g. DE |
Example request / response
Request
{"jsonrpc":"2.0","id":1,"method":"tools/call",
"params":{"name":"get_countries","arguments":{"limit":2,"search":"de"}}}
Response
{"data":[{"code":"DE","name":"Germany"}],
"pagination":{"offset":0,"limit":2,"total":1,"has_more":false}}
Revenue for a set of publisher users or campaigns, with optional dimension breakdowns.
Pull revenue figures for your publisher users or campaigns over a date range of up to 7 days, broken down by campaign, country, or offer.
Example questions to ask your AI assistant:
- “Show me my revenue for the last 7 days.”
- “How much did campaign 12345 earn from June 1 to June 7, broken down by country?”
- “Which offers made the most revenue last week?”
- “Break down last week's revenue by user for campaigns 111 and 222.”
What you get back:
Revenue rows showing earnings, clicks, campaign, country, and offer for the requested date range, with a flag if totals are below the reporting threshold.
Technical details (for developers)
Tool name: get_revenue_report
api-bo:read
Returns revenue rows (date x user x account, optionally broken down by campaign / country / offer) for a date range of at most 7 days. Exactly one of user_ids or campaign_ids must be provided. group_by selects breakdown dimensions; omit for a per-(date, user, account) aggregate. Cursor-paginated with a below_threshold flag on the first page.
| Parameter | Type | Required | Constraints |
|---|---|---|---|
date_from |
string (date) | yes | YYYY-MM-DD, inclusive |
date_till |
string (date) | yes | YYYY-MM-DD, inclusive; range <= 7 days (upstream hard limit); must not be in the future |
user_ids |
array |
no | publisher user ids >= 1; exactly one of user_ids or campaign_ids must be provided |
campaign_ids |
array |
no | campaign ids >= 1; exactly one of user_ids or campaign_ids must be provided |
group_by |
array |
no | allowed values: campaign, country, offer; may combine; omit for per-(date,user,account) aggregate |
limit |
integer | no | 1-1000, default 100 |
cursor |
string | no | opaque cursor from a prior response |
Example request / response
Request
{"jsonrpc":"2.0","id":2,"method":"tools/call",
"params":{"name":"get_revenue_report",
"arguments":{"date_from":"2026-06-01","date_till":"2026-06-07",
"user_ids":[55],"group_by":["campaign","offer"],"limit":1}}}
Response
{"data":[{"date":"2026-06-01","user_id":55,"account_name":"Acme",
"campaign_id":456,"country":null,"offer":"Search",
"clicks":1200,"revenue":"34.56"}],
"pagination":{"limit":1,"next_token":"eyJ…","has_more":true,"expires_at":"2026-06-19T12:00:00Z"},
"below_threshold":false}
Technical details (for developers) — HTTP endpoints & error contract
HTTP endpoints
| Path | Method | Auth | Purpose |
|---|---|---|---|
/mcp |
POST | Bearer (OAuth) | MCP protocol (streamable HTTP, stateless) |
/health |
GET | none | Liveness probe (always 200) |
/ready |
GET | none | Readiness probe (200 ready / 503 degraded) |
Response & error contract
Successful responses are envelopes: {data, pagination} (offset pagination
{offset, limit, total, has_more}, or cursor pagination {limit, next_token, has_more, expires_at}).
Errors carry JSON {code, message, details?}:
UPSTREAM_AUTH— Upstream authentication/authorization failedUPSTREAM_ERROR— Upstream API returned an errorUPSTREAM_TIMEOUT— Upstream API timed outVALIDATION— Input failed validationFORBIDDEN— Token lacks a required scope for this toolINTERNAL— Unexpected internal error