Slice GraphQL SDL Schema to Minimal Subgraph
slice_graphql_schemaParses GraphQL Schema Definition Language (Query, Mutation, Subscription, type, input, interface, union, enum, scalar), scores root fields against query or explicit rootFields, and emits a valid mini-SDL containing only selected root fields and the transitive closure of referenced types. Pricing: $0.001 USD per GraphQL SDL subgraph slice (x402 instant micropayment). Pass ?dry_run=true on REST to validate schema free.
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": {
"sdl": "<sdl>"
},
"name": "slice_graphql_schema"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sdl | Yes | Full GraphQL Schema Definition Language (SDL) string. | |
| query | No | Natural-language task intent scored against root Query, Mutation, and Subscription fields. | |
| rootFields | No | Explicit root field names to extract (e.g. 'createCreditNote' or 'Mutation.refundInvoice'). | |
| maxRootFields | No | Maximum number of matched root fields to retain in the mini-SDL. | |
| operationTypes | No | Optional filter restricting root operation containers. | |
| compactDescriptions | No | Strip triple-quoted and single-line descriptions from the emitted mini-SDL. |