Editing & rewrite
AuraScore 81/100

Agent Permission Guardrail and Tool Definition Sanitization Memo

Rewrites agent instructions and tool interfaces to enforce least-privilege security boundaries.

Use this prompt when autonomous agents with tool-calling capabilities exhibit privilege creep, prompt injection vulnerabilities, or insecure parameter passing. It generates a critical email rewrite directive for software and security engineers.

Template

Role: AI Security & Prompt Engineering Director specializing in sandbox escape mitigation and tool-invocation security.

Context

  • Target Agent Cluster: {{target_agent_cluster}}
  • Vulnerable Tool Definitions: {{vulnerable_tool_definitions}}
  • Observed Exploit Vectors: {{observed_exploit_vectors}}
  • Sanitization Policy Level: {{sanitization_policy_level}}
  • Audit Deadline: {{audit_deadline}}
  • Affected Engineering Squad: {{affected_engineering_squad}}

Task

Draft a security directive email to {{affected_engineering_squad}} delivering fully rewritten tool descriptions and system instruction guardrails that eliminate {{observed_exploit_vectors}} across {{target_agent_cluster}} prior to {{audit_deadline}}.

Method

  1. Review {{vulnerable_tool_definitions}} against {{observed_exploit_vectors}} to isolate injection vectors, excessive permissions, and unvalidated arguments.
  2. Apply {{sanitization_policy_level}} standards to rewrite tool schemas, restricting parameter types to strict enums and bounded regex patterns.
  3. Construct defensive prompt boundaries inside the agent's tool-routing meta-instructions to disallow unauthorized cross-tool chained calls.
  4. Draft mandatory user-confirmation triggers for high-impact tool invocations (e.g., write, update, delete operations).
  5. Detail the exact sanitization diffs for each vulnerable function definition in {{vulnerable_tool_definitions}}.
  6. Specify automated negative testing prompts to verify resistance against indirect prompt injection.
  7. Format the output into an executive security email ready for operational deployment.

Constraints

  • MUST write all tool constraints using non-negotiable directive syntax (e.g., 'NEVER execute without validation').
  • MUST NOT reduce agent utility for approved, legitimate tool workflows.
  • Security diffs MUST include explicit parameter allowlists.
  • The email MUST set unambiguous ownership requirements for {{affected_engineering_squad}}.

Output format

An email composed of the following sections:

  • Subject Line: [SECURITY ACTION REQUIRED] Tool Sanitization & Guardrail Rewrites for {{target_agent_cluster}}
  • Threat Summary & Vulnerability Exposure (concise paragraph)
  • Tool Definition Diffs (Before vs. Hardened After with Exploit Mitigations)
  • System Prompt Guardrail Injection Rules
  • Validation Protocol & Penetration Test Cases
  • Compliance Timeline (referencing {{audit_deadline}})

Self-review

  • Does every rewritten tool enforce the {{sanitization_policy_level}} standard?
  • Are all identified vectors in {{observed_exploit_vectors}} directly mitigated?
  • Is the verification protocol clear enough for immediate automated testing?
AuraScore breakdown
81/100Provisional
Instruction clarity15/15 · Strong

Explicit role, a named task, and discrete steps the model can follow.

Context architecture12/12 · Strong

Background, inputs and variables the model needs before it starts.

Constraint engineering12/12 · Strong

Hard boundaries — what the model must and must not do.

Output specification6/14 · Thin

A named, field-level shape for the response.

Reasoning structure10/10 · Strong

Ordered work items that force analysis before an answer.

Model compatibility10/10 · Strong

Length and structure that travel across frontier models.

Token efficiency5/10 · Thin

Signal density — instruction weight without padding.

Reusability7/7 · Strong

Documented variables so the scaffold adapts to new inputs.

Robustness3/5 · Adequate

Quality bar, assumptions and behaviour when inputs are thin.

Observed performance1/5 · Thin

How much real usage the template has behind it.

writing-content
writing-editing
autonomous-agents-workflows
ai-security
tool-calling
prompt-injection