Run a raw GraphQL query
graphql_queryExecute arbitrary read-only GraphQL queries against the legislative API to answer complex questions like cross-referencing committee activities with bill cosponsors.
Instructions
Execute an arbitrary read-only GraphQL query against the legislative API. Use this for complex questions the specialised tools do not cover (e.g. cross-referencing committee activities with bill cosponsors). Read the 'cdg://schema' resource for the full schema. Mutations are rejected.
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": {
"query": "<query>"
},
"name": "graphql_query"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes | A GraphQL query document. Must be a query (no mutations). | |
| variables | No | Optional variables object for the query. |