Introspect Schema
introspect_schemaFetch a subgraph's GraphQL schema via standard introspection. Returns types, fields, and arguments so an agent can build queries without external docs. Requires your own The Graph API key, passed as _apiKey.
Example tool call
This call uses example arguments supplied in the tool’s input schema.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"_apiKey": "your-thegraph-api-key",
"subgraph_id": "5zvR82QoaXYFyDEKLZ9t6v9adgnptxYpKpSbxtgVENFV"
},
"name": "introspect_schema"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| _apiKey | Yes | Your own The Graph API key (BYO — Pipeworx does not supply one). Free 100k queries/month after signup at https://thegraph.com/studio/apikeys. | |
| subgraph_id | Yes | Subgraph deployment ID |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| enums | Yes | List of enum types | |
| objects | Yes | List of object types with fields | |
| enum_count | Yes | Number of enum types in schema | |
| query_type | Yes | Root query type name | |
| subgraph_id | Yes | Subgraph deployment ID | |
| object_count | Yes | Number of object types in schema |