“Build a Next.js dashboard for our ThinnestAI workspace: today’s conversations by channel, calls with their outcome and summary, and new leads. Store everything in our Postgres and keep it up to date with webhooks.”It can read the
dashboards guide (read_guide) for the rules below, and use
the MCP tools to set up the webhooks it needs.
Ask for numbers directly
You do not need to build anything to get a figure. With a Read-only key, ask your assistant:“How many replies have we used this month, and what is our balance?”
“Which questions did the support agent fail to answer in the last 30 days?”
“How many calls did we miss last week, and what did calls cost?”It answers from
get_usage, get_agent_analytics, get_call_summary and
get_whatsapp_summary — the same numbers the console shows. Your dashboard’s
backend can call the same endpoints: see
Usage and analytics.
The rules it should follow
- Server side only. The dashboard’s backend calls the API with a key from its environment. Never put the key in browser code — it can message your customers.
- Webhooks for live data, the API to backfill. Subscribe to
call.analysed,lead.captured,conversation.escalatedandconversation.resolved, and write each into your own tables. Page through the lists once to fill history. - Page with the cursor. Lists answer
{ "items": [...], "nextCursor": ... }, newest first; passcursorback to continue,limitup to 100. - Stay under 240 requests a minute. A
429says how long to wait. Sync incrementally rather than re-reading everything. - Store ids as given — they are prefixed strings (
conv_…,cust_…).