Skip to main content
Glama

drift_check

Read-only

Audit served agent profiles for prompt validation failures and silently misconfigured config levers. Reports drift read-only, scoped to this environment, so you know what to publish or fix.

Instructions

Check whether each agent profile's SERVED prompt (resolved through prompt_version_ids — not the newest version) passes core.prompt_validator.validate_prompt — the same gate admin_mcp/tools_configure.py's publish path runs before a write — plus a registry of config levers whose wrong value is silent (voice_config.barge_in_enabled, voice_config.answer_watchdog_sec, memory_config.enabled on a voice profile, ... — voice_config is FLAT since 2026-08-17; the old voice_config.live.* paths are what an unmigrated row still stores, not where a lever is read from). A served prompt DIFFERING from the repo constant is expected under DB-authoring (prompts change through MCP/API/DB, never a merge) and shows as info when the validator has real rules to check it against, warning when it does not (unconfirmed, not proven safe). What is still critical is the served version FAILING validation outright — the modern shape of "is my merged prompt fix actually live?": every scripts/seed_*.py / admin/seed_*.py is insert-if-missing, so once a row exists a seeder can NEVER push a repo edit into it, and a profile can stay pinned to a bad version indefinitely unless something checks for it. Findings whose summary carries "[INCIDENT LEVER LEFT ENGAGED]" are config levers pulled during a past incident and never restored — a different failure mode from "never configured" and worth flagging louder; summary.incident_levers_engaged counts them. want_diff=False by default: a prompt diff can be large and half Arabic, expensive to put in an LLM's context — pass true only when you need the actual text delta. profile/agent_kind optionally narrow the findings (profile matches the exact agent_profiles.slug a finding is about; agent_kind matches that slug's agent_kind per the check registry — best-effort, only as complete as PROMPT_CHECKS' coverage). Every fetch is scoped to ONE agent_profiles.environment — this process's own — and the AI project is a single DB holding every environment's rows, so drifted: 0 describes that environment and nothing else. The audited value is returned as audited_environment; quote it whenever you report a verdict. Read-only: this reports drift, it does not fix it — publish the fix with prompts action=serve / update_profile.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "drift_check"
  }
}

Input Schema

NameRequiredDescriptionDefault
profileNoOnly findings for this profile slug.
want_diffNoInclude the prompt text delta (large, half-Arabic).
agent_kindNoOnly findings for this agent kind.

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.5/5.0
Behavior4/5

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

Beyond readOnlyHint=true, it discloses that fetches are scoped to one environment, that drifted:0 only describes that environment, that audited_environment must be quoted, the severity semantics (info vs warning vs critical), and that incident-lever findings are a distinct failure mode. It does not mention rate limits or cost, but the read-only/non-fixing behavior is stated plainly.

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

Conciseness3/5

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

The core check is front-loaded, but the prose is dense and digressive — the seeder insert-if-missing rationale and the voice_config FLAT/2026-08-17 history are interpretation and motivation rather than invocation guidance. Useful, but several clauses could be trimmed without hurting an agent's ability to call it.

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?

An output schema exists, yet the description still clarifies the environment scoping caveat and the meaning of fields like audited_environment and incident_levers_engaged, and covers the read-only contract. For a complex, multi-profile auditing tool this is complete enough to invoke correctly.

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

Parameters4/5

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

Schema coverage is 100% and parameters are defaulted, so the schema already carries the basics. The description adds real meaning: want_diff's default rationale, that profile matches the exact agent_profiles.slug, and that agent_kind is best-effort limited by PROMPT_CHECKS coverage.

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?

States a specific verb+resource: check whether each agent profile's SERVED prompt (resolved via prompt_version_ids, not newest) passes core.prompt_validator.validate_prompt, plus a registry of silently-wrong config levers. It also distinguishes itself from the fix path (prompts action=serve / update_profile), so an agent can tell diagnosis from repair.

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

Usage Guidelines5/5

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

Gives explicit when-to-pass guidance for want_diff (default false; true only when the actual text delta is needed, because it is large and half-Arabic), explains how profile/agent_kind narrow results including their best-effort limits, and names the alternative tools for acting on findings.

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