Skip to main content
Glama

detect_drift

Read-onlyIdempotent

Identify hidden coupling across modules by detecting cross-module co-change anomalies and shotgun surgery patterns in git commits.

Instructions

Detect architectural drift: cross-module co-change anomalies (files in different modules that always change together) and shotgun surgery patterns (commits touching 3+ modules). Requires git. Use to identify hidden coupling across modules. For file-pair co-changes use get_co_changes instead. Read-only. Returns JSON: { anomalies, shotgunSurgery, total }.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
since_daysNoAnalyze commits from last N days (default: 180)
min_confidenceNoMin Jaccard confidence for co-change anomalies (default: 0.3)
Behavior5/5

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

Annotations already indicate read-only and idempotent, but description adds that it requires git and returns JSON with specific fields. No contradiction; adds useful behavioral context.

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?

Four sentences, front-loaded with action, each sentence serves a purpose: action, detail, usage, alternative, return. No wasted words.

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?

Given no output schema, description explains return format (JSON with anomalies, shotgunSurgery, total). It covers prerequisites (git), usage context, and differentiates from sibling. Completely adequate for an agent to use this tool.

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 descriptions cover both parameters fully (100% coverage). Description does not add additional parameter details beyond what schema provides, so baseline of 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?

Clearly states it detects architectural drift via cross-module co-change anomalies and shotgun surgery. Distinguishes from sibling 'get_co_changes' by noting that tool is for file-pair co-changes.

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?

Explicitly says 'Use to identify hidden coupling across modules', mentions 'Requires git' as prerequisite, and provides alternative: 'For file-pair co-changes use get_co_changes instead.'

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/nikolai-vysotskyi/trace-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server