Skip to main content
Glama

get_pod_logs

Retrieve Kubernetes pod logs from a specific cluster and namespace, with configurable tail lines to aid troubleshooting and monitoring.

Instructions

获取指定 pod 的日志。

Args:
    cluster: 目标集群,可选 "local"(本地 k3s)或 "cloud"(阿里云 k3s),默认 "local"
    namespace: 指定的 namespace,默认 "default"
    pod_name: 指定的 pod 名称
    tail_lines: 返回最后多少行日志,默认 100

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
clusterNolocal
pod_nameNo
namespaceNodefault
tail_linesNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Install Server

TDQS

A3.9/5.0
Behavior3/5

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

With no annotations, the description must carry behavioral disclosure. It explains that it fetches logs and documents cluster options (local vs cloud) and tail_lines, but does not mention read-only nature, error behavior, or permissions. For a simple read operation this is adequate but not rich.

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

Conciseness5/5

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

The description is concise and well-structured: a one-line purpose followed by a formatted argument list. Every sentence provides useful detail, with no filler or repetition.

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

Completeness4/5

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

For a tool with 4 parameters, no required fields, and an output schema, the description covers all necessary operational details. It does not discuss edge cases like multi-container pods or follow mode, but these are not clearly needed given the tool's simplicity and the presence of an output schema.

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

Parameters5/5

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

Schema description coverage is 0%, so the description fully compensates by explaining every parameter: cluster (with specific values and defaults), namespace (default), pod_name, and tail_lines (meaning). This adds significant meaning beyond the raw schema.

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

Purpose5/5

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

The description clearly states the tool's purpose: '获取指定 pod 的日志' (get logs of specified pod). It uses a specific verb and resource, and is distinct from sibling tools like list_pods, describe_pod, and diagnose_pod.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives such as describe_pod or diagnose_pod. It only explains parameters, not use cases or exclusions, so agents have no explicit context for tool selection.

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

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/AmazingYe-oss/k8s-mcp-server'

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