graphql-cost
GraphQL depth and static complexity score — Parses a GraphQL document (query, mutation or subscription) per the June 2018 spec and returns depth, field count, alias count, fragment list, cycle detection and a static complexity score. Complexity uses the common 'Σ field-score × list-multiplier' model: a listFields config maps parent-type + field-name to either a constant multiplier or a field argument name to read (e.g. 'first', 'limit'), wi
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-cost"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes | The GraphQL document text. | |
| maxDepth | No | Fail if depth exceeds this. Default 15. | |
| variables | No | Variable values, used only to resolve list-argument multipliers like first: $first. | |
| listFields | No | Per-type field multiplier config. See description for shape. | |
| maxComplexity | No | Fail if complexity exceeds this. Default 1000. | |
| operationName | No | Pick this operation; defaults to the first. | |
| defaultListMultiplier | No | Fallback multiplier for list fields not declared in listFields. Default 10. |