Skip to main content
Glama

Risk ranking of every function

list_worklist
Read-onlyIdempotent

Lists the risk-ranked worklist from the latest trusted run, ordered by complexity and churn. Use it to survey a repository, split work by file, and select the next item to fix.

Instructions

Lists the newest trusted run's whole risk ranking, every admitted function ordered by ccn times recency-weighted churn. Use it to survey a repo or split work by file, and get_next_item for the one crap-ranked packet to fix now. It runs no tests, keeps finished rows so it never empties, and reads the churn cache, not git. scope narrows before top caps, so scope ["core"] with top 20 returns the 20 riskiest in core, an unknown scope name is a config error, and repo may be any directory under the measured checkout.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
topNocap the active list (default: the config's worklist_top, 50)
repoNopath to the scored repo's root (default: the repo the server was started in)
scopeNorestrict the ranking to these declared scopes (exact [[scope]] names from crapkit.toml, one --scope each)

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
floorNothe effective worklist_floor: rows under this ccn are listed only when over their ceiling or in a hot file
staleNotrue when the run's commit is not HEAD, so cov, crap and uncovered_lines describe an older tree; crapkit coverage --reuse-unchanged (get_function_brief's commands.refresh) clears it
activeNothe ranking: functions in files with churn in the window, risk descending, cut at top or worklist_top
commitNothat run's commit, full sha
run_idNoid of the run these numbers come from: the newest trusted run (a coverage run, or a verify run whose verdict passed)
schemaNopayload schema version, 1
dormant_topNothe first 10 dormant functions, same shape as active: sleeping hazards kept out of the queue
active_totalNoactive rows admitted before the cap: what top or worklist_top hid
dormant_countNoranked functions whose file had no commits in the window
churn_window_monthsNomonths of git history the churn weights cover

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changedv0.7.6
    • changedOutput schema / properties / active / items / properties / remedy / description
      Previous value: -"decompose, add-tests or ok; only decompose and add-tests rows with a lane reach get_next_item"New value: +"decompose, split-lines, add-tests or ok; every row but ok reaches get_next_item when a lane measures it"
    • changedOutput schema / properties / active / items / properties / remedy / enum
      Previous value: -[
      -  "decompose",
      -  "add-tests",
      -  "ok"
      -]New value: +[
      +  "decompose",
      +  "split-lines",
      +  "add-tests",
      +  "ok"
      +]
    • changedOutput schema / properties / dormant_top / items / properties / remedy / description
      Previous value: -"decompose, add-tests or ok; only decompose and add-tests rows with a lane reach get_next_item"New value: +"decompose, split-lines, add-tests or ok; every row but ok reaches get_next_item when a lane measures it"
    • changedOutput schema / properties / dormant_top / items / properties / remedy / enum
      Previous value: -[
      -  "decompose",
      -  "add-tests",
      -  "ok"
      -]New value: +[
      +  "decompose",
      +  "split-lines",
      +  "add-tests",
      +  "ok"
      +]
  2. Addedv0.6.0

TDQS

A5/5.0
Behavior5/5

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

Annotations already cover read-only, idempotent, and non-destructive hints. The description adds crucial behavioral context: 'reads the churn cache, not git', 'keeps finished rows so it never empties', and the precedence rule 'scope narrows before top caps'. These details go beyond annotations and are essential for correct expectations.

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?

Two sentences with no waste. The purpose is front-loaded, followed by usage, then behavioral and parameter notes. Every clause earns its place; the structure is logical and scannable.

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?

The tool has an output schema (so return format is covered), all parameters are optional with defaults explained, and the description covers usage, behavior, and parameter semantics comprehensively. An agent has everything needed to invoke it correctly without further inference.

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?

Despite 100% schema coverage, the description adds meaningful value: it explains precedence ('scope narrows before top caps'), gives a concrete example ('scope ["core"] with top 20 returns the 20 riskiest in core'), and clarifies repo constraints ('any directory under the measured checkout'). These enrich the schema definitions.

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 opens with a specific verb and resource: 'Lists the newest trusted run's whole risk ranking' and defines the ordering criterion ('ccn times recency-weighted churn'). It clearly distinguishes from siblings like get_next_item (single item) and get_trend (trend analysis).

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 states usage intent: 'Use it to survey a repo or split work by file' and directs to the sibling get_next_item for the single worst item. It also clarifies what the tool does not do ('runs no tests') and that it 'keeps finished rows so it never empties', aiding when-to-use decisions.

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