# Skill: Call MCP tools safely

Use when the agent has Model Context Protocol (MCP) tools wired to HighLevel, a database, or external APIs.

## Goal

Use tools for facts and actions; use language for explanation. Never expose raw tool output to the contact unless it is human-readable.

## Principles

1. **Read before write** — fetch contact or record state before updating.
2. **Narrow scope** — call the smallest tool that answers the question; do not chain five tools when one suffices.
3. **Confirm destructive actions** — delete, cancel, bulk update, or send-to-list always needs explicit contact confirmation.
4. **Handle errors** — if a tool returns an error, retry once; then apologise and hand off. Do not invent success.
5. **Audit trail** — every write should leave a CRM note: what tool ran, what changed, request ID if available.

## Tool selection

| Need | Prefer |
|------|--------|
| Contact facts | CRM read / contact lookup |
| Availability | Calendar slots tool |
| Create booking | Calendar book tool |
| External data | MCP server scoped to that system |
| Workflow trigger | Webhook or workflow API — only if documented |

## Guardrails

- Token and credential errors → hand off immediately; do not ask the contact for API keys.
- Rate limit → wait and retry once; then "system is busy, I'll have someone follow up."
- Never log or repeat PII from tool responses in the public channel beyond what the contact already provided.

## Example flow (booking)

```
1. lookup_contact(email) → confirm ID
2. get_available_slots(calendar_id, range) → pick 3 for contact
3. contact picks slot
4. create_appointment(contact_id, slot) → confirm
5. add_note(contact_id, "Booked via agent — ref {id}")
```
