Skip to content

Strip Kubernetes noise from tool responses #63

@bmertens-datum

Description

@bmertens-datum

Summary

All CRUD tool responses currently return the full Kubernetes object, including internal metadata fields that are meaningless to agents and waste context tokens.

Current behavior

Responses include fields like:

  • metadata.managedFields (large, internal controller bookkeeping)
  • metadata.resourceVersion (internal version tag)
  • metadata.uid (internal UUID)
  • metadata.generation, metadata.creationTimestamp, etc.

These fields bloat every response and add noise that agents must filter mentally.

Proposed behavior

Before returning any resource, pass it through a shared cleanResource() utility that strips internal-only fields:

func cleanResource(obj map[string]any) map[string]any {
    // remove managedFields, resourceVersion, uid, generation, etc.
}

Agents receive only the fields relevant to understanding and managing the resource (metadata.name, metadata.namespace, spec, status).

Acceptance criteria

  • Shared cleanResource() utility implemented
  • Applied to all list, get, create, and update responses across all 8 CRUD tools
  • managedFields, resourceVersion, uid, generation, creationTimestamp removed
  • spec and status preserved in full

Ratings

Dimension Score (1–5)
LOE 2
Impact 3
Agent XP 4

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions