querySubgraph
Execute GraphQL queries against specific subgraphs to retrieve indexed blockchain data from The Graph network.
Instructions
Execute a GraphQL query against a specified subgraph.
Args: subgraphId (str): The ID of the subgraph to query. query (str): The GraphQL query string to execute.
Returns: str: Query result in JSON format, or an error message.
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": {
"subgraphId": "<subgraphId>",
"query": "<query>"
},
"name": "querySubgraph"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| subgraphId | Yes | ||
| query | Yes |