Skip to main content
Glama

archive_pending_programmes

Archive terminal programmes left in the live DB before automatic archiving existed. Run with dry_run=true to preview pending records, then pass false to migrate them.

Instructions

Archive terminal programmes that are still in the live DB.

This is a migration tool for programmes that were closed (completed or abandoned) before the automatic archiver was implemented. It scans the live DB for terminal programmes not yet archived and archives them.

dry_run=true reports the scan result ({would_archive, would_mark_archived, skipped}) without writing anything.

Under normal operation, this is a no-op — close_programme already archives automatically. This tool only catches programmes that slipped through (e.g. abandoned before Phase 3 was deployed).

Returns: {archived: [...], errors: [...], skipped: int}

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
dry_runYesWhen true, report what would be archived without mutating. Required — pass false to apply.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
errorsNo
dry_runNo
skippedNo
archivedNo
would_archiveNo
marked_archivedNo
would_mark_archivedNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.28

TDQS

A4.6/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 does most of it: it discloses the mutation ('archives them'), the dry_run behavior ('reports the scan result without writing anything'), the no-op/idempotent nature, and the return shape. It does not mention required permissions, rate limits, or whether re-running is safe beyond the no-op claim, so it falls just short of a 5.

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-loaded with the core purpose, then scope, then dry_run semantics, then the no-op caveat, then the return shape. Every sentence earns its place, though the trailing 'Returns:' line partially duplicates the existing output schema.

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?

For a single-parameter migration tool with an output schema provided, the description covers purpose, when-not-to-use, dry_run semantics, idempotency, and return shape. Nothing an agent needs to invoke it correctly is missing.

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

Parameters4/5

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

Schema coverage is 100% and there is only one parameter, so the baseline would be 3. The description adds genuine value beyond the schema by naming the exact dry_run payload fields ({would_archive, would_mark_archived, skipped}), which tells the agent what to expect before committing to a write.

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 ('archive terminal programmes'), and crisply distinguishes itself from the sibling close_programme by framing itself as a one-off migration catch-up tool. An agent can tell it apart from close_programme, list_archives, and get_archived_programme 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 Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly states when this tool is and is not needed: 'Under normal operation, this is a no-op — close_programme already archives automatically. This tool only catches programmes that slipped through.' It names the alternative and the exact condition selecting this tool, so the agent knows to prefer close_programme in the normal path.

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