Skip to main content
Schema discovery is configured under mcp.schema_discovery.
router.config.yaml

Keys

enabled

Turns schema discovery on. The router then indexes the client schema and registers the search_schema, get_symbols and generate_query tools.

url

The base URL of the schema discovery service. Include the scheme. The service speaks Connect over HTTP/1.1.
The router does not start when enabled is true and url is empty. This stops a server whose tools always fail.

token

The bearer token for the service. The router sends it as Authorization: Bearer <token>. An empty token sends no Authorization header. Use an empty token when your service runs with authentication off. The router never writes the token to a log or to an error message.

request_timeout

The timeout for one call to the service. Query generation takes 10 to 30 seconds. A value below 60s is too low. This value also raises the write timeout of the MCP HTTP server, so a slow generation still reaches the caller.

index_poll_interval

The wait between two index status reads while the router waits for a build.

index_timeout

The router stops waiting for an index that does not become ready within this time. A schema of 16,000 lines indexes in about 24 seconds. The default of 10m only trips on a real fault.

Interaction with other keys

expose_schema

Set expose_schema to false. get_schema returns the full schema. That is the context cost that schema discovery removes. The two settings do not fail together, but they work against each other.

enable_arbitrary_operations

Set this to true when you want the agent to run the operation that generate_query returns. Set it to false in production. Use the curated path instead: generate the operation in a development router, review it, publish it as a persisted operation, then deploy that. See Guides.

Startup behaviour

The router does not wait for the index. It serves GraphQL from the first moment. Read the log to follow the build.
The router reindexes after every schema change. An unchanged schema costs nothing, because the router compares the hash locally and makes no network call. During a rebuild the previous index keeps serving. The router adopts the new index only when it is ready.

Failure behaviour

A fault in the discovery service never stops the router from serving GraphQL.