ToolGateway and ToolGatewayClass Reference

This reference covers all fields of the ToolGateway and ToolGatewayClass custom resources in the runtime.agentic-layer.ai API group.

ToolGateway

ToolGateway declares a desired gateway instance for MCP tool traffic. A gateway implementation operator (selected via ToolGatewayClass) reconciles the resource and creates the underlying workload.

spec

Field Description

toolGatewayClassName

string — Optional. Name of the ToolGatewayClass that selects the implementation operator for this gateway. Only required when multiple gateway classes are registered in the cluster. If omitted, the sole installed implementation is used.

env

[]corev1.EnvVar — Optional. Environment variables injected into the gateway container. Can carry configuration values, credentials, or feature flags.

envFrom

[]corev1.EnvFromSource — Optional. Sources (ConfigMaps, Secrets) from which environment variables are loaded into the gateway container.

commonMetadata

EmbeddedMetadata — Optional. Labels and annotations applied to the Deployment and Service created for this gateway, as well as the pod template. See commonMetadata / podMetadata fields below.

podMetadata

EmbeddedMetadata — Optional. Labels and annotations applied only to the pod template of the Deployment. See commonMetadata / podMetadata fields below.

guardrails

[]corev1.ObjectReference — Optional. Guard resources applied to traffic flowing through this gateway. Guards are evaluated in the order they are listed.

spec.commonMetadata / spec.podMetadata fields

Both commonMetadata and podMetadata share the same EmbeddedMetadata structure.

Field Description

labels

map[string]string — Key/value pairs applied as Kubernetes labels to the target resources.

annotations

map[string]string — Key/value pairs applied as Kubernetes annotations to the target resources.

status

Field Description

conditions

[]metav1.Condition — Latest observations of the gateway’s state. Inspect type, status, reason, and message fields for troubleshooting.

url

string — Cluster-local URL where this tool gateway can be accessed. Populated by the implementation operator once the gateway is ready.

ToolGatewayClass

ToolGatewayClass is a cluster-scoped resource that registers a named implementation controller for ToolGateway. Each ToolGateway that sets spec.toolGatewayClassName to the name of a ToolGatewayClass will be reconciled by the controller identified in that class.

spec

Field Description

controller

string — Required. The fully-qualified name of the controller that reconciles ToolGateway resources claiming this class. Follows the format <domain>/<name> (e.g. agentic-layer.ai/agentgateway). An implementation operator watches for ToolGatewayClass resources whose spec.controller value matches the operator’s own controller name.

status

Field Description

conditions

[]metav1.Condition — Latest observations of the gateway class’s state. Inspect type, status, reason, and message fields for troubleshooting.