Skip to main content
Glama

bus_factor

Identify directories at risk when too few authors own most recency-weighted changes. Flags single-contributor areas with sufficient commit history so you can target reviews and knowledge sharing.

Instructions

Bus factor per directory (first depth path components), from history: the fewest authors whose recency-weighted changed lines exceed 50%. Directories with factor 1 and at least min_commits commits are marked AT RISK. Use file_experts for blame-based detail.

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": "bus_factor"
  }
}

Input Schema

NameRequiredDescriptionDefault
refNoHEAD
pathNo
repoNo
as_ofNo
depthNo
limitNo
sinceNo
max_commitsNo
min_commitsNo
half_life_daysNo

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4/5.0
Behavior4/5

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

With no annotations, the description carries the full burden, and it does disclose the core behavior: recency weighting, the 50% authorship threshold, the AT RISK marking rule, and that grouping is by the first depth path components. It leaves operational behavior such as history window scoping (since/as_of) and cost controls (max_commits, limit) unexplained, but the substantive semantics of the computation are conveyed.

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?

The definition is compact and front-loads the metric definition before the risk rule and the sibling pointer. Three sentences carry a lot of meaning with little waste, though the parenthetical about depth and the risk clause are dense enough to require a careful read.

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

Completeness4/5

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

For a complex 10-parameter analysis tool with no annotations, the description explains the metric, the grouping, and the risk rule well, and an output schema exists so return values need not be described. The main gap is that most parameters remain undocumented, which matters for a tool with this many knobs.

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 0% across 10 parameters, so the description must compensate. It explains only depth and min_commits in any meaningful way; ref, path, repo, as_of, since, limit, max_commits, and half_life_days receive no explanation, leaving most of the configuration surface opaque.

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 states a specific metric (bus factor) computed per directory from history, and defines it operationally as the fewest authors whose recency-weighted changed lines exceed 50%. It also explicitly separates itself from the sibling file_experts ('Use file_experts for blame-based detail'), so an agent can choose between them without opening either 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?

It gives clear usage context: the tool reports risk per directory, marks factor-1 directories with at least min_commits as AT RISK, and routes blame-level detail to file_experts. It does not explicitly exclude or compare against other history tools such as hotspots or churn_timeline, so the guidance is clear but not exhaustive.

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