Testing Your Approval Workflow¶
Verify your Preloop setup end-to-end: call a prelooped tool from your MCP client, receive the approval request, approve it, and confirm the tool executes and everything lands in the audit trail.
These tests use the hosted demo MCP server at https://example-mcp.preloop.ai/mcp, which provides harmless sample tools like pay and get_random_number.
Time Required: 10-15 minutes
Prerequisites:
- Preloop account created (Creating Your Account)
- API key generated
- MCP client connected (Connect Your MCP Client)
- At least one tool prelooped
Test 1: Basic Approval Workflow¶
Goal¶
Verify the complete approval flow works: call tool → receive notification → approve → tool executes.
Setup¶
Step 1: Add the Example MCP Server
If you haven't already:
- Go to Tools & MCP → + Add Source → MCP Server
- Configure:
- Click Save
- Click Scan Tools
Step 2: Preloop the pay Tool
- Find
paytool in Tools & MCP list - Click Configure (gear icon)
- Toggle Require Approval to ON
- Set approvers: Add yourself
- Notification: Select "Email"
- Click Save
Execute Test¶
Step 1: Trigger Tool Call
In your MCP client (e.g., Claude Code):
Expected: the client sends the request and waits — the tool does NOT execute immediately.
Step 2: Check for Notification
Within 30 seconds:
- Email: message from
hello@preloop.ai, subject "Approval Required: pay", with the tool name, arguments, request ID, and Approve/Decline buttons - Web Dashboard: notification bell (top-right) shows a badge; click it to see the pending request
- Mobile (if configured): push notification with tool name and key arguments
Step 3: Approve Request
Approve from any one channel:
- Email: click Approve, confirmation page shows "Approval recorded successfully"
- Web Dashboard: click the notification → review → Approve (optionally add a reason)
- Mobile App: tap the notification → Approve → authenticate
Step 4: Verify Execution
In your MCP client the tool now executes and returns a result (illustrative):
In the dashboard, the request moves to "Approved" in Approvals → History.
Verify Audit Trail¶
- Go to Approvals → History
- Find your test request and click it
- Verify it shows: requester, tool (
pay), arguments, status (Approved), approver, timestamps, and the execution result
Result¶
Pass if: notification arrives within ~30 seconds, approval works, tool executes only after approval, and the audit log shows the complete record.
Fail if: no notification, tool executes immediately without approval, or no audit log entry.
Test 2: Decline Workflow¶
Goal¶
Verify declining an approval request prevents execution.
Execute Test¶
Step 1: Trigger Another Tool Call
Step 2: Decline Request
When the notification arrives, click Decline (email or dashboard) and add a reason, e.g. "Test decline".
Step 3: Verify No Execution
Your MCP client receives a decline message (illustrative):
The dashboard shows the request as "Declined" with your reason, and no execution result.
Result¶
Pass if: the tool does NOT execute, the client receives the decline message, and the audit log shows "Declined".
Fail if: the tool executes despite decline.
Test 3: Conditional Approval¶
Goal¶
Verify CEL conditions work: approval only required when the condition matches.
Setup¶
- Go to Tools & MCP → Find
paytool → Configure - In Approval Condition, enter:
- Click Save
This means: only require approval if amount > $1000.
Execute Test¶
Test A: Below Threshold
Expected: no approval request — the tool executes immediately.
Test B: Above Threshold
Expected: approval request sent, client waits, tool executes after you approve.
Result¶
Pass if: small amounts execute immediately, large amounts require approval.
Fail if: all amounts require approval (condition ignored) or none do (condition broken).
Remaining Checks¶
Once tests 1-3 pass, the core Safety Layer works. Run through these quicker checks as needed:
- Team-based approval with quorum (needs 2+ users): create a team under Settings → Teams, set it as the
payapprover with quorum 2, and trigger a call. The tool must wait for the second approval before executing, and the audit log should show both approvers. See Team-Based Approvals. - Timeout and escalation: set a short timeout (e.g. 120s) and escalation delay (e.g. 60s) on the
paypolicy, trigger a call, and don't respond. The escalation contact should be notified after the delay, and after the timeout the client should receive a timeout error with the tool NOT executed. - Multiple notification channels: enable email, web, Slack, and mobile for the
paypolicy and trigger a call. All configured channels should notify within ~30 seconds, and approving from one channel should update the others. - Non-prelooped tool: call
get_random_numberfrom the example server with Require Approval OFF. It should execute immediately with no notification, but still appear in the audit trail. - Error handling: trigger a call with invalid arguments (e.g.
pay invalid-email $-100) and approve it — the execution failure should be reported clearly. Then point the example server at an invalid URL and confirm you get a clean "server unavailable" error instead of a silent failure; restore the URL tohttps://example-mcp.preloop.ai/mcpafterwards.
Next Steps¶
Your setup is working. Next: Add your own MCP tools or create automated flows.