Skip to main content
Glama

Get Workload Logs

get_workload_logs
Read-onlyIdempotent

Query the logs of workloads in a GVC (gvc, workload, container, location) or of an mk8s cluster with the logs add-on (cluster, namespace, pod, container, node, job), OR pass a raw LogQL query, which REPLACES the structured params, so it must embed ALL labels itself. Workload labels: gvc, workload, container, location, provider, replica, stream (replica and stream only via a raw query). Cluster labels: cluster_name, namespace, pod, container, node, job; Control Plane workloads on a cluster log under their gvc. filter is a literal substring match (|=), not regex; for regex use a raw query with |~. Cron run logs: scope a raw query by the replica from list_deployments jobExecutions.

Input Schema

NameRequiredDescriptionDefault
toNoAbsolute end time (exclusive, ISO 8601).
gvcNoGVC name. Required unless `cluster` or a raw `query` is provided.
jobNoWith `cluster`: log source (all when omitted).
orgNoOrganization slug.
podNoWith `cluster`: pod name.
fromNoAbsolute start time (inclusive, ISO 8601). Overrides `since`. Must be earlier than `to`.
nodeNoWith `cluster`: node name.
limitNoMaximum log entries to return (default: 30, max: 999).
orderNoSort order (default: "oldest_first").
queryNoRaw LogQL query. REPLACES the structured params entirely, so it must embed ALL labels itself (gvc, workload, location, …) — required for the replica/stream labels, which have no structured param. Not sanitized — use structured params when possible.
sinceNoLookback window as relative duration (default: "1h"). Examples: "30m", "2h", "1d".
filterNoLiteral substring filter (LogQL `|=`) — only return log lines containing this exact text. NOT a regex; for regex matching use a raw `query` with `|~`.
clusterNomk8s cluster name, in place of `gvc`: the cluster's own logs (logs add-on).
locationNoLocation to filter logs for (e.g., "aws-us-east-1").
workloadNoWorkload name to filter logs for.
containerNoContainer name to filter logs for (e.g., "main", "_accesslog").
namespaceNoWith `cluster`: Kubernetes namespace.

Output Schema

NameRequiredDescriptionDefault
okYes
dataNoThe full result. Read this, not only the summary.
detailsNo
summaryYes
nextStepsNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed6 schema fields changed
    • addedInput schema / properties / cluster
      Added value: +{
      +  "description": "mk8s cluster name, in place of `gvc`: the cluster's own logs (logs add-on).",
      +  "type": "string"
      +}
    • changedInput schema / properties / gvc / description
      Previous value: -"GVC name. Required unless raw `query` is provided."New value: +"GVC name. Required unless `cluster` or a raw `query` is provided."
    • addedInput schema / properties / job
      Added value: +{
      +  "description": "With `cluster`: log source (all when omitted).",
      +  "enum": [
      +    "kubernetes-pods",
      +    "kubelet",
      +    "kernel",
      +    "docker-containers",
      +    "audit"
      +  ],
      +  "type": "string"
      +}
    • addedInput schema / properties / namespace
      Added value: +{
      +  "description": "With `cluster`: Kubernetes namespace.",
      +  "type": "string"
      +}
    • addedInput schema / properties / node
      Added value: +{
      +  "description": "With `cluster`: node name.",
      +  "type": "string"
      +}
    • addedInput schema / properties / pod
      Added value: +{
      +  "description": "With `cluster`: pod name.",
      +  "type": "string"
      +}
  2. Changed23 schema fields changed
    • removedInput schema / $schema
      Removed value: -"http://json-schema.org/draft-07/schema#"
    • removedInput schema / additionalProperties
      Removed value: -false
    • removedInput schema / properties / container / minLength
      Removed value: -1
    • removedInput schema / properties / from / maxLength
      Removed value: -40
    • removedInput schema / properties / gvc / minLength
      Removed value: -1
    • removedInput schema / properties / location / minLength
      Removed value: -1
    • changedInput schema / properties / org / description
      Previous value: -"Organization slug (lowercase kebab-case). NEVER guess — if the user has not named one, ask. On org-not-found, stop and ask; do not retry variants."New value: +"Organization slug."
    • removedInput schema / properties / org / maxLength
      Removed value: -63
    • removedInput schema / properties / org / minLength
      Removed value: -1
    • removedInput schema / properties / org / pattern
      Removed value: -"^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$"
    • removedInput schema / properties / query / maxLength
      Removed value: -500
    • removedInput schema / properties / query / minLength
      Removed value: -1
    • removedInput schema / properties / since / maxLength
      Removed value: -20
    • removedInput schema / properties / to / maxLength
      Removed value: -40
    • removedInput schema / properties / workload / minLength
      Removed value: -1
    • removedInput schema / required
      Removed value: -[
      -  "org"
      -]
    • removedOutput schema / $schema
      Removed value: -"http://json-schema.org/draft-07/schema#"
    • removedOutput schema / additionalProperties
      Removed value: -false
    • changedOutput schema / properties / data / description
      Previous value: -"The full machine-readable result — list rows, the resource object, query results. Read THIS, not just the summary."New value: +"The full result. Read this, not only the summary."
    • addedOutput schema / properties / details
      Added value: +{
      +  "type": "string"
      +}
    • removedOutput schema / properties / nextSteps / description
      Removed value: -"Recommended follow-up actions for this task, in order."
    • removedOutput schema / properties / ok / description
      Removed value: -"Whether the call succeeded."
    • removedOutput schema / properties / summary / description
      Removed value: -"One-line summary of the result."
  3. First observed

TDQS

Score is being calculated.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.