Execute GWI MCP tool calls
This endpoint handles MCP tool calls through JSON-RPC. Supported tools:
1. chat_gwi - Query audience insights
- Returns main response, insights with IDs, sources, and chat ID
- Use for initial queries and follow-ups
2. explore_insight_gwi - Get detailed statistics
- Returns percentages, sample sizes, and index scores
- Use with insight IDs from chat_gwi responses
3. list_datasets - List available datasets
- Used to get the dataset codes that can be passed to chat_gwi
Authorizations
Format: Bearer YOUR_TOKEN
Body
JSON-RPC request for any supported MCP tool
- chat_gwi
- explore_insight_gwi
- list_datasets
Query audience insights:
- Returns main response, insights with IDs, sources, and chat ID
- Use for initial queries and follow-ups
Response
JSON-RPC response. HTTP 200 means the JSON-RPC call was processed, not that the tool succeeded.
Inspect result.isError if present:
true— tool failed; the message is inresult.content[0].text, andresult._meta.isInternalErrormay betruefor internal or timeout-style failures.
See Tool errors (result.isError) in the overview above for full behavior.
JSON-RPC 2.0 success envelope for MCP tools/call (no top-level error field).
When the tool fails, HTTP status is still typically 200 and this object is returned with result.isError: true. Use that flag rather than HTTP status alone.
2.0 Request identifier echoed back
MCP tool result. Inspect isError for tool-level success or failure.
isError: true — the tool failed; content usually has one text item with a human-readable explanation. Typical causes:
- Invalid arguments (e.g. empty
prompt, invalid UUID forchat_id/insight_idwhere required). - Downstream errors (e.g. resource not found, timeout, cancelled request, or generic internal failure).
_meta.isInternalError — when present and true, the server classified the failure as internal or timeout-style. Omitted or false for most validation and not-found style errors.
This is not the same as a JSON-RPC protocol error: invalid method or malformed requests use the standard JSON-RPC error field instead of a tool result.

