Skip to main content
Glama

diff_environments

Read-onlyIdempotent

Compare secret values across two environments to spot drift before a deploy. Reports per-key status: same, different, or present on one side only—never values.

Instructions

[secrets] Compare two environments across the visible secrets and report, per key, whether the values are the same, different, or present on only one side — statuses only, never values. Use before a deploy or promotion to see environment drift; follow up with promote_secret per key. A single-value (collapsed) secret applies to every environment and is reported as 'collapsed'. Read-only apart from a 'list' audit event. Returns { a, b, entries: [{ key, scope, status }], summary, drift }.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
envAYesFirst environment. Example: 'staging'.
envBYesSecond environment. Example: 'prod'.
keysNoRestrict the comparison to these keys.
orgIdNoOrganization identifier for org-scoped secrets. Required only when scope='org'. Example: 'acme-corp'.
scopeNoWhere the secret lives. 'global' = user keyring (default if omitted on reads), 'project' = scoped to projectPath, 'team' = team-shared (needs teamId), 'org' = org-shared (needs orgId).
teamIdNoTeam identifier for team-scoped secrets. Required only when scope='team'. Example: 'acme-platform'.
projectPathNoAbsolute path to the project root for project-scoped secrets and policy resolution. Defaults to the MCP server's current working directory when omitted.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.18.0

TDQS

A4.5/5.0
Behavior5/5

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

The description adds meaningful behavioral context beyond annotations: it discloses that only statuses are returned and never values, that collapsed secrets are reported as 'collapsed', and that the operation is read-only except for a 'list' audit event. This is valuable nuance that the annotations alone do not provide.

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?

The description is compact and front-loaded, leading with the core comparison behavior before adding usage guidance and return shape. Every sentence contributes either behavioral constraints, context, or output details without redundancy.

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?

Despite having no output schema, the description summarizes the return structure explicitly ('Returns { a, b, entries: [{ key, scope, status }], summary, drift }'). Combined with full parameter schema coverage and strong annotations, this gives an agent everything needed to select and invoke the tool correctly.

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 coverage is 100%, so the schema already documents all parameters. The description adds context around the output and the notion of visible secrets, but it does not add parameter-specific semantics beyond what the input schema already provides. Baseline 3 is appropriate.

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 names a specific action ('Compare two environments'), a specific scope ('across the visible secrets'), and the exact output behavior ('report, per key, whether the values are the same, different, or present on only one side'). This clearly distinguishes it from sibling tools like list_secrets, inspect_secret, and promote_secret.

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 explicitly states when to use it ('Use before a deploy or promotion to see environment drift') and suggests the follow-up action ('follow up with promote_secret per key'). It does not enumerate when not to use it, but the context is clear enough for agent selection.

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