Skip to main content
Glama

mcp-k8s-go

get_deployment_test.yaml1.87 kB
case: Get k8s deployment in: { "jsonrpc": "2.0", "method": "tools/call", "id": 2, "params": { "name": "get-k8s-resource", "arguments": { "context": "k3d-mcp-k8s-integration-test", "namespace": "test-deployment", "kind": "deployment", "version": "v1", "group": "apps", "name": "nginx-deployment", }, }, } out: # we only check response parially, because there is too much various data there # and we will not benefit much from verifying all of it, so we only check the beginning # where metadata has name and namespace of the resource, if more detailed check is needed # it should be done in unit test where assertions could be made more dynamically in Go { "jsonrpc": "2.0", "id": 2, "result": { "content": [ { "type": "text", "text": !!ere '{"apiVersion":"apps\\/v1","kind":"Deployment","metadata":{/.*/"name":"nginx-deployment","namespace":"test-deployment"/.*/"replicas":0/.*/}', }, ], "isError": false, }, } --- case: Get k8s deployment name in: { "jsonrpc": "2.0", "method": "tools/call", "id": 2, "params": { "name": "get-k8s-resource", "arguments": { "context": "k3d-mcp-k8s-integration-test", "namespace": "test-deployment", "kind": "deployment", "name": "nginx-deployment", "go_template": "{{ .metadata.name }}", }, }, } out: { "jsonrpc": "2.0", "id": 2, "result": { "content": [{ "type": "text", "text": "nginx-deployment" }], "isError": false, }, }

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/strowk/mcp-k8s-go'

If you have feedback or need assistance with the MCP directory API, please join our Discord server