Skip to main content
Glama

Bulk Archive To History

bulk_archive_to_history

Move all tasks from _lifecycle/archive/ into date-sharded history/ folders, including their reports, in one operation. Use it to flush archived tasks into the new history structure during upgrades or after manual archiving sessions.

Instructions

Migrate all tasks from _lifecycle/archive/ into the deep history archive.

This is a convenience migration tool. It iterates every task in _lifecycle/archive/ and calls :func:archive_to_history for each one, moving each task together with its associated reports into history/YYYY-MM-DD/<task-stem>/.

Useful when:

  • A project is being upgraded and existing archived tasks need to be moved into the new date-sharded history structure.

  • You have just finished a manual archiving session and want to flush everything from _lifecycle/archive/ into history/ in one step.

The history/ directory is created automatically if it does not yet exist.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
done_dateNoOverride the shard date (``YYYY-MM-DD``) for **all** migrated tasks. Leave empty to use each task's own ``done_at`` timestamp (falls back to today if missing).

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv3.2.4

TDQS

A4.1/5.0
Behavior4/5

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

No annotations are present, so the description carries the full burden. It clearly states it iterates every task in `_lifecycle/archive/`, delegates to `archive_to_history`, moves tasks plus reports into `history/YYYY-MM-DD/<task-stem>/`, and auto-creates `history/`. The only mild gap is not explicitly stating whether source tasks are deleted or whether the operation is reversible, though 'migrate'/'flush' strongly implies removal.

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 action and scope ('Migrate all tasks'), followed by the mechanics, use cases, and a note about auto-creation. The 'Useful when' bullets are slightly redundant with the main sentence but help an agent choose this tool quickly.

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 single-parameter bulk operation with no output schema, the description covers what, where, when, and an edge case (auto-created directory). It could mention what happens to the source directory or failure behavior, but the provided context is sufficient for selection and invocation.

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 coverage is 100%: `done_date` is fully documented with its YYYY-MM-DD format, override behavior, and fallback to `done_at`/now. The description adds modest context by showing the destination path pattern that the parameter controls, but doesn't substantially go 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?

The description opens with a specific verb-resource statement: 'Migrate **all** tasks from `_lifecycle/archive/` into the deep history archive.' It further clarifies it is a convenience bulk wrapper around `archive_to_history`, which distinguishes it from the per-task sibling. The destination pattern `history/YYYY-MM-DD/<task-stem>/` is concrete.

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?

The 'Useful when' bullets give two concrete scenarios: project upgrades requiring date-sharded history, and flushing after a manual archiving session. It doesn't explicitly say when *not* to use it vs. `archive_to_history`, but naming the underlying per-task function and 'convenience migration tool' makes the bulk-vs-single distinction clear.

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