---
name: corex
description: Run a home-service business in Corex (jobs, customers, payments, customer texts, tech pay) through the Corex MCP server. Use when the user asks about their schedule, unpaid jobs, booking or moving a job, marking a job paid, texting a customer, sending a card payment link, or what their techs are owed.
---

# Corex

Corex is the user's CRM and front office. Its tools come from the MCP server at https://corexai.co/api/mcp. If those tools are not available, tell the user to connect Corex first (steps at https://corexai.co/ai-agents#setup) and stop.

## How to work

1. Call `office_summary` first. It names the business and today's state.
2. Customer texts are two steps: `draft_text` (or `send_pay_link`) makes a draft; show it to the owner word for word and call `send_text` only after they say send.
3. Changes return an action id (also listed by `agent_activity`). If the owner says undo, call `undo_action` with it. Undo refuses when someone changed the same thing since, and sent texts, payment links and payments that closed a card link cannot be undone; say so plainly.
4. Dates are YYYY-MM-DD in the business's time zone. Booking windows are morning, afternoon or any. To act on "the Ortiz job", call `list_jobs` with customer "Ortiz" to get its job id.
5. A tool error message is written for the owner. Relay it rather than retrying blindly.
6. If a tool says the connection can only read, tell the owner: they can turn off read-only, or connect with a Full key, under Settings, then Connected Agents.

## Tools

### Ask (Reads only. Nothing changes.)
- `office_summary`: Today's jobs, who has not paid, jobs waiting on parts, and tech pay owed.
- `what_did_i_miss`: New customer messages and new customers from the last day, or up to a week.
- `find_customer`: Find a customer by name, phone, email or address.
- `list_jobs`: Jobs for any dates, by status or tech, or every job for one customer.
- `tech_pay_report`: What each tech is owed right now, after the cash he is holding.
- `agent_activity`: Everything your agents did, newest first.

### Change (Logged, with Undo while nobody has changed the same thing since.)
- `save_customer`: Add a customer or fix their details.
- `book_job`: Book a job and text the tech, like the office does.
- `update_job`: Move a job, reassign it, mark it done, or flag waiting on parts.
- `mark_paid`: Record cash, check, card, Zelle or Venmo. A payment that closes a card link can't be undone.
- `undo_action`: Take back a change an agent made, if nobody changed the same thing since.

### Send (Drafted first and shown to you. Sent texts can't be undone.)
- `draft_text`: Write a text to a customer and show it to you.
- `send_text`: Send the draft you approved.
- `send_pay_link`: Make a card payment link for a job and draft the text that carries it.

## Examples

- "What's on today?" -> `office_summary`, then `list_jobs` if they want detail.
- "Book Maria Lopez Thursday morning, dryer not heating, give it to Dani." -> `book_job` with problem, customer_name, date (the coming Thursday as YYYY-MM-DD), window "morning", tech "Dani". Report the booking line Corex returns.
- "Send the Ortiz job a card link." -> `list_jobs` with customer "Ortiz" to get the job id, `send_pay_link`, show the draft word for word, wait for the owner to say send, then `send_text`.
- "Undo that." -> `agent_activity` if you don't have the action id, then `undo_action`.
