Skip to main content
Glama

Diff manifest

k8s_diff_manifest

Compares a Kubernetes manifest with the live cluster by dry-run applying each document and reporting whether applying it would change or create the object, detecting drift and comparing secrets by digest.

Instructions

Compare a manifest (e.g. from services//) with the live cluster.

Each document is server-side applied as a dry run and the would-be object is compared with the live one; drift is true when applying the manifest would change the cluster (or the object is absent). Secret documents are compared by digest only.

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": {
      "manifest_yaml": "<manifest_yaml>"
    },
    "name": "k8s_diff_manifest"
  }
}

Input Schema

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

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv3.4.2

TDQS

B3.4/5.0
Behavior4/5

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

Well beyond the annotations, it discloses the actual mechanism — each document is server-side applied as a dry run and the would-be object compared to the live one — which explains why readOnlyHint=false despite no real mutation. It also defines what 'drift' means (would change the cluster, or object absent) and notes the special-case behavior that secret documents are compared by digest only. It stops short of mentioning required permissions or error/failure handling.

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

Conciseness4/5

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

Front-loaded with the core comparison statement, followed by the mechanism and then the drift definition — a logical order with no filler. The parenthetical path example is slightly confusing rather than wasteful, but overall it is tight.

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

Completeness3/5

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

With three parameters, no output schema, and openWorldHint=true, the description does a fair job explaining the conceptual output by defining 'drift'. However, it omits what the tool actually returns (a diff body? just a boolean per document?) and leaves namespace resolution unspecified, which matters for a tool that compares against a live cluster.

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

Parameters2/5

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

Schema description coverage is only 33%: only 'context' is documented in the schema, while 'namespace' and 'manifest_yaml' have no descriptions. The description does not compensate — it never explains what the namespace parameter does or how it interacts with namespaces declared inside the manifest, and 'a manifest (e.g. from services/<name>/)' is ambiguous about whether a path, filename, or raw YAML is expected for manifest_yaml.

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

Purpose4/5

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

The description opens with a specific verb and resource: 'Compare a manifest ... with the live cluster.' That is far more than a restatement of the name, and the drift semantics make the intent unambiguous. It does not, however, explicitly distinguish itself from the closely named sibling k8s_apply_manifest, leaving that separation to inference.

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

Usage Guidelines3/5

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

Usage is only implied: an agent can guess this is the pre-apply safety check, but the description never states when to use it instead of k8s_apply_manifest or k8s_export_manifest, nor any prerequisite. There are no exclusions or explicit alternatives named.

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