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?"
    }
  }
}'
{
  "jsonrpc": "2.0",
  "id": "<string>",
  "result": {
    "content": [
      {
        "type": "text",
        "text": "<string>"
      }
    ],
    "isError": true
  }
}

Overview

The MCP endpoint uses JSON-RPC 2.0 protocol to execute various tools for audience insights. The request parameters are divided into two parts:

Parameter Documentation

Part 1: JSON-RPC Framework Parameters

Standard JSON-RPC 2.0 protocol parameters required for every request

Part 2: Tool-Specific Parameters

Tool-specific parameters that vary based on which tool you’re calling

Quick Example

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "chat_gwi",
    "arguments": {
      "prompt": "What are the shopping preferences of millennials?",
      "chat_id": ""
    }
  }
}

Available Tools

  • chat_gwi - Ask natural language questions about audience insights
  • explore_insight_gwi - Get detailed breakdowns of specific insights
For complete parameter details and examples, see the documentation links above.

Authorizations

Authorization
string
header
required

Format: Bearer YOUR_TOKEN

Body

application/json

JSON-RPC request for either chat_gwi or explore_insight_gwi tool

  • Option 1
  • Option 2
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

Successful response with insights

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

Request identifier echoed back

result
object
required