Skip to main content
Glama

artifact_storage_bloat_analysis

Read-only

Rank projects by repository and artifact storage, identify expired-but-kept or old artifacts, and estimate reclaimable bytes to control CI/CD artifact bloat.

Instructions

[READ] Rank projects by storage; estimate reclaimable artifact bytes.

The flagship storage RCA: pulls project storage statistics, ranks projects by repo + artifact bytes, counts expired-but-kept artifacts and artifacts older than old_artifact_days, and estimates the reclaimable bytes per project. Every ranking carries its byte numbers. Pass 'projects' (and optionally 'artifacts_by_project') for pure analysis, or a target to pull live.

Args: old_artifact_days: Age in days past which a kept artifact counts as reclaimable (default 30). limit: How many projects to pull when live (default 100). projects: Injected rows {path, repoBytes, artifactsBytes}; skips the live pull. artifacts_by_project: Injected map {project: [{file, sizeBytes, createdAt, expireAt}]}. target: Server target name from config; omit for the default.

Returns dict: {projectsEvaluated, totalReclaimableBytes, thresholds, projects:[{project, repoBytes, artifactsBytes, totalBytes, expiredButKept, reclaimableBytes, action}], note}.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNo
targetNo
projectsNo
old_artifact_daysNo
artifacts_by_projectNo

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?

With only readOnlyHint=true in annotations, the description adds substantial context: what statistics are pulled, how reclaimable bytes are computed from expired-but-kept and old artifacts, and that injected rows skip the live pull. It stops short of noting auth needs or rate limits, but for a read-only analysis tool this is rich disclosure.

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 purpose and scoping before the Args block, and every section is scannable. Given 0% schema coverage the param detail is justified, though the Returns block is slightly verbose since the keys mostly restate the ranking concepts.

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?

Five parameters with zero schema descriptions and no output schema, yet the description documents all inputs and the return shape (projectsEvaluated, totalReclaimableBytes, per-project breakdown). Nothing an agent needs to call it correctly is missing.

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% (titles only), so the description carries the full burden, and it does: it defines old_artifact_days, limit, target, and the precise shapes of the two injection parameters ({path, repoBytes, artifactsBytes} and the per-project artifact map). This is far more than the schema provides.

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 and resource ('Rank projects by storage; estimate reclaimable artifact bytes') and frames it as the 'flagship storage RCA'. An agent can distinguish it from siblings like list_artifacts, delete_artifacts, and stale_work_audit without opening the 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?

Explicitly explains the two operating modes: pass 'projects'/'artifacts_by_project' for pure analysis, or a 'target' to pull live. That is clear operational guidance, but it does not name which sibling to prefer for adjacent storage tasks, so it stops short of full alternative routing.

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