One MCP server for your entire graph.
Your agent sends plain language. LangQL returns one validated GraphQL operation.
curl -X POST https://api.langql.dev/v1/compile \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $LANGQL_API_KEY" \ -d { "schemaName": "supergraph.graphql", "sdl": "<your GraphQL schema or federated supergraph>" }Ask
Every value in the prompt becomes a typed variable. Nothing is inlined or guessed.
“Find unassigned open issues in vercel/next.js labeled bug”
{ "name": "next.js",from “vercel/next.js” "owner": "vercel",from “vercel/next.js” "filterBy": { "assignee": null },from “unassigned” "labels": ["bug"],from “bug” "states": ["OPEN"]from “open”}query GetRepositoryIssues($name: String!, $owner: String!, $filterBy: IssueFilters, $labels: [String!], $states: [IssueState!]) {repository(name: $name, owner: $owner) {idissues(filterBy: $filterBy, labels: $labels, states: $states) {edges {node {idnumbertitleurl}}}}}Resolve IDs
“Move ENG-412 to In Progress, assign it to Dana and mark it urgent.” needs two internal IDs. LangQL leaves them unbound and returns a lookupPrompt for each. Look them up, fill them in, run.
{"status": "ok","operationType": "mutation","readyToExecute": false,"variables": {"id": "ENG-412","input": {"priority": 1}},"requirements": {"note": "Resolve 2 opaque ID(s): variables.input.assigneeId ('Dana') via Query.users, variables.input.stateId ('In Progress') via Query.workflowStates before executing issueUpdate.","missingInputs": [{"target": "variables.input.stateId","variableName": "input","fieldPath": "issueUpdate.input.stateId","graphqlType": "String","required": false,"source": "lookup","valueHint": "In Progress","lookupPrompt": "Using Query.workflowStates(filter: {\"name\":{\"eq\":\"In Progress\"}}), look up WorkflowState id","schemaHint": "Query.workflowStates"},{"target": "variables.input.assigneeId","variableName": "input","fieldPath": "issueUpdate.input.assigneeId","graphqlType": "String","required": false,"source": "lookup","valueHint": "Dana","lookupPrompt": "Using Query.users(filter: {\"displayName\":{\"eqIgnoreCase\":\"Dana\"}}), look up User id","schemaHint": "Query.users"}]}}Orchestrate
One GraphQL document can’t mix a query, a mutation and a subscription. LangQL splits the request and says what runs first.
“Show open orders”
“Cancel order #1042”
“Subscribe to status updates for order #1042”
Hand it to your agent as is. Load the Agent Skill once and your agent follows the blueprint itself: one LangQL call per step, prerequisites first, IDs reused from earlier answers. No glue code.
{"status": "clarify","reason": "mixed_operation_types","question": "Your request has three separate goals (list open orders, cancel order #1042, and subscribe to status updates). Which one should I run first? Each will be planned as its own operation.","options": [{"prefixId": "orders","label": "List open orders","requiredKeys": [],"operationType": "query","description": "List orders optionally filtered by status.","suggestedPrompt": "Show open orders"},{"prefixId": "cancelOrder","label": "Cancel order #1042","requiredKeys": ["id","reason"],"operationType": "mutation","description": "Cancel an existing order by ID with a structured cancellation reason.","suggestedPrompt": "Cancel order #1042","dependsOn": ["orders"]},{"prefixId": "orderStatusUpdated","label": "Subscribe to order status updates","requiredKeys": ["orderId"],"operationType": "subscription","description": "Stream real-time status transition events for a specific order ID.","suggestedPrompt": "Subscribe to status updates for order #1042","dependsOn": ["orders"]}]}