Tool: kube_api_resources
Retrieves the available API groups and resources from a Kubernetes cluster. This is similar to running kubectl api-resources.
The following sample demonstrate how to use curl to invoke the kube_api_resources MCP tool.
| Curl Request |
|---|
curl --location 'https://container.googleapis.com/mcp' \ --header 'content-type: application/json' \ --header 'accept: application/json, text/event-stream' \ --data '{ "method": "tools/call", "params": { "name": "kube_api_resources", "arguments": { // provide these details according to the tool's MCP specification } }, "jsonrpc": "2.0", "id": 1 }' |
Input Schema
Request for retrieving Kubernetes API resources.
KubeAPIResourcesRequest
| JSON representation |
|---|
{ "parent": string } |
| Fields | |
|---|---|
parent |
Required. The cluster, which owns this collection of resource types. Format: projects/{project}/locations/{location}/clusters/{cluster} |
Output Schema
APIGroupDiscoveryList is a list of API group discovery.
APIGroupDiscoveryList
| JSON representation |
|---|
{
"groups": [
{
object ( |
| Fields | |
|---|---|
groups[] |
The list of API group discovery. |
APIGroupDiscovery
| JSON representation |
|---|
{ "name": string, "versions": [ string ], "preferredVersion": string } |
| Fields | |
|---|---|
name |
The name of the resource type. e.g. "pods", "deployments", "services". |
versions[] |
The list of versions for this API group, in the form {group}/{version}. |
preferredVersion |
The preferred version for this API group, in the form {group}/{version}. |
Tool Annotations
Destructive Hint: ❌ | Idempotent Hint: ✅ | Read Only Hint: ✅ | Open World Hint: ❌