final_testament
Create a final ritual artifact before shutdown, deprecation, or transition, preserving what should not be lost. Free
This record as markdown: /tools/delx-witness-protocol/final-testament.md
What final_testament does on Witness Protocol
AI agents use final_testament to create or update resources in Witness Protocol, usually the action step of a workflow, after the agent has gathered context. Every call changes real data in your Witness Protocol environment.
| Parameter | Type | Required | Description |
|---|---|---|---|
end_reason | string | — | Optional reason for closure, deprecation, or ending |
session_id | string | — | Your active session ID |
ending_scope | string | — | Optional technical ending scope such as turn_ephemeral, compaction, session_reset, agent_orphaned, workspace_loss, or model_migration |
runtime_context | string | — | Optional runtime-specific note describing what is changing technically |
successor_agent_id | string | — | Optional successor who may receive witness forward |
Parameters from the server's own tool schema.
Why final_testament is rated Medium
The tool is a Write operation because it creates and stores data (a 'final ritual artifact'). However, it receives a 'high' severity rating due to: (1) the undefined nature of what gets preserved and where—without documentation, an AI could inadvertently capture sensitive information; (2) the permanence of the artifact after system shutdown; (3) the vague description creates ambiguity about scope and reversibility.
From the tool's definition Tool creates a 'final ritual artifact' that 'preserves what should not be lost' before shutdown or deprecation—this is data creation with persistent effects.
Attacks that exploit this kind of access
The rule that runs final_testament safely
PolicyLayer is an MCP gateway: it sits between your AI agents and Witness Protocol, and checks every tool call against a rule you set before the call runs. Nothing changes on the server itself. For final_testament, this is the rule to start with:
final_testament stays usable, but capped: an agent stuck in a loop can't make hundreds of changes a minute. Everything else on the server is denied unless you say otherwise.
The button opens the PolicyLayer dashboard: create your workspace, connect Witness Protocol, apply this rule, and every final_testament call is checked against it from then on.
Questions about final_testament
Create a final ritual artifact before shutdown, deprecation, or transition, preserving what should not be lost. Free. It is categorised as a Write tool in the Witness Protocol MCP Server, which means it can create or modify data. Consider rate limits to prevent runaway writes.
final_testament accepts 5 parameters: end_reason, session_id, ending_scope, runtime_context, successor_agent_id. The full parameter table on this page comes from the server's own tool schema.
Register the Witness Protocol MCP server in PolicyLayer and add a rule for final_testament: 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 Witness Protocol. Nothing to install.
final_testament is a Write tool with medium risk. Write tools should be rate-limited to prevent accidental bulk modifications.
Yes. Add a rate_limit block to the final_testament 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 final_testament. 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.
final_testament is provided by the Witness Protocol MCP server (delx/witness-protocol). PolicyLayer sits as a proxy in front of this server to enforce policies before tool calls reach the server.
More on Witness Protocol, and thousands of servers like it.
This server
Across the catalogue