What is gRPC reflection? Inspecting service schemas at runtime
gRPC server reflection is an optional feature that lets clients query a server for the Protocol Buffers services and message types it exposes through a standard RPC. Tools such as grpcurl can use this information to inspect methods and message shapes, then encode human-readable JSON requests as Protobuf. Reflection is not enabled by default; the service owner configures whether and where it is exposed.
gRPC server reflection is an optional feature that lets clients query a server for the Protocol Buffers services and message types it exposes through a standard RPC. Tools such as grpcurl can use this information to inspect methods and message shapes, then encode human-readable JSON requests as Protobuf. Reflection is not enabled by default; the service owner configures whether and where it is exposed.
What reflection provides
gRPC normally serializes Protobuf as binary data. A tool needs the service, method, and message schemas to construct requests and decode responses. Server reflection is a protocol for querying exported methods and the types referenced by request and response messages. Debugging tools use those descriptors to build calls and display readable results.
For example, against a local server that supports reflection, grpcurl localhost:8787 list can show the queryable services. grpcurl localhost:8787 describe example.v1.Catalog can display a schema description for that symbol. These are documented usage examples, not commands run or verified against a particular server here.
If a server does not support reflection, tools can instead use .proto source files or a compiled descriptor set (protoset). Reflection is one way to provide schemas; it is not required for gRPC calls and is not itself an OpenAPI document.
Enable it and check routing
The server must register a separate reflection service. APIs and packages vary by language, so follow that language's official setup instructions. If traffic passes through a gateway, reverse proxy, or load balancer, route reflection RPCs to the appropriate backend along with application RPCs. A missing route can make reflection-aware tools fail even when the application service is available.
Check the deployed path:
Confirm that the server implementation registers reflection.
Confirm that the proxy or gateway routes reflection methods to the backend.
From an authorized development or operations network, run `grpcurl HOST:PORT list` and `describe` to confirm that only the expected services and types appear.
Where reflection is disabled, give the tool version-matched `.proto` files or a protoset that includes imports.
Recheck access controls and routing through the actual deployment path.
If a command fails, do not assume the application service is broken. Reflection may be unregistered, its proxy route may be missing, TLS or authentication may be misconfigured, or the address may be wrong. Use local schemas as an alternative and verify production network settings with the service owner.
Security and exposure
Reflection makes it easier for clients to enumerate service and method structure. Decide whether external users need it; if not, consider limiting it to an internal network or authenticated operations path. Reflection does not replace authentication or authorization, and disabling it does not remove the need to protect application RPCs. Conversely, enabling reflection alone does not prove that authentication can be bypassed. The service's actual auth configuration defines that boundary.
If a proxy distributes calls across backend versions, consider whether a reflected schema and the subsequent RPC could reach different versions. Do not assume a reflection response always lists every method implemented by every proxy or backend; check deployment topology and actual coverage.
Decide whether to enable it
| Situation | Option to consider |
|---|---|
| Internal development or debugging tools need runtime schema discovery | Enable reflection behind appropriate authentication and network boundaries |
| External clients do not need schema discovery | Disable it or expose it only on a restricted operations path |
| Builds and tests use a fixed schema | Supply .proto files or a protoset with imports to the tool |
Reflection is an operational convenience. Expose schemas only to the tools and users that need them, and separately verify application authentication and authorization, gateway routing, and version consistency.
Sources
[gRPC reflection guide](https://grpc.io/docs/guides/reflection/)
[gRPC Server Reflection protocol design](https://github.com/grpc/grpc/blob/master/doc/server-reflection.md)
[grpcurl usage and schema discovery](https://github.com/fullstorydev/grpcurl)