# cleanup_resources

Brief description: Deletes files generated in OUTPUT_PATH (or default temporary directory) and performs basic resource cleanup. Call only when the user explicitly indicates deletion of temporary or output files.

Agent View of the PolicyLayer registry record for `cleanup_resources`. HTML page: https://policylayer.com/tools/111-test-111-math-mcp-server/cleanup-resources

## Facts

- Tool: `cleanup_resources`
- Server: Math MCP Server (`111-test-111/math-mcp-server`) — https://policylayer.com/tools/111-test-111-math-mcp-server.md
- Homepage: https://github.com/111-test-111/math-mcp-server
- Risk category: Destructive (Critical risk)
- Registry record: grade C, 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_resources",
    "arguments": {}
  }
}
```

## Why cleanup_resources is rated Critical

The tool explicitly deletes files, which is an irreversible destructive action. It targets output files and temporary directories, potentially wiping multiple generated artifacts. The high severity reflects the blast radius — misuse could delete all output files from a session. Confidence is high because the description clearly states 'Deletes files'.

From the tool's own definition: "'Deletes files generated in OUTPUT_PATH (or default temporary directory) and performs basic resource cleanup'"

## Use case

AI agents call cleanup_resources to permanently remove resources in Math MCP Server, 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 Math MCP Server:

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

## Other tools on Math MCP Server (21)

- `basic_arithmetic` — Execute — https://policylayer.com/tools/111-test-111-math-mcp-server/basic-arithmetic.md
- `calculus_engine` — Execute — https://policylayer.com/tools/111-test-111-math-mcp-server/calculus-engine.md
- `expression_evaluator` — Execute — https://policylayer.com/tools/111-test-111-math-mcp-server/expression-evaluator.md
- `matrix_calculator` — Execute — https://policylayer.com/tools/111-test-111-math-mcp-server/matrix-calculator.md
- `number_theory_calculator` — Execute — https://policylayer.com/tools/111-test-111-math-mcp-server/number-theory-calculator.md
- `optimization_suite` — Execute — https://policylayer.com/tools/111-test-111-math-mcp-server/optimization-suite.md
- `regression_modeler` — Execute — https://policylayer.com/tools/111-test-111-math-mcp-server/regression-modeler.md
- `financial_calculator` — Financial — https://policylayer.com/tools/111-test-111-math-mcp-server/financial-calculator.md
- `complex_analysis_suite` — Other — https://policylayer.com/tools/111-test-111-math-mcp-server/complex-analysis-suite.md
- `geometry_calculator` — Other — https://policylayer.com/tools/111-test-111-math-mcp-server/geometry-calculator.md
- `graph_theory_suite` — Other — https://policylayer.com/tools/111-test-111-math-mcp-server/graph-theory-suite.md
- `mathematical_functions` — Other — https://policylayer.com/tools/111-test-111-math-mcp-server/mathematical-functions.md
- `precision_calculator` — Other — https://policylayer.com/tools/111-test-111-math-mcp-server/precision-calculator.md
- `signal_processing_calculator` — Other — https://policylayer.com/tools/111-test-111-math-mcp-server/signal-processing-calculator.md
- `number_converter` — Read — https://policylayer.com/tools/111-test-111-math-mcp-server/number-converter.md
- `number_properties` — Read — https://policylayer.com/tools/111-test-111-math-mcp-server/number-properties.md
- `probability_calculator` — Read — https://policylayer.com/tools/111-test-111-math-mcp-server/probability-calculator.md
- `statistics_analyzer` — Read — https://policylayer.com/tools/111-test-111-math-mcp-server/statistics-analyzer.md
- `unit_converter` — Read — https://policylayer.com/tools/111-test-111-math-mcp-server/unit-converter.md
- `create_and_save_chart` — Write — https://policylayer.com/tools/111-test-111-math-mcp-server/create-and-save-chart.md
- `plot_function_curve` — Write — https://policylayer.com/tools/111-test-111-math-mcp-server/plot-function-curve.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=111-test-111-math-mcp-server · API: https://policylayer.com/registry/api · Policy library: https://policylayer.com/policies/111-test-111-math-mcp-server
