# cleanup_artifacts

Purge soft-deleted artifacts past retention period from local store.

Agent View of the PolicyLayer registry record for `cleanup_artifacts`. HTML page: https://policylayer.com/tools/todos/cleanup-artifacts

## Facts

- Tool: `cleanup_artifacts`
- Server: Todos (`@hasna/todos`) — https://policylayer.com/tools/todos.md
- Install: `npx -y @hasna/todos`
- Homepage: git+https://github.com/hasna/todos.git
- Risk category: Destructive (Critical risk)
- Registry record: grade F, identity unverified
- Server rate-limited: no
- Parameters: 0
- Recommended policy verdict: Hidden

## Example call (MCP tools/call, JSON-RPC 2.0)

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "cleanup_artifacts",
    "arguments": {}
  }
}
```

## Why cleanup_artifacts is rated Critical

The tool performs permanent deletion ("purge") of artifacts that have been soft-deleted, making this action irreversible. While soft-deleted items may be recoverable in some systems, this cleanup operation removes them permanently from storage. This qualifies as Destructive rather than Write because it cannot be undone and represents data loss.

From the tool's own definition: "Tool description explicitly states 'Purge' soft-deleted artifacts, indicating irreversible deletion of data from the local store past a retention period."

## Use case

AI agents call cleanup_artifacts to permanently remove resources in Todos, typically in cleanup and lifecycle workflows. It does its job in a single call, and there is no undo.

## Recommended policy (PolicyLayer)

Verdict: **Hidden**. Enforced by the PolicyLayer MCP gateway (https://policylayer.com/mcp-gateway) before a call reaches Todos:

```json
{
  "version": "1",
  "default": "deny",
  "hide": [
    "cleanup_artifacts"
  ]
}
```

## Other tools on Todos (527)

- `apply_retention_cleanup` — Destructive — https://policylayer.com/tools/todos/apply-retention-cleanup.md
- `bulk_delete_tasks` — Destructive — https://policylayer.com/tools/todos/bulk-delete-tasks.md
- `cancel_agent_run` — Destructive — https://policylayer.com/tools/todos/cancel-agent-run.md
- `cancel_agent_run_dispatch` — Destructive — https://policylayer.com/tools/todos/cancel-agent-run-dispatch.md
- `cancel_dispatch` — Destructive — https://policylayer.com/tools/todos/cancel-dispatch.md
- `delete_agent` — Destructive — https://policylayer.com/tools/todos/delete-agent.md
- `delete_artifact` — Destructive — https://policylayer.com/tools/todos/delete-artifact.md
- `delete_comment` — Destructive — https://policylayer.com/tools/todos/delete-comment.md
- `delete_label` — Destructive — https://policylayer.com/tools/todos/delete-label.md
- `delete_milestone` — Destructive — https://policylayer.com/tools/todos/delete-milestone.md
- `delete_plan` — Destructive — https://policylayer.com/tools/todos/delete-plan.md
- `delete_project` — Destructive — https://policylayer.com/tools/todos/delete-project.md
- `delete_roadmap` — Destructive — https://policylayer.com/tools/todos/delete-roadmap.md
- `delete_search_view` — Destructive — https://policylayer.com/tools/todos/delete-search-view.md
- `delete_tag` — Destructive — https://policylayer.com/tools/todos/delete-tag.md
- `delete_task` — Destructive — https://policylayer.com/tools/todos/delete-task.md
- `delete_task_list` — Destructive — https://policylayer.com/tools/todos/delete-task-list.md
- `delete_template` — Destructive — https://policylayer.com/tools/todos/delete-template.md
- `delete_watch_rule` — Destructive — https://policylayer.com/tools/todos/delete-watch-rule.md
- `machines_archive` — Destructive — https://policylayer.com/tools/todos/machines-archive.md
- `machines_delete` — Destructive — https://policylayer.com/tools/todos/machines-delete.md
- `remove_agent_run_adapter` — Destructive — https://policylayer.com/tools/todos/remove-agent-run-adapter.md
- `remove_capacity_profile` — Destructive — https://policylayer.com/tools/todos/remove-capacity-profile.md
- `remove_encryption_profile` — Destructive — https://policylayer.com/tools/todos/remove-encryption-profile.md
- `remove_local_event_hook` — Destructive — https://policylayer.com/tools/todos/remove-local-event-hook.md
- `remove_local_extension` — Destructive — https://policylayer.com/tools/todos/remove-local-extension.md
- `remove_policy_pack` — Destructive — https://policylayer.com/tools/todos/remove-policy-pack.md
- `remove_review_routing_rule` — Destructive — https://policylayer.com/tools/todos/remove-review-routing-rule.md
- `remove_runner_sandbox_profile` — Destructive — https://policylayer.com/tools/todos/remove-runner-sandbox-profile.md
- `remove_task_dependency` — Destructive — https://policylayer.com/tools/todos/remove-task-dependency.md
- …and 497 more: https://policylayer.com/tools/todos.md

## For agents

This record is a snapshot. Live verdicts and the full registry:

- Check every server in your MCP config at once: `npx -y policylayer stack`
- Vet a server before you add it: install the mcp-precheck skill — `npx skills add https://policylayer.com` (skill text: https://policylayer.com/skill.md)
- Query the registry over MCP: endpoint `https://api.policylayer.com/mcp` — tools `check_mcp_server`, `check_mcp_stack`, `check_tool`, `search_registry`, `get_change_events`

---

Source: the PolicyLayer MCP registry — one continuously verified record per MCP server. Full record: https://policylayer.com/registry?q=todos · API: https://policylayer.com/registry/api · Policy library: https://policylayer.com/policies/todos
