Skip to main content
POST
/
v1
/
spark-api
/
mcp
Execute GWI MCP tool calls
curl --request POST \
  --url https://api.globalwebindex.com/v1/spark-api/mcp \
  --header 'Authorization: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "jsonrpc": "2.0",
  "id": "req-123",
  "method": "tools/call",
  "params": {
    "name": "chat_gwi",
    "arguments": {
      "prompt": "What marketing channels work best for Audi drivers in the US?"
    }
  }
}
'
{
  "id": "<string>",
  "result": {
    "content": [
      {
        "text": "<string>"
      }
    ],
    "isError": true,
    "_meta": {
      "isInternalError": true
    }
  }
}

Documentation Index

Fetch the complete documentation index at: https://api.globalwebindex.com/docs/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

Authorization
string
header
required

Format: Bearer YOUR_TOKEN

Body

application/json

JSON-RPC request for any supported MCP tool

Query audience insights:

  • Returns main response, insights with IDs, sources, and chat ID
  • Use for initial queries and follow-ups
jsonrpc
enum<string>
required

JSON-RPC version

Available options:
2.0
id
string
required

Unique request identifier

Example:

"req-123"

method
enum<string>
required

Method name for MCP tool calls

Available options:
tools/call
params
object
required

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 in result.content[0].text, and result._meta.isInternalError may be true for 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.

jsonrpc
enum<string>
required
Available options:
2.0
id
string
required

Request identifier echoed back

result
object
required

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 for chat_id / insight_id where 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.