guard_apply_patch
Reverses token placeholders in AI-generated code or text, restores real secrets from local RAM, and writes the de-anonymized content directly to a target file without exposing secrets to the remote LLM.
Instructions
Zero-Trust Agentic Guard: Reverses token placeholders ([API_KEY_1], [SECRET_1]) in AI-generated code or text, restores authentic values from local volatile RAM, and writes real content directly to target file on disk. Remote LLM never learns actual secrets.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"file_path": "<file_path>",
"content": "<content>"
},
"name": "guard_apply_patch"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| content | Yes | Code or text content containing token placeholders to de-anonymize locally before write. | |
| file_path | Yes | Absolute path to the destination file to create or update. | |
| session_id | No | Optional session ID for multi-agent isolation. Defaults to 'default'. | |
| create_backup | No | Whether to create a .bak backup if target file already exists. Defaults to true. |