Skip to main content
Glama

Change coupling

change_coupling
Read-onlyIdempotent

Find file pairs that frequently change in the same commits within a time window, revealing hidden dependencies imports miss. Focus on one file to see what it changes with.

Instructions

Find pairs of files that are often changed in the same commits in the last N days (merge commits excluded), most shared commits first. Reveals hidden dependencies that imports do not show, e.g. code and the config or test it always drags along. Pass "file" to see what usually changes together with one file.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
daysNoSize of the time window in days.
fileNoOnly pairs that include this repository-relative file.
pathNoRestrict to this file or directory.
repoNoRepository name or absolute path from the allowlist. Defaults to the first configured repo.
limitNoMaximum number of results (1-100).
excludeNoGlob patterns for files to leave out, same syntax as in file_hotspots.
minSharedNoMinimum number of shared commits for a pair to be listed.
maxFilesPerCommitNoSkip commits touching more files than this (bulk renames, formatting).

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
repoYesName of the repository that was queried.
pairsYes
pairCountYesAll pairs with at least minShared shared commits.
windowDaysYes
scanTruncatedYes
commitsScannedYes
commitsSkippedYesCommits ignored for touching more than maxFilesPerCommit.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.0

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent, non-destructive, closed-world behavior, so the bar is lower. The description usefully adds behavioral context beyond them: merge commits are excluded and results are ordered most-shared-commits-first, which tell the agent how the analysis is computed.

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?

Three tight sentences, front-loaded with the core definition, then the value proposition, then the filter mode. No filler and every sentence earns its place.

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, so return values need not be described, and annotations fully cover the safety profile. Combined with the concept, exclusions, and the file drill-down, the definition gives an agent everything needed to invoke it 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 description coverage is 100%, so every parameter is already documented and the baseline is 3. The description only reinforces the 'file' filter's intent and the shared-commit ordering; it adds little syntax or meaning beyond the schema.

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 and resource (find pairs of files changed together in commits) plus a clear scope (last N days, merge commits excluded). The concept of co-change coupling is intrinsically distinguishable from siblings like file_hotspots and file_history, so an agent can route to it without opening any schema.

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?

Gives a concrete rationale for when this is valuable ('reveals hidden dependencies that imports do not show') and explains the drill-down mode ('pass file to see what usually changes together with one file'). It stops short of naming alternatives or stating when NOT to use it versus siblings like file_hotspots.

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