Find out if a capability already exists
Two teams in a large organisation often add the same capability under different names. Search before you build a new field, a new resolver, or a new subgraph. Schema discovery finds the first one before you build the second.Step 1 - Search by intent
Describe the capability in your own words. Do not guess field names.Customer.invoiceAddress and Account.billingAddr even though neither name contains your words. A text search over the schema finds neither.
Step 2 - Ask for the operation you were about to build
Step 3 - Read the reason
Theunsatisfied reason names what is missing.
Limits
The index holds the composed schema. It cannot show a subgraph that nobody published yet. Another team can be halfway through the same work. Check your schema registry as well, before you commit to a build.Turn a generated operation into a tool
Give an agent a curated tool instead of an open prompt. The router generates an operation. The router never publishes it. You review the operation first, then publish it yourself. Your production router then exposes it as its own MCP tool.Step 1 - Generate in a development router
Run schema discovery in a development router. Send the prompt.Step 2 - Review the document
Read thedocument field. Check three things:
- The operation reads only the fields that you intend to expose.
- The operation is a
querywhen you expect no side effect. - The variables carry the filters that you want the caller to control.
Step 3 - Save the operation
Write the document to your MCP operations directory.operations/ListEmployees.graphql
""" docstring above the operation sets the tool description, so write it for the agent. A # comment does not work.
Step 4 - Deploy to production
Deploy the operation to your production router. Turn schema discovery off there, and turn arbitrary operations off.production.config.yaml
Use a generated operation in a BFF
A generated operation drops straight into an application. The document is the request, and the variables schema types the inputs.Step 1 - Take both fields
A generated operation gives you two things:documentis the operation text.variablesSchemais a JSON Schema for the variables.
Step 2 - Send the document and the variables
Step 3 - Use the variables schema to type the inputs
The variables schema carries the descriptions and the allowed values from your GraphQL schema. Use it in two ways:- Generate types for your application.
- Register the operation as a tool for a language model. The tool name comes from
operationName, the description fromdescription, and the input schema fromvariablesSchema.