Skip to main content
Glama
htrixtec

MCP Server Kubernetes

by htrixtec

kubectl_logs

Read-only

Retrieve logs from Kubernetes pods, deployments, jobs, or cronjobs. Specify resource type, name, and namespace, with optional filters like tail lines or since time.

Instructions

Get logs from Kubernetes resources like pods, deployments, or jobs

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
resourceTypeYesType of resource to get logs from
nameYesName of the resource
namespaceYesKubernetes namespacedefault
containerNoContainer name (required when pod has multiple containers)
tailNoNumber of lines to show from end of logs
sinceNoShow logs since relative time (e.g. '5s', '2m', '3h')
sinceTimeNoShow logs since absolute time (RFC3339)
timestampsNoInclude timestamps in logs
previousNoInclude logs from previously terminated containers
followNoFollow logs output (not recommended, may cause timeouts)
labelSelectorNoFilter resources by label selector
contextNoKubeconfig Context to use for the command (optional - defaults to null)
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations set readOnlyHint=true, and the description's 'get logs' is consistent. However, the description does not elaborate on behavioral traits beyond the annotation, such as potential side effects of the 'follow' parameter or that logs are from stdout/stderr. The description adds minimal value over the annotation.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, clear sentence with no redundancy. It is appropriately concise for the tool's simplicity. However, it could include key parameter hints without becoming verbose.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool has 12 parameters and no output schema, the description is too sparse. It omits important contextual details such as the need for container when multi-container pods exist, the meaning of labelSelector, and the risk of timeouts with follow. The description fails to fully equip an agent to handle complex log retrieval scenarios.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema covers all 12 parameters with descriptions (100% coverage). The description does not add high-level semantics or explain parameter interactions (e.g., mutual exclusivity of since/sinceTime). Baseline is 3 due to full schema coverage, and the description provides no additional benefit.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool gets logs from Kubernetes resources and lists examples (pods, deployments, jobs). The name kubectl_logs is self-explanatory, but the description adds specificity by mentioning resource types. It distinguishes from sibling tools like kubectl_get which retrieve resource definitions, not logs.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage for retrieving logs but does not provide explicit guidance on when to use this tool versus alternatives, nor does it mention when not to use it (e.g., for live streaming which may cause timeouts). No exclusions or context for sibling tools are given.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

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/htrixtec/mcp-server-kubernetes'

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