Skip to main content

MCPToolConfig

MCPToolConfig defines tool-filtering and renaming rules that can be shared across MCP workloads. MCPServer, MCPRemoteProxy, and VirtualMCPServer reference an MCPToolConfig via spec.toolConfigRef to customize the tool surface their clients see.

API: toolhive.stacklok.dev/v1alpha1 · Scope: Namespaced · Short names: tc, toolconfig

Example

mcptoolconfig.yaml
apiVersion: toolhive.stacklok.dev/v1alpha1
kind: MCPToolConfig
metadata:
name: my-mcptoolconfig
namespace: default
spec: {}

Schema

spec

MCPToolConfigSpec defines the desired state of MCPToolConfig. MCPToolConfig resources are namespace-scoped and can only be referenced by MCPServer resources in the same namespace.

FieldTypeDescription
toolsFilterstring[]

ToolsFilter is a list of tool names to filter (allow list). Only tools in this list will be exposed by the MCP server. If empty, all tools are exposed.

toolsOverridemap<string, object>

ToolsOverride is a map from actual tool names to their overridden configuration. This allows renaming tools and/or changing their descriptions.

spec.toolsOverride

ToolsOverride is a map from actual tool names to their overridden configuration. This allows renaming tools and/or changing their descriptions.

FieldTypeDescription
annotationsobject

Annotations overrides specific tool annotation fields. Only specified fields are overridden; others pass through from the backend.

descriptionstring

Description is the redefined description of the tool

namestring

Name is the redefined name of the tool

spec.toolsOverride.annotations

Annotations overrides specific tool annotation fields. Only specified fields are overridden; others pass through from the backend.

<CRDFields>: no object at path "spec.toolsOverride.annotations" in MCPToolConfig.

status

MCPToolConfigStatus defines the observed state of MCPToolConfig

FieldTypeDescription
conditionsobject[]

Conditions represent the latest available observations of the MCPToolConfig's state

configHashstring

ConfigHash is a hash of the current configuration for change detection

observedGenerationinteger

ObservedGeneration is the most recent generation observed for this MCPToolConfig. It corresponds to the MCPToolConfig's generation, which is updated on mutation by the API Server.


format int64
referencingWorkloadsobject[]

ReferencingWorkloads is a list of workload resources that reference this MCPToolConfig. Each entry identifies the workload by kind and name.

status.conditions[]

Conditions represent the latest available observations of the MCPToolConfig's state

FieldTypeDescription
lastTransitionTimerequiredstring

lastTransitionTime is the last time the condition transitioned from one status to another. This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable.


format date-time
messagerequiredstring

message is a human readable message indicating details about the transition. This may be an empty string.


maxLength 32768
observedGenerationinteger

observedGeneration represents the .metadata.generation that the condition was set based upon. For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date with respect to the current state of the instance.


format int64 · min 0
reasonrequiredstring

reason contains a programmatic identifier indicating the reason for the condition's last transition. Producers of specific condition types may define expected values and meanings for this field, and whether the values are considered a guaranteed API. The value should be a CamelCase string. This field may not be empty.


pattern ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$ · minLength 1 · maxLength 1024
statusrequiredstring

status of the condition, one of True, False, Unknown.


enum: True | False | Unknown
typerequiredstring

type of condition in CamelCase or in foo.example.com/CamelCase.


pattern ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$ · maxLength 316

status.referencingWorkloads[]

ReferencingWorkloads is a list of workload resources that reference this MCPToolConfig. Each entry identifies the workload by kind and name.

FieldTypeDescription
kindrequiredstring

Kind is the type of workload resource


enum: MCPServer | VirtualMCPServer | MCPRemoteProxy
namerequiredstring

Name is the name of the workload resource


minLength 1

Referenced by: