Skip to main content
Glama
SH-G401
by SH-G401

AKS pod logs

azure_aks_pod_logs
Read-onlyIdempotent

Retrieve recent logs from an AKS pod container to diagnose issues. Optionally read logs from a crashed previous instance to troubleshoot CrashLoopBackOff.

Instructions

Reads the last log lines of a pod container in an AKS cluster through the Kubernetes API (read-only). Set previous to true to read the logs of the previous, crashed instance of a container in CrashLoopBackOff. Find pod names with azure_aks_workloads.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
podYesKubernetes pod name.
previousNoRead logs of the previous (crashed) container instance.
clusterIdYesResource ID of a Microsoft.ContainerService/managedClusters AKS cluster.
containerNoContainer name. Required when the pod has more than one container.
namespaceYesKubernetes namespace name.
tailLinesNoMaximum lines (default 200).
sinceMinutesNoOnly lines from the last N minutes.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already mark the operation read-only and idempotent; the description adds useful behavioral context by specifying the Kubernetes API route, read-only semantics, and how 'previous' exposes logs from crashed container instances. This goes beyond the structured annotations without contradicting them.

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?

Three sentences with no fluff: the main purpose is front-loaded, the special 'previous' behavior is explained, and a useful sibling lookup hint is included. Every sentence contributes operational guidance.

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

Completeness5/5

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

For a 7-parameter tool, the schema covers parameter details and annotations cover safety/idempotency. The description adds the missing operational context: how to get crashed-instance logs and where to find pod names, making the tool fully usable without further lookups.

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?

Schema description coverage is 100%, so the schema fully documents parameters like pod, namespace, clusterId, container, tailLines, and sinceMinutes. The description adds value by explaining the purpose of 'previous' and directing users to find pod names, but most parameter semantics remain in the 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 verb 'Reads' and the specific resource: last log lines of a pod container in an AKS cluster via the Kubernetes API. It distinguishes this from log analytics or container app logs by scoping to AKS pod containers.

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

Usage Guidelines4/5

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

The description gives clear context for when to use the tool, including the CrashLoopBackOff scenario with 'previous' and a pointer to azure_aks_workloads for finding pod names. It does not explicitly contrast it with other log-query siblings, but the AKS pod-scoped use case is clear enough.

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