Skip to main content
Glama

stale_work_audit

Read-only

Audit long-open merge/pull requests, inactive branches, and branch protection gaps to flag stale work for cleanup or review.

Instructions

[READ] Long-open MRs/PRs, inactive branches, protection config gaps.

The flagship hygiene audit: flags open merge/pull requests idle past stale_mr_days, non-default branches with no commit for stale_branch_days, a default branch without protection, and protection rules that allow force-push. Every flag carries its numbers. Pass injected rows for pure analysis, or a project to pull live.

Args: project: Project id or full path (required unless rows are injected). stale_mr_days: Days an open MR may idle before flagging (default 14). stale_branch_days: Days a branch may idle before flagging (default 90). merge_requests: Injected rows {id, title, state, updatedAt, draft}. branches: Injected rows {name, default, protected, lastCommitAt}. protections: Injected rows {branch, allowForcePush}. default_branch: Default-branch name (pulled live when omitted). target: Server target name from config; omit for the default.

Returns dict: {staleMergeRequests, staleBranches, protectionGaps, counts, thresholds, note}.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
targetNo
projectNo
branchesNo
protectionsNo
stale_mr_daysNo
default_branchNo
merge_requestsNo
stale_branch_daysNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.5.0

TDQS

A4.5/5.0
Behavior4/5

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

Annotations only declare readOnlyHint=true, and the description reinforces this with the [READ] tag plus valuable detail the annotation lacks: the specific flag conditions (idle past stale_mr_days, unprotected default branch, force-push allowed), that every flag carries its numbers, and the returned dict shape. It stops short of describing failure modes or live-pull authentication needs.

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?

Front-loads the flagship framing and flag list, then a tight Args block. Some redundancy with the schema defaults, but every line carries semantic value and the structure is easy to scan.

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?

With no output schema, the description supplies the return dict keys ({staleMergeRequests, staleBranches, protectionGaps, counts, thresholds, note}), covers both input modes, and defines the flagging thresholds. An agent has everything needed to call and interpret it.

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

Parameters5/5

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

Schema description coverage is 0%, so the description carries the full burden and does: it documents all 8 params with defaults (stale_mr_days=14, stale_branch_days=90), the required-unless-injected rule for project, row field shapes for each injected array, and the target meaning. This far exceeds what the bare schema conveys.

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 ('stale work audit') and enumerates exactly what it flags: long-open MRs/PRs, inactive branches, protection config gaps. This clearly distinguishes it from sibling list tools like list_merge_requests or list_branches, which merely enumerate raw resources.

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 concrete operating modes ('Pass injected rows for pure analysis, or a project to pull live') so the agent knows how to invoke it. It doesn't explicitly name sibling alternatives or exclusions, but the context for use is unambiguous.

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