query_subgraph
Execute custom GraphQL queries against Polymarket subgraphs to retrieve prediction market data, including market stats, trader P&L, positions, and orderbook activity.
Instructions
Execute a custom GraphQL query against a Polymarket subgraph
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"subgraph": "<subgraph>",
"query": "<query>"
},
"name": "query_subgraph"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes | GraphQL query string | |
| subgraph | Yes | Subgraph identifier: main, beefy_pnl, slimmed_pnl, activity, or orderbook | |
| variables | No | Optional GraphQL variables as key-value pairs |