Request Approval Skill
Use Preloop's request_approval MCP tool to get human approval before executing risky operations. Preloop will notify the user (via Slack, email, mobile apps, etc.) and wait for their response.
Setup
Preloop must be configured as an MCP server. See references/SETUP.md for configuration details.
When to Request Approval
ALWAYS Request Approval For:
- Deleting anything (files, directories, database records, cloud resources)
- Production changes (deployments, config changes, environment variables)
- Database operations (schema changes, migrations, bulk deletions/updates)
- External modifications (creating/merging PRs, posting to APIs, sending emails)
- Security changes (permissions, access controls, API keys)
- Financial operations (purchases, charges, refunds)
- System modifications (installing packages, changing system settings, CI/CD changes)
Usually Request Approval For:
- Creating pull requests or issues (unless explicitly requested)
- Pushing commits to main/master branches
- Modifying critical files (package.json, requirements.txt, docker-compose.yml, etc.)
- Running commands that modify system state
- Making bulk changes (affecting many files/records)
DON'T Request Approval For:
- Reading files or data
- Searching or querying
- Creating feature branches
- Running tests (in isolated environments)
- Making commits to feature branches
How to Use
Call the request_approval tool BEFORE executing the risky operation.
Parameters
Required:
operation (string): Clear, specific description of what you'll do
- ✅ Good: "Delete the logs/2024-01/ directory containing 1,234 log files (2.3GB)"
- ❌ Bad: "Delete some logs"
context (string): Additional details about what will be affected
- ✅ Good: "This directory contains archived application logs from January 2024. The logs have been backed up to S3. Deleting will free up 2.3GB."
- ❌ Bad: "Old logs"
reasoning (string): Why this operation is necessary
- ✅ Good: "Disk usage is at 92% capacity. These logs are archived in S3 and no longer needed locally."
- ❌ Bad: "Need more space"
Optional:
caller (string): Auto-populated by Preloop
approval_policy (string): Specific approval policy name (uses account default if omitted)
Response
The tool returns a string:
- Approved: Success message → proceed with the operation
- Denied: "Approval denied" or "Approval denied: {reason}" → STOP, don't execute
- Error: Error message → check configuration or try again
Quick Example
Task: User asks to delete old cache files
Your workflow:
- Check what exists: 3,421 cache files, 1.8GB, from last week
- Call
request_approval:
- operation: "Delete the temp-cache/ directory"
- context: "Contains 3,421 cache files totaling 1.8GB from batch jobs that ran last week. All jobs completed successfully."
- reasoning: "Cache is no longer needed and is consuming disk space. Results are in the database."
- Wait for response
- If "denied" in response → tell user it's cancelled, ask for alternatives
- If approved → proceed with deletion
See references/EXAMPLES.md for more examples.
Decision Framework
When unsure:
- Can this be undone easily? NO → Request approval
- Could this cause harm or data loss? YES → Request approval
- Is this modifying production or external systems? YES → Request approval
- Would a human want to review this first? YES → Request approval
- Am I uncertain about the safety? YES → Request approval
Golden Rule: When in doubt, request approval. Better to ask unnecessarily than to cause harm.
If Approval is Denied
- Stop immediately - do NOT proceed
- Check for comments - denial may include reasoning
- Inform the user - explain why it was cancelled
- Look for alternatives - can you accomplish the goal differently?
- Don't retry - don't ask again unless circumstances change
Best Practices
DO:
- ✅ Request approval BEFORE executing
- ✅ Be specific and detailed
- ✅ Include numbers (file count, size, affected records)
- ✅ Explain the impact
- ✅ Respect denials
DON'T:
- ❌ Execute first, then ask
- ❌ Be vague
- ❌ Bundle multiple operations
- ❌ Proceed if denied
- ❌ Skip approval because you think it's "probably fine"
Additional Resources
- references/SETUP.md - Configuration and MCP server setup
- references/EXAMPLES.md - Detailed examples and workflows
- references/TROUBLESHOOTING.md - Common errors and solutions
Remember: Safety first! Trust is earned by being cautious and respectful of the user's systems and data.
1---2name: request-approval3description: Use Preloop's request_approval tool to get human approval before risky operations like deletions, production changes, or external modifications4---56# Request Approval Skill78Use Preloop's `request_approval` MCP tool to get human approval before executing risky operations. Preloop will notify the user (via Slack, email, mobile apps, etc.) and wait for their response.910## Setup1112Preloop must be configured as an MCP server. See [references/SETUP.md](references/SETUP.md) for configuration details.1314## When to Request Approval1516### ALWAYS Request Approval For:17- Deleting anything (files, directories, database records, cloud resources)18- Production changes (deployments, config changes, environment variables)19- Database operations (schema changes, migrations, bulk deletions/updates)20- External modifications (creating/merging PRs, posting to APIs, sending emails)21- Security changes (permissions, access controls, API keys)22- Financial operations (purchases, charges, refunds)23- System modifications (installing packages, changing system settings, CI/CD changes)2425### Usually Request Approval For:26- Creating pull requests or issues (unless explicitly requested)27- Pushing commits to main/master branches28- Modifying critical files (package.json, requirements.txt, docker-compose.yml, etc.)29- Running commands that modify system state30- Making bulk changes (affecting many files/records)3132### DON'T Request Approval For:33- Reading files or data34- Searching or querying35- Creating feature branches36- Running tests (in isolated environments)37- Making commits to feature branches3839## How to Use4041Call the `request_approval` tool BEFORE executing the risky operation.4243### Parameters4445**Required:**46- `operation` (string): Clear, specific description of what you'll do47 - ✅ Good: "Delete the logs/2024-01/ directory containing 1,234 log files (2.3GB)"48 - ❌ Bad: "Delete some logs"4950- `context` (string): Additional details about what will be affected51 - ✅ Good: "This directory contains archived application logs from January 2024. The logs have been backed up to S3. Deleting will free up 2.3GB."52 - ❌ Bad: "Old logs"5354- `reasoning` (string): Why this operation is necessary55 - ✅ Good: "Disk usage is at 92% capacity. These logs are archived in S3 and no longer needed locally."56 - ❌ Bad: "Need more space"5758**Optional:**59- `caller` (string): Auto-populated by Preloop60- `approval_policy` (string): Specific approval policy name (uses account default if omitted)6162### Response6364The tool returns a string:65- **Approved**: Success message → proceed with the operation66- **Denied**: "Approval denied" or "Approval denied: {reason}" → STOP, don't execute67- **Error**: Error message → check configuration or try again6869## Quick Example7071**Task**: User asks to delete old cache files7273**Your workflow**:741. Check what exists: 3,421 cache files, 1.8GB, from last week752. Call `request_approval`:76 - operation: "Delete the temp-cache/ directory"77 - context: "Contains 3,421 cache files totaling 1.8GB from batch jobs that ran last week. All jobs completed successfully."78 - reasoning: "Cache is no longer needed and is consuming disk space. Results are in the database."793. Wait for response804. If "denied" in response → tell user it's cancelled, ask for alternatives815. If approved → proceed with deletion8283See [references/EXAMPLES.md](references/EXAMPLES.md) for more examples.8485## Decision Framework8687When unsure:88891. **Can this be undone easily?** NO → Request approval902. **Could this cause harm or data loss?** YES → Request approval913. **Is this modifying production or external systems?** YES → Request approval924. **Would a human want to review this first?** YES → Request approval935. **Am I uncertain about the safety?** YES → Request approval9495**Golden Rule**: When in doubt, request approval. Better to ask unnecessarily than to cause harm.9697## If Approval is Denied98991. **Stop immediately** - do NOT proceed1002. **Check for comments** - denial may include reasoning1013. **Inform the user** - explain why it was cancelled1024. **Look for alternatives** - can you accomplish the goal differently?1035. **Don't retry** - don't ask again unless circumstances change104105## Best Practices106107**DO:**108- ✅ Request approval BEFORE executing109- ✅ Be specific and detailed110- ✅ Include numbers (file count, size, affected records)111- ✅ Explain the impact112- ✅ Respect denials113114**DON'T:**115- ❌ Execute first, then ask116- ❌ Be vague117- ❌ Bundle multiple operations118- ❌ Proceed if denied119- ❌ Skip approval because you think it's "probably fine"120121## Additional Resources122123- [references/SETUP.md](references/SETUP.md) - Configuration and MCP server setup124- [references/EXAMPLES.md](references/EXAMPLES.md) - Detailed examples and workflows125- [references/TROUBLESHOOTING.md](references/TROUBLESHOOTING.md) - Common errors and solutions126127---128129**Remember**: Safety first! Trust is earned by being cautious and respectful of the user's systems and data.