Skip to main content
Glama

Get container logs

k8s_get_container_logs
Read-onlyIdempotent

Fetch Kubernetes container logs by container ID, with optional tail count and named context, to diagnose issues and inspect runtime output.

Instructions

Invoke the get_container_logs operation.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "container_id": "<container_id>"
    },
    "name": "k8s_get_container_logs"
  }
}

Input Schema

NameRequiredDescriptionDefault
tailNo50
contextNoNamed context of the multi-context pool to run against (see cm_multi_context list_contexts); the default context if omitted.
container_idYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv3.4.2

TDQS

D1.6/5.0
Behavior2/5

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

Annotations already declare readOnlyHint, idempotentHint, destructiveHint=false and openWorldHint, so the safety profile is covered externally, but the description adds nothing beyond that: no word on whether logs are a snapshot or a stream, how `tail` limits results, whether logs come from the current or previous instance, or what happens when the container is gone. A 2 reflects that the annotations do all the work while the description contributes zero extra context.

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

Conciseness2/5

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

The single sentence is short but wastes its only slot on a tautology rather than front-loading the resource and key constraints. Brevity here comes from under-specification, not efficiency.

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

Completeness1/5

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

A three-parameter tool with one required identifier, a defaulted `tail` string, no output schema, and no explanation of log retrieval semantics needs far more than one restated sentence. Nothing an agent needs in order to call this correctly is present.

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

Parameters1/5

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

Schema description coverage is only 33%: `container_id` and `tail` (which even defaults to "50") carry no schema descriptions, and the description supplies no meaning for either. With coverage well under 50%, the description was required to compensate and does not.

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

Purpose2/5

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

"Invoke the get_container_logs operation" only restates the tool name in different words; it never says what the operation actually does (fetch logs for a container). There is no scope, no output subject, and no differentiation from siblings such as k8s_read_pod_logs, k8s_compose_logs, k8s_service_logs, or the docker/podman log equivalents.

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

Usage Guidelines1/5

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

No when-to-use guidance, no when-not-to-use, and no mention of any alternative among the many log-related siblings. The agent is left to guess entirely from the name.

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

Deploy Server

Other Tools