Remove expired sessions and their associated data from the database.
AI agents call cleanup_expired_sessions to permanently remove resources in Codeviewer — typically in cleanup and lifecycle workflows. It does its job in a single call, and there is no undo.
This tool deletes data from persistent storage without a recovery mechanism. Although the sessions are described as 'expired' (suggesting automation eligibility), an AI agent could be manipulated to call this tool prematurely, corrupt session state, or clear audit trails. The irreversible nature and data loss potential make this Destructive rather than Write.
From the tool's definition The tool performs 'Remove expired sessions and their associated data from the database' — a permanent deletion operation that cannot be undone. The use of 'Remove' combined with 'associated data' and 'database' indicates irreversible data destruction.
Attacks that exploit this kind of access
Remove expired sessions and their associated data from the database. It is categorised as a Destructive tool in the Codeviewer MCP Server, which means it can permanently delete or destroy data. Block by default and require explicit approval.
Register the Codeviewer MCP server in PolicyLayer and add a rule for cleanup_expired_sessions: allow, deny, rate-limit, or require approval. Point your MCP client at the PolicyLayer proxy URL and the rule is enforced on every call, before it reaches Codeviewer. Nothing to install.
cleanup_expired_sessions is a Destructive tool with critical risk. Critical-risk tools should be blocked by default and only enabled with explicit human approval.
Yes. Add a rate_limit block to the cleanup_expired_sessions rule in your PolicyLayer policy. For example, setting max: 10 and window: 60 limits the tool to 10 calls per minute. Rate limits are tracked per agent session and reset automatically.
Set action: deny in the PolicyLayer policy for cleanup_expired_sessions. The AI agent will receive a policy violation error and cannot call the tool. You can also include a reason field to explain why the tool is blocked.
cleanup_expired_sessions is provided by the Codeviewer MCP server (master0ffate/codeviewer-mcp). PolicyLayer sits as a proxy in front of this server to enforce policies before tool calls reach the server.
cleanup_expired_sessions is one line of Codeviewer's registry record.
The record carries the whole server: verified identity, auth posture, risk grade, every tool classified, recommended policy — re-checked continuously.
Teams ship this data inside their own products. See what a licence covers →