How org admins issue API keys and how trusted assistants call Pezley Portal for morning briefs, leads, jobs, proposals, and scheduling — without signing in as a user.
Tool arguments go in input, never in args. Top-level orgId must match the org baked into the key.
{
"action": "exec",
"orgId": "YOUR_ORG_ID",
"toolName": "list_jobs",
"input": { "view": "index", "search": "Sam Exampel" }
}
Start with the short list or a search. To find a job, call list_jobs with "view": "index" and the name, phone or job number the owner gave (search, phone, jobNumber); for a lead, call search_leads. Don't start with the full list_jobs (no view) or action: "brief" just to find an id: both read every job and are much slower. Use the brief only when you need the whole-company morning snapshot.
Before working on an estimate, call read_estimate_handoff to check staff and prior-agent context, then call estimate_snapshot. If you do not have a job id yet, find it with the short list or a search first (above), then call estimate_snapshot or read_proposal with that input.jobId. estimate_context, update_estimate, and link_recording are live. estimate_context needs a full-access key (*). Do not invent ids. If the API returns job-not-found, the message includes the identifier that was tried — look it up with list_jobs view: "index" and search, then retry with that id.
For trials, ask your organization administrator for an approved sandbox with synthetic data and the minimum required access. Keep sandbox login details and keys in your authorized secret store, never in public documentation or chat.
https://pezleyportal.com/ops-connect. OAuth client ID is pezley-chatgpt. Leave the client secret blank.https://chatgpt.com/connector_platform_oauth_redirect. Portal returns iss so ChatGPT can use this stable callback. https://chatgpt.com/connector/oauth/… is a different URI and is rejected.Hosted Claude (claude.ai, desktop, mobile) uses the same server URL https://pezleyportal.com/ops-connect and client ID pezley-claude (no client secret). Redirect URI, exact, from Anthropic’s connector docs: https://claude.ai/api/mcp/auth_callback. Claude Code’s loopback redirect (http://localhost/callback on a changing port) is not a fixed URI, so it is not accepted. Approve scopes as an admin. Revoke “Claude, connected by <name>” on the key page to kill tokens immediately. Same starter prompt. For a safe trial, use the administrator-approved sandbox.
One exec per request until PR #1240. Example tool: estimate_snapshot with "input": {} and the administrator-approved sandbox orgId for a safe trial. Same starter prompt as ChatGPT.
The quickest way to find and change things is three short steps. Get an id from a light list or a name lookup, read that one record, then change it by the same id. Each step reads only what it needs, not the whole company.
list_jobs with "view": "index" returns only id, name, status, customerName and jobNumber. For leads, use search_leads.read_job with jobId, or lead_status with leadId.edit_job, set_job_status, rename_job, assign_to_job and set_job_colors with that jobId touch only that job.{ "action": "exec", "orgId": "YOUR_ORG_ID", "toolName": "list_jobs",
"input": { "view": "index", "status": "open", "limit": 200 } }
→ { "view": "index", "jobs": [ { "id": "JOB_ID_1", "name": "1042 Example Ave",
"status": "active", "customerName": "Sam Example", "jobNumber": "1042" } ],
"count": 1, "total": 1, "nextCursor": null }
Pass what the owner said. search takes a customer or job name, phone a phone number, and jobNumber (alias customerNumber) a job or estimate number. The portal has no separate customer number, so the job or estimate number is the number to use. list_jobs (index view), read_job, search_leads and lead_status all take these.
Names are matched on the server and spelling mistakes are fine. A name heard as “Sam Exampel” still finds “Sam Example”. You get at most 5 ranked matches with a score from 0 to 1 and what matched (matchedOn: name, phone or number), never the whole list.
{ "action": "exec", "orgId": "YOUR_ORG_ID", "toolName": "list_jobs",
"input": { "view": "index", "search": "Sam Exampel" } }
→ { "jobs": [ { "id": "JOB_ID_1", "name": "1042 Example Ave", "status": "active",
"customerName": "Sam Example", "jobNumber": "1042", "score": 0.92, "matchedOn": "name" } ],
"match": { "id": "JOB_ID_1", … }, "matchConfidence": "sure",
"hint": "One clear match. Use its id for read_job or any change." }
match is set and matchConfidence says how sure: exact, sure, or likely (a close misspelling, such as “Jon Shors” for “John Shores”, with no other record near it). read_job and lead_status read it straight away and add lookup (what matched, the score and the confidence), so say which record you used. On likely, say the stored name back to the owner before you change anything.match is null, or read_job / lead_status return ambiguous-job-ref / ambiguous-lead with candidates. Ask the owner which one, then call again with its id.job-not-found / lead-not-found. Try another spelling, the phone number or the job number.Changes always need the exact id. A name lookup only finds ids. No write tool picks a job or lead from a fuzzy name, so a misspelling can never change the wrong customer.
lead_status answers “where is this lead?” with the CRM stage, when it last changed, the linked job and the proposal state (to_build, draft, sent, accepted or declined, with sent, accepted and declined times). Look up by leadId (fastest), jobId, search or phone. search_leads lists leads with id, name and stage, newest first, or ranked when you search. Both are in the Leads & pipeline group (leads-crm) and return no phone numbers, emails or consent records. Full lead records stay on get_lead (opt-in Lead intake grant).
{ "action": "exec", "orgId": "YOUR_ORG_ID", "toolName": "lead_status",
"input": { "leadId": "LEAD_ID_1" } }
→ { "leadId": "LEAD_ID_1", "name": "Sam Example", "status": "estimate_scheduled",
"stage": "Est. scheduled", "statusChangedAt": "2026-01-15T16:00:00.000Z",
"job": { "id": "JOB_ID_1", "name": "1042 Example Ave", "status": "active", "jobNumber": "1042" },
"proposal": { "state": "sent", "estimateId": "ESTIMATE_ID_1",
"sentAt": "2026-01-18T14:30:00.000Z", "acceptedAt": null, "declinedAt": null } }
Add includeFileLinks: true to read_job to get the job's work order and other documents in the same call. Each file in files has a name, contentType, sizeBytes, a workOrder flag and a downloadUrl that expires in 15 minutes (expiresAtMs). Fetch it right away; call again for a fresh link. includeFiles: true lists the files without links. Keys without the owner-finance grant see work orders only (filesShown: "work-orders"), since other files can be contracts or priced proposals. Photos stay on the photo tools. For the estimate or proposal PDF, use download_proposal_pdf with the estimateId or jobId.
A file counts as a work order only when it was stored as one, never because of its name. When you attach a work order with upload_job_file, pass kind: "work-order" (on add_job, fileKind: "work-order"). Leave it out for proposals, contracts and other files. In the app, an admin marks a file with the Work order toggle on the Photos tab. A caption that says “Work order” does not count.
{ "action": "exec", "orgId": "YOUR_ORG_ID", "toolName": "read_job",
"input": { "jobId": "JOB_ID_1", "includeFileLinks": true } }
→ { "job": { "id": "JOB_ID_1", "name": "1042 Example Ave", ... },
"files": [ { "name": "Work order 1042.pdf", "contentType": "application/pdf",
"sizeBytes": 48211, "workOrder": true, "linkAvailable": true,
"downloadUrl": "https://storage.example.invalid/...", "expiresAtMs": 1767225600000 } ],
"fileCount": 1, "filesShown": "all" }
list_jobs with no view (or summary, scope, full) returns the same full job rows as before. read_job still takes jobId or jobName. list_sales_leads, list_leads, get_lead and action: "brief" are unchanged. Use the index and by-id calls when speed matters.
Agents and integrators should use the generated OpenAPI 3.0 document for every exec tool name, JSON input shape, read vs write kind, and x-ops-scopes group. It is rebuilt from the Portal tool registry on each deploy.
Download YAML · Download JSON · https://pezleyportal.com/portal-ops-openapi.yaml
exec tool has a PortalOpsInput_* schema, scope tags, and write tools include x-examples.ppops_… key under Settings → Portal Ops keys. New keys are opt-in: no scopes are checked until you pick groups (or Full access for every standard group; opt-in groups are ticked one by one). Choose the smallest set that fits — e.g. briefing-read only for a morning snapshot.PEZLEY_OPS_BRIEF_KEY). Never commit it to git or paste it into customer-visible channels.POST https://pezleyportal.com/.netlify/functions/portal-ops-mrz-tool with Authorization: Bearer … and a JSON body. Top-level orgId must match the org baked into the key — not inside input.action: "brief" for a one-shot morning snapshot, or action: "exec" with toolName + input for a single registry tool per request. Put tool arguments in input, not args.403 / 400, read the code field and adjust scopes or tool choice — see error codes, scope groups, and blocked tools.Portal Ops is Pezley Portal's HTTP API for external AI assistants, automations, and integrations. Each request is authenticated with a long-lived ppops_… secret your org admin issues in Settings.
Typical uses: a morning operations brief, adding a lead from a phone call, booking an estimate visit, updating a proposal draft, posting a weather delay, or attaching a work-order PDF.
?adminTab=opsbrief).settings-write). This starts unchecked and can also be changed on an existing named key.["*"] (includes settings-write, photo approval and job-cost writes). It leaves the opt-in groups off, such as people & access, payroll export and client email sends; tick each one you want as well, and the key then stores that full list instead of ["*"]. You cannot Generate ops key with zero scopes selected — pick at least one group or Full access.ppops_… value once into the assistant's secret store (often PEZLEY_OPS_BRIEF_KEY).active-admin-or-office-required until another admin rotates the key.Legacy keys: Older single-key installs and named rows with no scopes field keep their original Portal Ops access, including owner finance, but do not gain the new settings or pricing-write permission. Orgs that still show one row with keyId: "legacy" retain that original access; scopes are not editable — issue a new named key with settings-write to allow settings and pricing changes.
POST https://pezleyportal.com/.netlify/functions/ops-brief-key
Authorization: Bearer <Firebase org-admin ID token>
{ "action": "generate-key", "orgId": "your-org-id", "label": "Production assistant",
"scopes": ["briefing-read", "proposals-estimates"], "expiryDays": 90 }
# Full access: "scopes": ["*"]
# Missing or empty scopes[] → 400 scopes-empty
# expiryDays: 30 | 90 | 180 | 365 | null (no expiry); omitted → 90; other → 400 invalid-key-expiry
{ "action": "set-key-lifecycle", "orgId": "your-org-id", "keyId": "<keyId>", "paused": true }
{ "action": "set-key-lifecycle", "orgId": "your-org-id", "keyId": "<keyId>", "expiryDays": 180 }
# Pause/resume and expiry changes never change who made the key.
In Settings → Portal Ops keys, the ChatGPT / MCP connection card controls how long hosted ChatGPT OAuth sessions last for new connects. Default: until the Ops key is revoked or rotated (grantTtlMode: until_revoked) — not a 30-day calendar timer.
Scopes vs OAuth: current key scopes are checked on each request, alongside OAuth scope and applicable consent caps. Refresh tools updates metadata; reconnect ChatGPT through normal consent to restore or approve access. See setup, discovery and consent and Estimate Library reads.
Optional: expires_after_days caps lifetime from each new Connect (1–3650 days). Existing ChatGPT sessions keep the deadline from when they connected.
Programmatic parity (Firebase org-admin ID token, not ppops_):
POST https://pezleyportal.com/.netlify/functions/ops-brief-key
{ "action": "key-status", "orgId": "your-org-id" }
→ keys[], availableScopes[], mcpConnection { grantTtlMode, expiresAfterDays }
{ "action": "save-mcp-connection", "orgId": "your-org-id", "grantTtlMode": "until_revoked" }
→ { ok, orgId, mcpConnection }
Ask the owner in the assistant's chat and receive an explicit yes for each specific action before acting on any customer send (proposal, invoice, text or reminder), any money change (invoice, payment, job price or job costing), any delete, or any settings/library change. Show the exact recipient, content, amount and fields that will change when asking. A general instruction or an earlier unrelated yes is not approval for a new action.
Drafting, reading and internal notes need no approval. For sends, first preview, show the owner the exact recipient/content, then use the returned recipient and content digest with confirm:true after their yes. This confirmation is handled in chat; there is no separate Portal approval screen.
The Portal does not strip, blank, or refuse customer copy because it contains access words or numbers. Estimators own what they type on estimates, proposals, share pages, PDFs, work details, texts, and Home File notes. Dedicated staff Home File fields (gate code, lockbox, access notes, pets) stay on the staff record.
Never send to the same customer twice for the same thing. Respect send caps: two customer notifications per proposal or invoice in any rolling 24 hours, including unsend/resend cycles; five texts per customer per key in any rolling 24 hours. 429 send-cap means stop and explain the cap. Retrying the same operation must reuse the same Idempotency-Key header.
Every key-authenticated write requires the Idempotency-Key request header, including MCP, batch writes, previews and dry runs. Missing header returns 400 idempotency-key-required; reads are unchanged. Do not substitute a new retry key to evade a failed or uncertain send.
Keys never get bank tools, Stripe charge/refund/payout actions, payroll or employee pay-rate writes, or the ability to enable a drip. Draft tools never notify customers.
| Item | Value |
|---|---|
| Environment variable | PEZLEY_OPS_BRIEF_KEY (or a named secret per assistant) |
| Authorization header | Authorization: Bearer <your ppops key> |
| Alternate header | X-Pezley-Ops-Key: <your ppops key> |
| HTTP endpoint | POST https://pezleyportal.com/.netlify/functions/portal-ops-mrz-tool (also OPTIONS for CORS) |
| Legacy alias | POST …/openclaw-mrz-tool — deprecated thin re-export; migrate to portal-ops-mrz-tool. |
| Key management | POST https://pezleyportal.com/.netlify/functions/ops-brief-key — Firebase org-admin ID token only (not ppops_). Actions: key-status (includes mcpConnection, availableScopes), save-mcp-connection, generate-key (label + required non-empty scopes[] — scope ids or ["*"]), update-key-scopes, rotate-key, revoke-key. Scope catalog: OpenAPI x-portal-ops-scope-appendix. |
| Org in body | orgId must match the org embedded in the key (top-level JSON field, not inside input). Mismatch → 403 org-mismatch. |
| Rate limit | Ops keys: 60 requests / minute per key (each named key has its own bucket) → 429 with retryMs. See OpenAPI x-portal-ops-http-notes. |
| Error shape | { error, code, hint?, toolName?, allowed? } — code enum in OpenAPI PortalOpsError. |
Every request is JSON POST to the Portal Ops endpoint. The action field selects behavior. Signed-in Firebase org admins may use the same URL with an ID token for the full in-app tool catalog; ops keys are limited to registry tools allowed by their scopes.
briefMorning operations snapshot. Requires briefing-read on ops keys. Optional sessionId, adminName for audit.
{
"action": "brief",
"orgId": "your-org-id"
}
execOne registry tool per request. toolName must appear in OpenAPI x-portal-ops-tools; input must match PortalOpsInput_{toolName}.
{
"action": "exec",
"orgId": "your-org-id",
"toolName": "create_lead",
"input": { "name": "Example lead", "phone": "CUSTOMER_PHONE" }
}
company-stateCompact company memory + brief subset for multi-turn assistants (same auth as brief). Requires scopes that cover the underlying reads.
{
"action": "company-state",
"orgId": "your-org-id"
}
logAppend an audit line for an external assistant session (kind, message, optional tool list). Does not run Portal tools.
{
"action": "log",
"orgId": "your-org-id",
"sessionId": "morning-bot",
"kind": "assistant",
"message": "Posted rain delay for JOB_ID"
}
create_proposal_draft creates a blank draft for an existing leadId or contactId, without a job or customer notification. save_proposal_draft and its dry run report droppedAreas:[{name,reason:"needs-dimensions"}] when a new room lacks L/W/H or sqft.
add_contact_note, add_lead_note and add_visit_note append 1–2000 characters privately under the authenticated org record. Visit notes take jobId and the existing visitId (or estimate for the estimate appointment). No note is rendered on a customer page. Hosted CRM corrections now use the existing leads-crm permission and live issuer checks.
create_invoice_draft/update_invoice_draft and draft_sms never notify. send_invoice/send_sms require exact recipient/digest confirmation after approval in chat. Invoice delivery never charges Stripe; customers use the existing payment-link flow. Texts retain TCPA/STOP refusal.
For a custom subject or body, pass messageOverride to send_invoice, send_proposal, resend_proposal_email, or schedule_proposal_send. Use send_client_email with subject and body for standalone messages.
Key formula/leftover removal is also reversible: call set_home_file_formulas or set_home_file_leftovers with {jobId,restoreIds:[rowId]} to restore explicitly selected tombstoned rows. Key import undo retains restorable records; restore_deleted_record with deleteTool:"undo_app_import" uses the import grant.
request_pto, approve_pto, deny_pto and cancel_pto share the app's PTO policy. Removing or denying approved time off flags existing paid shifts for admin review and never deletes them or sends crew SMS.
hold_share_photos/unapprove_photo hide selected photos reversibly; they never delete files. add_home_file_entry/update_home_file_entry update general Home File records while staff access codes remain private. Costing writes use the separate opt-in scope, idempotency, before/after audit and dryRun.
Successful action: "brief" returns ok: true and a brief object (OpenAPI PortalOpsBriefSnapshot). Fields are filtered by what your key can read — finance blocks stay out unless owner-finance is enabled.
asOftodayYYYY-MM-DD in the org timezone.orgIdtodayJobs / weekJobslist_jobs / dispatch).onClockhourscrewsalesLeadsleads-crm or briefing reads allow.proposalspipelinependingCheckinsaction-feed is enabled.learningAiWhen you issue or edit a key, you enable one or more groups below. New keys are opt-in in Settings (nothing checked until you choose). Explicit Full access (["*"]) includes settings-write. Legacy keys and rows with no scopes field retain their original access, including owner finance, but keep their settings and pricing-write restrictions. Each group lists its tools; writes still follow the key restrictions. Product and rate pricing changes require Manage settings & pricing, even when the key already has estimate or production-rate access.
proposals-estimates is a deprecated alias for proposals-draft + proposals-send. Existing keys keep draft/send access; settings/library changes require settings-write. New keys show separate draft/send checkboxes. job-costing-write is off by default and included in Full access. Full access leaves the opt-in groups listed under What a key can do off until each is ticked.
| Scope id | Label | What it allows |
|---|---|---|
briefing-read |
Morning brief & reads | Jobs, crew, clock scans, learning AI, recurring reminders, check-ins. Home File, including gate codes, is a separate Home File grant. Tools: analyze_time_trends, list_crew, list_jobs, list_learning_ai, list_recurring_reminders, list_teams, list_tools, read_job, scan_shifts |
action-feed |
Tasks & alerts medium risk | Full Action Feed cleanup for this org: list/approve pending check-ins, one-off reminders — same mutate surface as Today (not read-only). Tools: add_reminder, list_pending_checkins, publish_checkins |
company-state |
Company memory & inventory medium risk | Company profile, lore (remember/forget), tools checkout, reminders. Tools: add_reminder, add_tool, check_in_tool, check_out_tool, create_recurring_reminder, delete_recurring_reminder, delete_tool, edit_recurring_reminder, edit_tool, forget, mark_tool_fixed, mark_tool_repair, remember, restore_deleted_record, set_tool_photo, toggle_recurring_reminder, update_company_info |
leads-crm |
Leads & pipeline | Pipeline scoring, follow-up drafts, Sales hub to-build jobs (list_sales_leads), fast lead lookups (search_leads, lead_status: id, name, status, linked job and proposal state, no phone, email or consent data), and update_lead / update_contact. create_lead, list_leads, and get_lead (full records with phones and consent docs) require the opt-in lead-intake grant (not this group). Tools: analyze_pipeline, draft_followup, lead_status, list_sales_leads, score_lead, search_leads, update_contact, update_lead |
lead-intake |
Lead intake medium risk | Opt-in. create_lead writes a Sales → Leads CRM record (phone then name dedupe; no SMS, email, staff alert, estimate job, or appointment). list_leads and get_lead return full website CRM records and linked consent docs (including phone numbers). Not included on leads-crm, business-data, or Full access (*). Uses the 10/minute opt-in group rate limit. Tools: create_lead, get_lead, list_leads |
lead-stage |
CRM lead stage medium risk | Opt-in. set_lead_stage moves one website CRM lead to an existing Sales lead stage (New, Contacted, Est. scheduled, Won, Lost, Spam). Requires confirm:true and the Idempotency-Key header. Writes an audit with the old stage, new stage, issuer and time. Lost and Spam also retire the unsold estimate, the same way a declined proposal does. Not included on leads-crm or legacy unscoped keys. Uses the 10/minute opt-in group rate limit. Tools: set_lead_stage |
proposals-draft |
Proposal drafts | Proposal reads and draft edits. Sending and settings/library writes require separate grants. Tools: add_estimate_note, analyze_rate_book, create_estimate, create_proposal_draft, discard_staged_estimate, download_proposal_pdf, estimate_context, estimate_snapshot, get_estimate_descriptor, get_estimate_product, get_staged_estimate, keep_staged_estimate, link_recording, list_estimate_descriptors, list_estimate_products, list_proposals, list_recordings, list_staged_estimates, push_staged_estimate, read_estimate_handoff, read_proposal, read_recording_transcript, reopen_estimate_draft, reopen_proposal_draft, research_estimate_product, restore_proposal_revision, save_proposal_draft, stage_estimate_draft, unlink_recording, update_estimate, update_staged_estimate |
proposals-send |
Send proposals high risk | Customer proposal sends, recipient changes and unsend. Review recipient/content and obtain the owner's explicit yes in chat. Tools: resend_proposal_email, send_proposal, set_proposal_cc_emails, set_proposal_secondary_email, unsend_proposal_to_draft |
notes |
Internal notes | Append-only notes stored in private org record subcollections; never customer output. Tools: add_contact_note, add_lead_note, add_visit_note |
invoices-draft |
Invoice drafts high risk | Draft ordinary, deposit, progress, final and supported time-and-material invoices, and attach an estimate to an invoice. Money changes need approval in chat. Tools: create_invoice_draft, delete_invoice, get_invoice, link_invoice_estimate, list_invoices, update_invoice_draft |
invoices-send |
Send invoices high risk | Preview and confirm invoice delivery. Never creates a Stripe charge. Tools: cancel_scheduled_invoice_send, schedule_invoice_send, send_invoice |
sms-send |
Customer texts high risk | SMS draft and digest-confirmed send, with TCPA/opt-out checks and a five-per-customer rolling daily key cap. Tools: draft_sms, send_sms |
pto-manage |
Time off | Manage PTO without crew texts; retained paid shifts are flagged for admin removal. Tools: adjust_pto_balance, approve_pto, cancel_pto, deny_pto, request_pto |
photos-manage |
Hide shared photos | Reversible removal from customer sharing; files are retained. Tools: hold_share_photos, unapprove_photo |
job-costing-write |
Write job costs high risk | Opt-in job-costing writes with required idempotency, before/after audit and dryRun. No pay-rate writes. Tools: dismiss_receipt, get_costing_gaps, get_job_costing, list_job_costs, move_job_cost, reassign_receipt, save_job_costing, undismiss_receipt |
jobs-files |
Jobs & files high risk | Create/edit jobs, uploads, work orders, delete files, rename, hours, assign tasks — full job file ops (use Job status & limbo scope for status-only keys). Does not include Home File gate codes, pets, formulas, or leftovers. Tools: add_job, add_task_to_job, assign_to_job, attach_job_file, attach_work_order, create_job, delete_job, delete_job_file, detach_job_file, edit_job, edit_summary, link_recording, remove_job_file, rename_job, restore_deleted_record, set_job_colors, set_job_name, unlink_recording, upload_job_file |
home-file |
Home File high risk | Home File timeline (no prices) plus staff-only gate code, lockbox, access notes and pets, exact color formulas, and the leftover paint log. This grant is separate from Jobs & files, so an existing jobs-files key does not gain gate-code access. Gate codes and pets are never included in anything customer-facing. Tools: add_home_file_entry, read_home_file, set_home_file_access, set_home_file_formulas, set_home_file_leftovers, update_home_file_entry |
customer-app |
Homeowner app sign-in medium risk | Homeowner email-code sign-in for the Pezley Portal app: list who can sign in (masked email, contact ids, phones signed in, last sign-in), one homeowner's sign-in log (codes sent, sign-ins, sign-outs, revokes), and revoke_customer_app_sign_in (confirm:true) to sign them out on every phone. Codes, passes and full emails are never returned. Their contact and project records are not touched. Tools: customer_app_sign_in_log, list_customer_app_sign_ins, revoke_customer_app_sign_in |
scheduling |
Scheduling & visits medium risk | Crew Schedule / admin assistant parity: read jobs/crew/shifts, edit bars & spots, assign crew, estimate/client visits, delay posts, and schedule-related job fields (hours). write_schedule_with_ai stays in-app (Pro Tips panel) — use edit_job_schedule or visit tools from automations. Tools: add_spot_assignment, analyze_time_trends, apply_schedule_suggestion, assign_to_job, book_client_visit, book_estimate_visit, cancel_client_visit, cancel_estimate_visit, dismiss_schedule_suggestion, edit_job, edit_job_schedule, list_appointments, list_crew, list_days_off, list_jobs, list_recurring_reminders, list_schedule, list_schedule_suggestions, list_teams, offer_estimate_visit, polish_delay_reason, post_job_delay, read_job, remove_day_off, remove_spot_assignment, scan_shifts, set_day_off, undo_schedule_suggestion |
job-delays |
Job delay posts medium risk | Post rain/heat/schedule delays (customer share + crew cascade) with optional polish_delay_reason — same as check-in Delay / Action Feed. Tools: polish_delay_reason, post_job_delay |
job-status |
Job status & limbo medium risk | Set job status (active, accepted, limbo, completed, archived), limbo staff reason, general/T&M flags — includes polish_limbo_reason (Rewrite with AI) or custom text. Tools: list_jobs, polish_limbo_reason, read_job, set_job_status |
crew-clock |
Crew & time clock high risk | Clock in/out, shifts, crew roster edits. Tools: add_crew_member, add_shift_manual, clock_in_user, clock_out_user, delete_shift, edit_crew_member, edit_shift, end_break, restore_deleted_record, start_break |
settings-write |
Settings & pricing high risk | Read and edit organization settings and pricing libraries. Includes contract types and invoice defaults. Does not grant owner finances, API-key management, or provider credentials. Tools: analyze_rate_book, create_estimate_product, delete_estimate_descriptor, delete_estimate_product, delete_production_rate, get_estimate_descriptor, get_estimate_product, get_production_rate, get_settings, import_rate_book, list_estimate_descriptors, list_estimate_products, list_production_rates, research_estimate_product, restore_deleted_record, save_estimate_settings, save_settings, upsert_estimate_descriptor, upsert_estimate_product, upsert_production_rate |
production-rates |
Production rates | Rate book list/get/upsert/delete. Tools: delete_production_rate, get_production_rate, list_production_rates, upsert_production_rate |
drips-comms |
Email & drips | Templates and drip sequence drafts/updates. Tools: create_drip_sequence, draft_drip_sequence, draft_email_template, list_drip_sequences, list_email_templates, update_drip_sequence, update_email_template |
business-data |
Business data (read) | Portal Ops data API (read-only, paged, filter by date / customer / job): contacts, estimates, schedule, production, photos, messages, follow-ups, staff, hours, colors, reviews/referrals, settings, activity. CRM lead list/get need the opt-in lead-intake grant. Invoice and costing records use their own grants or owner-finance; payments require owner-finance. Tools: get_contact, get_estimate, get_job_activity, get_job_production, get_settings, list_activity, list_contacts, list_estimates, list_followups, list_hours, list_job_colors, list_messages, list_photos, list_production, list_reviews_referrals, list_schedule, list_staff |
photos |
Photos (upload & annotate) medium risk | upload_photo / save_annotated_photo (new linked copy, original untouched) + list_photos. Every assistant photo is pending until staff approve it in Portal; approval requires the separate Approve selected photos grant and an active admin/office issuer. Tools: annotate_photo, download_photo, list_pending_share_photos, list_photos, save_annotated_photo, upload_photo |
photos-approve |
Approve selected photos high risk | approve_photos requires jobId and explicit photoIds; never approves all. Separate from upload access. Tools: approve_photos |
webhooks |
Event webhooks medium risk | list_webhooks / create_webhook / delete_webhook — HMAC-signed POSTs for lead.created, customer.replied, proposal.viewed, proposal.signed, payment.received. Tools: create_webhook, delete_webhook, list_webhooks, restore_deleted_record |
owner-finance |
Owner $ — Numbers & job costing high risk | Owner reports, margin/burden and permitted finance reads. Job-costing writes require the separate opt-in grant. Pay-rate writes are prohibited. Tools: advise_cfo, analyze_numbers, cfo_setup_status, confirm_receipt, draft_cfo_report, get_costing_gaps, get_invoice, get_job_costing, ingest_receipt, list_cfo_packs, list_employee_rates, list_invoices, list_job_costs, list_payments, list_receipts, pay_invoice, query_cfo_knowledge, record_collected_payment, reopen_voided_invoice, save_payment_schedule, set_job_price, suggest_burden_from_wages, void_invoice |
app-import |
Import from another app high risk | PaintScout export / spreadsheet import: preview_app_import (stages a preview, duplicates flagged), commit_app_import (idempotent per previewId), list_app_import_batches, undo_app_import. Writes contacts, jobs, estimates, invoices with customerNotifySuppressed — no email, SMS, drips, proposal sends, or reminders. Tools: commit_app_import, list_app_import_batches, preview_app_import, restore_deleted_record, undo_app_import |
books-bank |
Receipt voids high risk | void_receipt. Tools: void_receipt |
pay-rates |
Pay rates high risk | Tools: list_employee_rates, save_employee_rates |
numbers-settings |
Numbers settings high risk | Tools: advise_cfo, analyze_numbers, cfo_setup_status, draft_cfo_report, list_cfo_packs, query_cfo_knowledge, save_numbers_settings, suggest_burden_from_wages |
drips-enable |
Enable drips high risk | Tools: draft_drip_sequence, enable_drip, list_drip_sequences, update_drip_sequence |
change-orders |
Change orders high risk | Tools: create_change_order_draft, list_change_orders, mark_change_order_accepted, send_change_order, void_change_order |
people-access |
People & access high risk | Tools: cancel_checkin_queue_purge, deactivate_user, list_people_setup, list_staff, merge_users, resend_invite, restore_user, save_chat_pair, send_user_invite, set_production_crew, set_user_role |
payroll-export |
Payroll export | Tools: approve_shift_review, export_hours, find_duplicate_shifts, ignore_shift_anomaly, list_hours, merge_duplicate_shifts, move_shifts_to_tm, scan_shifts, undo_shift_merge |
team-comms |
Team communications medium risk | Tools: decline_chat_proposal, delete_chat_message, list_messages, list_team_chat, list_team_threads, nudge_missing_hours, post_team_message, react_to_chat_message, send_push_to_crew, share_photo_in_chat |
direct-messages |
Direct messages high risk | Tools: list_direct_messages, send_direct_message |
client-comms-send |
Client email send high risk | Tools: answer_customer_question, cancel_scheduled_proposal_send, create_share_link, ignore_customer_question, reply_email_thread, request_review, schedule_proposal_send, send_client_email, send_share_message |
email-blasts |
Email blasts high risk | Tools: list_email_blasts, save_email_blast, send_email_blast |
hubs |
Hubs medium risk | Tools: list_hub_log, list_hubs |
estimates-advanced |
Estimates advanced medium risk | Tools: decline_proposal, draft_client_email, record_in_person_accept, split_estimate |
field-ops |
Field operations medium risk | Tools: add_crew_need, attach_checklist_to_job, check_off_crew_need, complete_checklist, create_checkin, create_checklist, create_purchase_order_draft, crew_day_steps, delete_checkin, delete_checklist, discard_checkin, edit_checkin, edit_sub_company, job_walkthrough, list_brush_requests, list_checklists, list_crew_needs, list_pending_checkins, list_purchase_orders, list_shop_duties, list_sub_access, list_sub_companies, list_sub_profiles, list_touchups, mark_crew_day_step, move_checkin, remove_pending_checkin_photos, request_brush_replacement, reset_checklist, resolve_brush_request, revoke_sub_access, save_sub_profile, save_touchup, send_sub_invite, set_shop_duty_item, set_shop_duty_supply, set_sub_homeowner_settings, set_walkthrough, tick_crew_list_item, unpublish_checkin, update_checklist, update_purchase_order |
job-record |
Job record medium risk | Tools: add_job_product, confirm_job_product, delete_color_photo, move_portfolio_photo, publish_job_prep_sheet, read_job_record, relabel_color_photo, remove_job_product, save_job_prep_draft, save_office_handoff, set_job_paid, set_portfolio_details |
contacts-leads |
Contacts and leads medium risk | Tools: cancel_drip_enrollment, create_contact, list_drip_enrollments, make_home_file_link, mark_home_file_sent, merge_contacts, pause_drip_enrollment, resend_lead_to_google, resend_lead_webhook |
settings-advanced |
Settings advanced high risk | Tools: get_settings, restore_schedules_from_history, save_settings, scan_missing_profiles, scan_summary_scratchpad, send_test_email, send_test_text, set_company_logo, set_new_clock, wipe_job_summary |
integrations-sync |
Integrations sync medium risk | Tools: companycam_link_project, trigger_google_calendar_sync, trigger_quickbooks_sync |
records-archive |
Archive records medium risk | Tools: archive_contact, archive_estimate, archive_lead, restore_deleted_record |
ops-audit |
Ops audit log | Tools: list_ops_receipts |
Of 175 action groups in the app, a key covers 123, does part of 33, and can't do 1 yet. 18 stay with a signed-in person on purpose. Each covered action still needs the scope group for its tools (see Scope groups).
Full access is not every group. A Full access key (["*"]) leaves these opt-in groups off. Tick each one you want on the key as well: lead-intake (Lead intake), lead-stage (CRM lead stage), books-bank (Receipt voids), pay-rates (Pay rates), numbers-settings (Numbers settings), drips-enable (Enable drips), change-orders (Change orders), people-access (People & access), payroll-export (Payroll export), team-comms (Team communications), direct-messages (Direct messages), client-comms-send (Client email send), email-blasts (Email blasts), hubs (Hubs), estimates-advanced (Estimates advanced), field-ops (Field operations), job-record (Job record), contacts-leads (Contacts and leads), settings-advanced (Settings advanced), integrations-sync (Integrations sync), records-archive (Archive records).
| Area | Covered | Partly | Not yet | Person |
|---|---|---|---|---|
| Crew day | 16 | 9 | 0 | 0 |
| Hours and payroll | 3 | 4 | 0 | 0 |
| Jobs | 11 | 5 | 0 | 1 |
| Schedule | 7 | 3 | 0 | 0 |
| Leads and follow-ups | 9 | 0 | 0 | 0 |
| Contacts and Home File | 8 | 0 | 0 | 0 |
| Estimates and proposals | 15 | 1 | 0 | 0 |
| Invoices and payments | 10 | 0 | 0 | 2 |
| Numbers, receipts, purchasing | 6 | 1 | 0 | 0 |
| Customer messages | 5 | 3 | 0 | 1 |
| Team chat | 4 | 3 | 0 | 1 |
| Check-in review and photos | 7 | 0 | 0 | 0 |
| Admin and settings | 11 | 3 | 0 | 11 |
| Hub (shop iPad) | 7 | 1 | 1 | 2 |
| Subcontractors | 4 | 0 | 0 | 0 |
| All areas | 123 | 33 | 1 | 18 |
| Action | Status | Tools today |
|---|---|---|
| Clock someone in or out | Covered | clock_in_user, clock_out_userNo GPS from a key. |
| Start or end a break or lunch | Covered | start_break, end_breakFor a crew member who is clocked in. Break time is unpaid. Nobody is notified. |
| Switch a shift to another job | Covered | edit_shift |
| Clear a duplicate shift | Covered | find_duplicate_shifts, merge_duplicate_shifts, undo_shift_merge |
| Create or edit a check-in or final day | Covered | create_checkin, edit_checkin |
| Add check-in photos | Partly | upload_photo, remove_pending_checkin_photosPhotos wait for staff approval. |
| Polish a check-in or delay reason | Covered | polish_delay_reason |
| Discard or move a check-in | Partly | discard_checkin, move_checkinUnpublished ones only. Needs Field ops. |
| Publish check-ins | Covered | list_pending_checkins, publish_checkinsUnapproved photos are held back. |
| Create, edit or tick a checklist | Covered | create_checklist, update_checklist, complete_checklist, list_checklists |
| Tick a last-day walkthrough list | Covered | complete_checklist, crew_day_stepsOwn and customer walkthrough lists the app puts on each job. |
| Reset or delete a checklist | Covered | reset_checklist, delete_checklist, restore_deleted_recordNeeds Field ops. A delete can be undone. |
| Upload a PDF checklist or attach a saved one | Partly | attach_checklist_to_jobAttaches a saved list or template. PDF upload is in the app. |
| Work order extras | Partly | assign_to_job, add_task_to_job |
| Tools: add, edit, delete, check out, check in, repair, fixed | Covered | list_tools, add_tool, edit_tool, delete_tool, check_out_tool, check_in_tool, mark_tool_repair, mark_tool_fixed |
| Add a tool photo | Covered | set_tool_photo |
| Crew brush requests | Partly | request_brush_replacementReplacement requests for office review. The quarterly allotment sign-off is the crew member's own, in the app. |
| Office brush review | Covered | list_brush_requests, resolve_brush_request |
| Walkthrough touch-ups: add, edit, tick fixed, remove | Partly | list_touchups, save_touchupNotes only. Touch-up photos are added in the app. |
| Pin or tick crew needs for tomorrow | Partly | list_crew_needs, add_crew_need, check_off_crew_needRecord only. Moving a tool stays with check_out_tool. |
| Set the walkthrough time and record how it went | Covered | job_walkthrough, set_walkthroughRecord only. Nothing is sent to the homeowner or the crew. |
| Tick a crew list item or mark a crew day step (Today, shop hub) | Partly | crew_day_steps, tick_crew_list_item, mark_crew_day_stepRecord only. Check-ins, lunch and marking a job finished stay on the person's phone. |
| Time off: request, approve, deny, cancel | Covered | request_pto, approve_pto, deny_pto, cancel_pto |
| Adjust a time-off balance | Covered | adjust_pto_balanceNever the key issuer's own bank. Nobody is notified. |
| Add or edit a crew member | Partly | add_crew_member, edit_crew_memberNo profile photo. Current admins can't be changed. |
| Action | Status | Tools today |
|---|---|---|
| Edit, delete or add a shift | Covered | edit_shift, delete_shift, add_shift_manual |
| Add a time-off shift | Partly | add_shift_manual |
| Move hours to T&M billing | Partly | move_shifts_to_tmWhole closed shifts. Splitting a shift is in the app. Needs Payroll hours export. |
| Approve a shift review or ignore an anomaly | Partly | approve_shift_review, ignore_shift_anomaly, edit_shiftPTO review stays in the app. A wrong clock-out is fixed with edit_shift. Needs Payroll hours export. |
| Scan shifts for problems | Covered | scan_shifts, find_duplicate_shifts, analyze_time_trends |
| Nudge someone about their hours | Covered | nudge_missing_hoursNeeds Team messages. |
| Review and export hours | Partly | list_hours, export_hoursLocking the pay period stays with an admin in the app. |
| Action | Status | Tools today |
|---|---|---|
| Create or edit a job | Covered | create_job, add_job, edit_job, rename_jobPrice and hours budget need owner finance. |
| Change status or limbo | Covered | set_job_status, polish_limbo_reason |
| Mark a job paid | Covered | set_job_paidAdmin issuer only. Not for time and material jobs. Needs Job record. |
| Archive a job | Covered | set_job_statusChecked-out tools go back to the shop, like the app. |
| Delete a job | Partly | delete_job, restore_deleted_recordTest companies only, and restorable. |
| Pin a job | Stays with a person | Each person's own pins, not a company record. |
| Assign crew | Covered | assign_to_job, add_spot_assignment |
| Add, remove or confirm job products | Covered | add_job_product, remove_job_product, confirm_job_productNeeds Job record. |
| Look up a product | Partly | research_estimate_product |
| Save or apply a color plan | Covered | set_job_colors, list_job_colors |
| Color photos: add, relabel, delete | Partly | relabel_color_photo, delete_color_photoAdding a photo stays in the app. Needs Job record. |
| Attach or remove job files and work orders | Covered | upload_job_file, delete_job_file, attach_work_order |
| Office handoff | Covered | read_estimate_handoff, add_estimate_note, save_office_handoffSave needs Job record. |
| Memory notes | Partly | remember, forgetCompany memory, not per job. |
| Rewrite the job summary | Covered | edit_summary |
| Prep sheet: draft, publish | Covered | save_job_prep_draft, publish_job_prep_sheetNeeds Job record. |
| Completed job wrap | Partly | save_job_costingJob costing only. |
| Action | Status | Tools today |
|---|---|---|
| Move a job on the schedule | Covered | edit_job_schedule |
| Weather delay | Partly | post_job_delayNo undo. |
| Spot assign crew | Covered | add_spot_assignment, remove_spot_assignment |
| Review a cascade of moves | Partly | edit_job_scheduleOne job at a time. |
| AI auto-schedule: apply, undo, dismiss | Covered | list_schedule_suggestions, apply_schedule_suggestion, undo_schedule_suggestion, dismiss_schedule_suggestionUndo covers applies made with a key. New suggestions are made in the app. A suggestion shows the sub the scheduling assistant picked, when there is one. |
| Reply to a customer about the schedule | Partly | draft_client_email, send_client_email |
| Estimate visits: book, offer, cancel | Covered | book_estimate_visit, offer_estimate_visit, cancel_estimate_visit, list_appointments |
| Client visits: book, cancel | Covered | book_client_visit, cancel_client_visit |
| Company days off | Covered | list_days_off, set_day_off, remove_day_off |
| Reminders | Covered | add_reminder, list_recurring_reminders, create_recurring_reminder, edit_recurring_reminder, toggle_recurring_reminder, delete_recurring_reminder |
| Action | Status | Tools today |
|---|---|---|
| Create or edit a lead | Covered | create_lead, update_lead, get_lead, search_leads |
| Archive or restore a lead | Covered | archive_lead, restore_deleted_record |
| Set the pipeline stage, lost or limbo | Covered | set_lead_stage |
| Notes and callback notes | Covered | add_lead_note, add_visit_note |
| Draft a reply | Covered | draft_followup |
| Resend to Google Contacts or a webhook | Covered | resend_lead_to_google, resend_lead_webhook |
| Build or turn on a follow-up sequence | Covered | draft_drip_sequence, create_drip_sequence, update_drip_sequence, enable_drip |
| Pause a sequence or one enrollment | Covered | update_drip_sequence, list_drip_enrollments, pause_drip_enrollment, cancel_drip_enrollment |
| See one job's customer activity (Customer views, By job) | Covered | get_job_activity |
| Action | Status | Tools today |
|---|---|---|
| Add a new contact | Covered | create_contact |
| Edit a contact | Covered | update_contact, add_contact_note |
| Archive a contact | Covered | archive_contact |
| Merge duplicate contacts | Covered | merge_contacts |
| Import from another app | Covered | preview_app_import, commit_app_import, undo_app_import |
| Link a contact to a job | Covered | create_job, edit_job |
| Home File entries, access, formulas, leftovers | Covered | read_home_file, add_home_file_entry, update_home_file_entry, set_home_file_access, set_home_file_formulas, set_home_file_leftovers |
| Send or share a Home File | Covered | make_home_file_link, mark_home_file_sent, send_client_email, send_sms |
| Action | Status | Tools today |
|---|---|---|
| Create and edit a draft | Covered | create_estimate, save_proposal_draft, update_estimate, stage_estimate_draft, update_staged_estimate, push_staged_estimate |
| Delete a draft | Covered | archive_estimate |
| Split an estimate | Covered | split_estimate |
| Send with CC after preview | Covered | send_proposal, set_proposal_cc_emails, resend_proposal_email |
| Customize the proposal email subject and body | Covered | send_proposal |
| Schedule a proposal with optional custom email wording | Covered | schedule_proposal_send |
| Cancel a scheduled send | Covered | cancel_scheduled_proposal_sendNeeds Send client email. |
| Decline a proposal | Covered | decline_proposal |
| Record an in-person accept | Covered | record_in_person_accept |
| Change orders: create, send, accept, void | Covered | create_change_order_draft, send_change_order, mark_change_order_accepted, void_change_order |
| Proposal PDF and work order | Covered | download_proposal_pdf, attach_work_order |
| Estimate photos and markup | Partly | upload_photo, save_annotated_photoApproval stays with staff. |
| Products and descriptors library | Covered | create_estimate_product, upsert_estimate_descriptorNeeds Manage settings & pricing. |
| Production rate book changes | Covered | upsert_production_rate, delete_production_rateNeeds Manage settings & pricing. |
| Import a rate book from another app | Covered | import_rate_bookNeeds Manage settings & pricing. PaintScout CSVs; adds or updates rows, never deletes or replaces. |
| Purchase order from an estimate | Covered | create_purchase_order_draft |
| Action | Status | Tools today |
|---|---|---|
| Create an invoice, T&M, phase, balance or final | Covered | create_invoice_draft, update_invoice_draft |
| Save the payment schedule | Covered | save_payment_scheduleAdmin issuer. Owner finance. |
| Save the sold price | Covered | set_job_priceOwner finance. |
| Send an invoice with optional custom email wording | Covered | send_invoice |
| Schedule an invoice send | Covered | schedule_invoice_send, cancel_scheduled_invoice_sendCancel the schedule too. Needs Send invoices. |
| Record a partial, offline or collected payment | Covered | pay_invoice, record_collected_payment |
| Void an invoice | Covered | void_invoice |
| Reopen a voided invoice | Covered | reopen_voided_invoiceAdmin issuer. Comes back held, not sent. |
| Delete an invoice | Covered | delete_invoice, restore_deleted_recordNeeds Invoice drafts. Unsent drafts with no money only; anything else is voided. A delete can be undone. |
| Attach the estimate file | Covered | link_invoice_estimate |
| Card checkout, refunds, the Stripe account | Stays with a person | Money leaves or moves. |
| Void or delete an invoice that has payments (refund or keep as credit) | Stays with a person | Money leaves or moves. |
| Action | Status | Tools today |
|---|---|---|
| Numbers settings | Covered | save_numbers_settings |
| Job costing and expenses | Covered | save_job_costing, move_job_cost |
| Upload a cost file | Partly | ingest_receipt |
| CFO reports | Covered | analyze_numbers, draft_cfo_report, advise_cfo |
| Numbers date range (7d to last year, custom) | Covered | analyze_numbers, query_cfo_knowledge, draft_cfo_report |
| Receipts: upload, match, dismiss, void | Covered | ingest_receipt, confirm_receipt, dismiss_receipt, void_receipt |
| Purchase orders | Covered | list_purchase_orders, update_purchase_order |
| Action | Status | Tools today |
|---|---|---|
| New email to a customer | Covered | draft_client_email, send_client_email |
| Reply inside an email thread | Covered | reply_email_threadNever to an address on the email opt-out list. Needs Send client email. |
| Text a customer | Covered | draft_sms, send_sms |
| Suggested reply | Covered | draft_followup |
| Answer or ignore a customer question | Partly | answer_customer_question, ignore_customer_questionThe homeowner's push notice goes only from the app; they see it on the share page. Needs Send client email. |
| Reply on share page messages | Partly | send_share_messageThe homeowner's push notice goes only from the app; they see it on the share page. Needs Send client email. |
| Ask for a review | Covered | request_review |
| Email blasts | Partly | list_email_blasts, save_email_blast, send_email_blastConsented contacts only. Up to 500 recipients and one new blast a day from keys; larger lists send from the app. Needs an admin key issuer and Email blasts. |
| Bulk marketing opt-in | Stays with a person | Consent has to come from the customer. |
| Action | Status | Tools today |
|---|---|---|
| Read a team chat | Covered | list_team_chatPrivate assistant chats are never read. |
| Post to a team channel | Covered | list_team_threads, post_team_message |
| Push to crew | Covered | send_push_to_crew |
| Start or send a direct message | Covered | list_direct_messages, send_direct_messageAs the key's creator, behind its own off-by-default switch. No push. |
| Send a photo in chat | Partly | share_photo_in_chatShares a photo already on a job. New photos go through upload_photo and approval first. |
| React or delete | Partly | react_to_chat_message, delete_chat_messageDeletes only posts a key made. |
| Pin a chat | Stays with a person | Pins are each person's own sidebar. |
| Confirm a proposal in chat | Partly | decline_chat_proposalDeclines a card. To go ahead, use the step's own tool. Multi-step assistant actions stay in the app. |
| Action | Status | Tools today |
|---|---|---|
| Publish check-ins | Covered | publish_checkins |
| Unpublish or delete a check-in | Covered | unpublish_checkin, delete_checkin, restore_deleted_recordNeeds Field ops. Unpublish needs an admin key issuer. Delete takes discarded check-ins only and can be undone. |
| Edit captions | Covered | edit_checkin |
| Approve photos | Covered | approve_photosIts own grant. |
| Hide or unapprove a shared photo | Covered | hold_share_photos, unapprove_photo |
| Create a share link | Covered | create_share_link |
| Portfolio details | Covered | set_portfolio_details, move_portfolio_photoNeeds Job record. Title, tags, map pin, featured and photo order. Approving photos is Approve photos. |
| Action | Status | Tools today |
|---|---|---|
| Invite or resend an invite | Covered | send_user_invite, resend_inviteNever as an admin. |
| Change a role | Partly | set_user_roleLead or crew. Making an admin stays a person's tap. |
| Deactivate a user | Partly | deactivate_userNot a current admin. |
| Delete, restore or merge users | Partly | deactivate_user, restore_user, merge_usersDeactivate pauses someone; a full Delete stays in the app. Never an admin account. |
| Make invite codes | Stays with a person | Pezley platform only. A code lets someone start a new company. |
| Chat pairs and production crews | Covered | list_people_setup, save_chat_pair, set_production_crewNeeds an admin key issuer. |
| Title access for one person | Stays with a person | Live permissions, including money and admin access. |
| Team setup: titles and what each person can do | Stays with a person | Giving people access stays a person's tap. Their links go out with send_user_invite. |
| Company info and settings | Covered | update_company_info, save_settings, save_estimate_settings, update_email_template |
| Upload a logo | Covered | set_company_logoPNG, JPEG or WebP. Padding is not trimmed. |
| Webhooks | Covered | list_webhooks, create_webhook, delete_webhook |
| Audit log | Covered | list_ops_receipts, list_activity |
| QuickBooks sync now | Covered | trigger_quickbooks_sync |
| Google Calendar sync, CompanyCam link | Covered | trigger_google_calendar_sync, companycam_link_projectCalendar sync reads the key owner's own calendar into Today; counts only. |
| Send a test email or text | Covered | send_test_email, send_test_textOnly to the key issuer's own email or mobile. |
| Recovery tools | Covered | restore_schedules_from_history, scan_summary_scratchpad, wipe_job_summary, scan_missing_profiles, restore_userNeeds Advanced settings and an admin key issuer. The summary scan and wipe are Pezley maintenance only. |
| New clock company switch | Covered | set_new_clockNeeds Advanced settings and an admin key issuer. Off by default; turn on for a test company first. |
| Connect or disconnect QuickBooks, Stripe, Google and other apps | Stays with a person | Your own sign-in to each app. |
| Make, rotate, pause or revoke ops keys | Stays with a person | A key never manages keys. |
| Texting registration and email domain | Stays with a person | Carrier and domain checks. |
| AI automation consent | Stays with a person | Your consent. |
| Subscription billing, deleting the company | Stays with a person | Owner only. |
| Publish Firestore rules | Stays with a person | Run from main by the owner. |
| Face ID lock on the iPhone app | Stays with a person | Account security, set on each phone. |
| Watch or replay the What's new cards | Stays with a person | On-screen help for whoever is signed in; nothing to change. |
| Action | Status | Tools today |
|---|---|---|
| Punch a crew member in or out | Covered | clock_in_user, clock_out_userHub iPad punches land as the same shifts; list_hub_log shows them. |
| Shop duties and low supplies | Covered | list_shop_duties, set_shop_duty_item, set_shop_duty_supplyThe hub iPad saves duty taps as the hub; list_hub_log shows them. |
| Pin or tick crew needs on the hub iPad | Partly | list_crew_needs, add_crew_need, check_off_crew_needRecord only, like the iPad: a tick there saves as the hub or the person who tapped their name and never moves a tool. |
| Tick a job prep item | Covered | complete_checklist |
| Tick a crew list or mark a day step on the hub iPad | Covered | crew_day_steps, tick_crew_list_item, mark_crew_day_stepThe iPad saves each tap as the person who tapped their name; list_hub_log shows it. |
| Record the homeowner walkthrough on the hub iPad | Covered | job_walkthrough, set_walkthroughRecord only. The iPad saves it as the person who tapped their name; list_hub_log shows it. |
| Download a work order | Covered | download_proposal_pdf |
| See hubs and what each hub did | Covered | list_hubs, list_hub_logNeeds Hubs. The activity log needs an admin key issuer. |
| Set up a hub with a one-time code, rename or switch it off | Stays with a person | A setup code is a way into the company, so it stays with a signed-in office or admin person, like invite codes. |
| Enter a hub code on the iPad | Stays with a person | Done on the wall iPad itself; a key can't stand in for the device. |
| Smart home devices | Not yet | In the app for now. |
| Action | Status | Tools today |
|---|---|---|
| Invite a sub | Covered | send_sub_invite |
| Edit a sub's profile for the scheduling assistant | Covered | list_sub_profiles, save_sub_profileNeeds Field ops. |
| Set who OKs dates first and what homeowners see about subs | Covered | set_sub_homeowner_settingsNeeds Field ops. |
| Edit, revoke or remove a sub | Covered | list_sub_companies, edit_sub_company, list_sub_access, revoke_sub_accessNeeds an admin key issuer. Crews and workers stay in the app. |
In Settings → Portal Ops keys, open Scopes for new key and enable Manage settings & pricing (settings-write) before generating the key. For an existing named key, enable the same group and choose Save scopes. This high-impact permission starts unchecked. Explicit Full access includes it; legacy unscoped keys keep their original restrictions.
This permission allows changes to organization settings, product prices, production rates, estimate pricing, contract types, deposits and payment schedules. It applies only to the key's organization. The server checks the permission before writing; no Firestore or Storage rules update is needed to enable it.
| Change | Tool or section |
|---|---|
| Company profile, branding, teams and contract copy | save_settings, section main |
| Contract types, deposit percentages, payment phases, invoice automation and due days | save_settings, section invoice |
| Billable hourly rate, tax, waste and default production rates | save_estimate_settings, or save_settings with section estimate |
| Product library prices and coverage | list_estimate_products / get_estimate_product, then upsert_estimate_product or delete_estimate_product |
| Production-rate library | list_production_rates / get_production_rate, then upsert_production_rate or delete_production_rate |
| Descriptor library, including flat add-on prices | upsert_estimate_descriptor / delete_estimate_descriptor; use the library input schema |
| Other supported settings | save_settings sections companyContact, jobPrepTemplates, mrzProposals, washRoute, scheduleCrewFit, estimateAiPlaybook, clientAiPlaybook |
First call get_settings with a section to read its complete current configuration. Reading a complete section requires this permission too. Then call save_settings with that section and a nonempty patch containing only changed fields. Unrelated settings are preserved. Arguments go in input; top-level orgId must match the key.
{
"action": "exec",
"orgId": "YOUR_ORG_ID",
"toolName": "get_settings",
"input": { "section": "invoice" }
}
{
"action": "exec",
"orgId": "YOUR_ORG_ID",
"toolName": "save_settings",
"input": { "section": "invoice", "patch": { "dueDays": 14 } }
}
Arrays replace the stored array. To edit a contract type, read section invoice and its returned settings.contractTypes, update the intended entry and its paymentScheduleTemplate, and send the complete contractTypes array in the patch, preserving the other entries and their ids. Deposit percentages and contract defaults use the same validation as the Settings screen. For product and production-rate changes, use ids returned by list/get and the existing library tools:
{
"action": "exec",
"orgId": "YOUR_ORG_ID",
"toolName": "upsert_estimate_product",
"input": { "id": "PRODUCT_ID_FROM_LIST", "pricePerUnit": 72 }
}
When the toggle is off: save_settings returns ops-brief-scope-denied; production-rate writes return money-write-blocked; pricing fields on estimate-library/config writes return money-field-blocked. Other scopes do not grant these pricing changes.
Existing ChatGPT / Claude connections: enable the permission on the connection's key in Settings. If the connection returns ops-mcp-consent-stale, disconnect and reconnect through the normal Connect flow to approve the newly enabled tools. Refreshing tool metadata alone does not expand the original consent.
| Rule | Detail |
|---|---|
| Secret | ppops_… in Authorization: Bearer or X-Pezley-Ops-Key (env: PEZLEY_OPS_BRIEF_KEY). |
| Endpoint | POST …/portal-ops-mrz-tool — one action per request (brief, exec, company-state, log). |
orgId | Top-level JSON only; must match the org embedded in the key. Mismatch → org-mismatch. Never pass orgId inside input (stripped server-side). |
| Tool input | toolName + input for exec; schema PortalOpsInput_{toolName} in OpenAPI. |
| Rate limit | 60 req/min per key → 429 rate-limited with retryMs. |
https://pezleyportal.com/mcp with OAuth. Complete the normal Portal consent screen using an administrator-issued key. Never paste a key into chat or a server URL.| Route | Discovery and authorization |
|---|---|
/mcp | Hosted MCP. Root discovery: /.well-known/oauth-protected-resource and /.well-known/oauth-authorization-server. The issuer is https://pezleyportal.com; the resource is https://pezleyportal.com/mcp. Supports estimates:read, mrz, portal:control, and portal:ops:v1. |
/ops-connect | Also routes MCP requests to the hosted MCP handler. Its separate discovery URLs end in /ops-connect: /.well-known/oauth-protected-resource/ops-connect and /.well-known/oauth-authorization-server/ops-connect. Both issuer and resource are https://pezleyportal.com/ops-connect. This one-click Connect flow uses Portal sign-in and selected Ops scope groups, issues a hidden named key, and excludes owner finance and app import. Follow its supplied Connect flow; do not mix its OAuth discovery with the root flow. |
Anonymous initialize / tools/list expose discovery metadata, not organization data or authorization. Both routes share the current MCP handler; its tool authentication challenges point at the root resource metadata. Do not assume the alias has separate tools or rewrite authorization URLs to force a scope.
Two permission layers: every call intersects the current Ops key tools with the original OAuth allowed-tool list, for scoped and full-access keys alike. OAuth scope and the original tool list stay unchanged through refresh. For portal:ops:v1, a missing allowed-tool list fails closed. Narrowing a key takes effect immediately. Widening a key or adding tools such as Home File does not expand an existing grant; complete fresh consent to add access. Rotation or revocation invalidates grants derived from that key. The connection lifetime setting applies to new root-flow connections; existing deadlines remain unchanged.
read_proposal reads one proposal and its estimate snapshot; the morning brief summarizes operations. Neither embeds the organization's full Estimate Library. A missing product or rate in either response does not mean the library is empty.
Use mrz_exec with structured toolName and input. These read calls work with mrz or portal:control OAuth access when the underlying key permits them. Product reads and analyze_rate_book require the proposals-estimates or settings-write key scope; production-rate reads require production-rates or settings-write (or full key access). Pricing changes require settings-write.
mrz_exec({"toolName":"list_estimate_products","input":{}})
mrz_exec({"toolName":"get_estimate_product","input":{"id":"PRODUCT_ID_FROM_LIST"}})
mrz_exec({"toolName":"list_production_rates","input":{}})
mrz_exec({"toolName":"get_production_rate","input":{"id":"RATE_ID_FROM_LIST"}})
mrz_exec({"toolName":"analyze_rate_book","input":{}})
Optional input.query filters list results. Lists return products or rates plus count; get calls return product or rate. Copy IDs from list results. Product documents can contain saved price, coverage and PDS fields; rate documents contain the saved production assumptions. analyze_rate_book returns counts, estimate settings and gap flags, not every library row. Do not invent missing prices, coverage, rates or IDs.
Batch has different consent checks: for these library reads, portal_ops_batch requires portal:ops:v1 through per-operation authorization, even though its outer metadata advertises mrz / portal:control. Likewise, the corresponding ops_ tools require Ops parity consent. A batch authorization error is not evidence of missing library data. Choose ordinary mrz_exec for this workflow from the start; after a denial, resolve consent rather than retrying through another path.
Use my connected Pezley Portal to read the organization's Estimate Library. Inspect the available tool schemas first. Use mrz_exec with structured toolName/input: list_estimate_products, list_production_rates, and analyze_rate_book; use get_estimate_product/get_production_rate with IDs returned by the lists when details are needed. The library is not embedded in read_proposal or the morning brief. Report saved values and missing fields without guessing. Do not modify records. If the app requires reauthorization or denies access, stop dependent calls, show the exact error, and use the normal user consent flow; do not bypass it.
jobId vs PO / estimate numberFirestore ids (e.g. JOB_ID_FROM_LIST) are not the customer-facing PO/quote printed on the PDF. Resolve jobs with list_jobs view: "index" plus search or jobNumber, search_leads, or read_job — match on job name (PO/quote, e.g. QUOTE_NUMBER) and put the person in customerName (job naming).
The HTTP proposal schema supports estimateId or a linked jobId. The direct MCP save_proposal_draft shortcut deliberately requires estimateId. Read the proposal first and use the returned ID; this intentional schema difference alone is not evidence of a stale connector. Inspect the schema of the exact tool you are calling.
create_lead / list_leads / get_leadScope lead-intake (opt-in; not included in leads-crm, business-data, or Full access *). create_lead writes a Sales → Leads CRM row. It dedupes on normalized phone, then name, returns leadId + portalUrl + created/existing, and never texts, emails, or notifies anyone — and never creates an estimate job or appointment. list_leads and get_lead return full website CRM records and linked consent docs (including phone numbers). All three tools share the 10/minute opt-in group rate limit. Ops-key writes still need the Idempotency-Key header.
POST /.netlify/functions/portal-ops-mrz-tool
Authorization: Bearer ppops_…
Idempotency-Key: lead-create-CUSTOMER_PHONE
{
"action": "exec",
"toolName": "create_lead",
"input": {
"name": "Example lead",
"phone": "CUSTOMER_PHONE",
"email": "CUSTOMER_EMAIL",
"address": "CUSTOMER_ADDRESS",
"notes": "Exterior trim — call back after 3pm",
"type": "callback",
"callbackAt": "2026-11-10T15:00:00.000Z"
}
}
set_lead_stageScope lead-stage (opt-in; not included in Full access *). A leads-crm key can edit contact fields with update_lead and cannot change the stage. Legacy unscoped keys do not get this tool. set_job_status changes a job, not the CRM lead.
Send one leadId, a stage that already exists (new, contacted, estimate_scheduled, won, lost, spam, or the same labels such as Lost), and confirm: true. The Idempotency-Key header is required. One lead per request — not a list, and not action: "batch". The call uses the 10/minute opt-in group rate limit. Lost and Spam also retire the unsold estimate, the same path a declined proposal uses. Nothing is emailed or texted.
POST /.netlify/functions/portal-ops-mrz-tool
Authorization: Bearer ppops_…
Idempotency-Key: lead-lost-SYNTHETIC_LEAD_ID
{
"action": "exec",
"toolName": "set_lead_stage",
"input": { "leadId": "SYNTHETIC_LEAD_ID", "stage": "lost", "confirm": true }
}
Proposal sends cannot be included in atomic:true batches (atomic-send-not-supported). Send separately after approval; an email cannot be rolled back.
Use action: "batch" with up to 20 ordered ops[] — counts as one weighted rate-limit request. Typical estimate edit:
{
"action": "batch",
"orgId": "your-org",
"atomic": true,
"ops": [
{ "toolName": "read_proposal", "input": { "estimateId": "…", "view": "scope" } },
{ "toolName": "save_proposal_draft", "input": { "estimateId": "…", "ifVersion": 2, "customerSummary": "…" } }
]
}
view: summary (includes writeVersion). Use scope before patching rooms; full only when needed.save_proposal_draft returns updatedState (default returnView: scope) — skip a verification read_proposal when the write succeeds.download_proposal_pdf returns a short-lived signed URL by default; includeBase64: true only when required. Cache warms in the background after save/send.portal_ops_batch mirrors HTTP batch; tool hints mark reads vs destructive writes.save_proposal_draft / restore_proposal_revision)Every successful write returns writeVersion, changeSummary, and recomputed totals. HTTP responses include X-Request-Id, X-RateLimit-Remaining, and Retry-After on rate limits. Send one stable Idempotency-Key request header for every intentional write, including hosted MCP. Reuse it for retries; a body field alone does not satisfy the required header. Retry retention depends on the tool; durable receipts may outlive 24 hours.
| Control | Field / header | Behavior |
|---|---|---|
| Optimistic lock | ifVersion ← read_proposal → estimate.writeVersion | Optional. Mismatch → HTTP 409, code: version-conflict, plus currentVersion. Omit for legacy callers. |
| Idempotency | Idempotency-Key request header | Required for every key write. Reuse the header for retries; changed intent with the same key conflicts. Body-only keys return 400 idempotency-key-required. |
| Dry run | dryRun: true | Validates patch, returns changeSummary + totals without Firestore write. |
| Revisions | restore_proposal_revision | Each persist snapshots the prior draft under estimates/{id}/revisions (server-only). Restore with revisionId from that history. |
| Strict shape | top-level keys only | Unknown fields → 400 unknown-field with unknownFields. Do not round-trip the full estimate object from read_proposal. |
Scope proposals-draft (or deprecated proposals-estimates) or *. Canonical loop: read_proposal → save_proposal_draft → read_proposal. Patch only fields you intend to change; confirm estimate.totals, room substrates, and line items on the second read.
list_proposals
→
1read_proposal { jobId }
→
2create_estimate
→
3save_proposal_draft
→
4read_proposal
→
5Staff review & send in Portal
SENT estimate: reopen_proposal_draft → edit → read_proposal → send_proposal. See Proposals.
Pending primary sends: request a fresh preview and confirmation, including on same-key retries and old claims. confirm:true alone is refused. The reviewed subject/body/SMS, branding, frozen proposal and recipient are bound through delivery; changed copy needs new approval.
Save a second recipient: read_proposal returns customer.secondaryRecipientEmail. Use set_proposal_secondary_email with one email and the current expectedEmail (empty if absent). An empty email removes it. Saving never sends and preserves the primary customer email.
Send to that second recipient: resend_proposal_email with a matching email and useSecondaryEmail:true. Ops HTTP first returns a read-only preview. Show recipient/content; only after approval repeat with confirm:true, confirmedRecipient and confirmationDigest, using the same send key for retries. The second email is never included automatically. Hosted sends require the selected send scope and fresh connection consent.
SENT estimate, second person: resend_proposal_email with estimateId + one email — emails the same link; nothing on the proposal changes.
SENT estimate: reopen_proposal_draft → edit → read_proposal → preview and confirm the send. Ops keys with Proposals & estimates can preview and explicitly confirm a proposal send; hosted sends require fresh consent and the selected proposals-send grant. See Proposals.
Use a staging draft when you are building or reworking an estimate over several calls and the estimator should approve it before it becomes real. The draft is saved on the server from the first call, so nothing is lost if your session ends or you forget a final save. The real estimate is not touched until push_staged_estimate. Scope proposals-draft. Writes take an Idempotency-Key header like every other write.
stage_estimate_draft
→
2update_staged_estimate
→
3Estimator OKs the mock-up
→
4push_staged_estimate
| Step | What happens |
|---|---|
stage_estimate_draft | Base it on estimateId (a draft), on jobId (its draft, or a blank one), or on nothing. Takes the same fields as save_proposal_draft and reprices with today's rates and products. If a draft is already open for that estimate it is returned (reused:true); pass startNew:true for a second one. estimatorUid picks who gets reminders. |
update_staged_estimate | Edit by draftId; same merge rules as save_proposal_draft. Optional ifDraftVersion lock. Every edit resets the reminder clock. |
get_staged_estimate / list_staged_estimates | Read one draft (totals, rooms, lines) or list open drafts. Each row carries idleDays and nextReminderAt. |
push_staged_estimate | The server recomputes every total and rechecks the rates, products and estimate settings the draft used. If any changed it stops with 409 rates-changed and a rateChanges list: show it to the estimator, then push again with acceptRateChanges:true. It updates the estimate the draft came from (version-gated, with an undo revision) or creates the job's estimate. A retry, with any key, never makes a second estimate (alreadyPushed:true). Never sends to the customer. |
keep_staged_estimate | "Keep working": renews the draft so its reminder starts over. |
discard_staged_estimate | Only when the estimator says so. Needs confirm:true. The draft is marked discarded and kept on file; nothing is deleted. |
Never deleted automatically. After one day untouched, the estimator (or the company's admins when no estimator is set) gets a "Still working on this estimate?" push notification and email, then again at 3 and 7 days, then weekly, during company hours. The Proposals page lists open drafts with Keep working, Push and Discard.
Other push stops (nothing written): base-changed — someone edited the real estimate after staging; read both, then overwriteBaseChanges:true if the estimator agrees. job-required — a draft staged with no job; pass jobId (use create_job first if needed). job-has-draft-estimate — the job gained its own draft meanwhile; pushIntoExisting:true overwrites it.
{ "toolName": "stage_estimate_draft", "input": { "jobId": "job_demo_123", "title": "Sample Den repaint",
"areas": [{ "id": "room_demo_1", "name": "Sample Den", "length": 12, "width": 10, "height": 8,
"substrates": [{ "id": "sub_demo_walls", "productionRateId": "rate_demo_walls", "productId": "prod_demo_eggshell", "coats": 2 }] }] } }
{ "toolName": "push_staged_estimate", "input": { "draftId": "stg_demo_abc" } }
For live phone takeoff with ChatGPT + Portal Ops MCP + Plaud/Granola connectors. Goal: one tool call per spoken instruction — no long silent chains.
read_estimate_handoff with estimateId, jobId, or jobRef. Review prior decisions, unfinished work, linked recordings, and attached note summaries. This works with the proposals-estimates scope.estimate_context once at the start of every conversation (jobRef, today, or YYYY-MM-DD) and keep the result. Scope: full-access key (*); narrower estimate keys use read_estimate_handoff and estimate_snapshot.recordingSearch (window = visit start minus 15 minutes through visit end plus 60 minutes, in America/Chicago and ISO) and keywords (customer last name, street, PO). Use list_recordings to browse the org’s connected Plaud/Granola account and read_recording_transcript to read the speech (follow nextOffset until null). A summary is separate from a transcript; transcriptAvailable:false means speech is unavailable. Then link_recording with estimateId or jobId/jobRef (proposals-estimates or jobs-files). Personal recording accounts are not browsed by these tools.update_estimate call per spoken instruction (preferred over read_proposal → save_proposal_draft → read_proposal). Example: “add a 12 by 14 bedroom, walls and ceiling, two coats.”update_estimate returns compact rooms/lines/colors and recomputed totals.add_estimate_note with what changed, key decisions/assumptions, open questions, and next steps. Keep each note under 1,000 characters. Reuse the same Idempotency-Key header only when retrying that note. The shared Office handoff allows 4,000 characters total and preserves existing notes; if full, ask staff to condense it.Internal only: handoff notes appear to the estimator in Office handoff. They are stored separately from estimates and never included in client proposals, PDFs, share pages, or customer AI. Never paste internal context into customer-facing estimate notes. These tools require proposals-draft (or the deprecated proposals-estimates alias or full access). Existing MCP connections must complete fresh consent to gain newly added tools.
For the note write, send the request header Idempotency-Key: bedroom-handoff-1.
{"action":"exec","orgId":"YOUR_ORG_ID","toolName":"read_estimate_handoff","input":{"jobId":"job-123"}}
{"action":"exec","orgId":"YOUR_ORG_ID","toolName":"add_estimate_note","input":{"jobId":"job-123","note":"Updated bedroom walls and ceiling. Confirm trim sheen before sending."}}
create_estimate vs save_proposal_draft| Tool | Role | Merge semantics |
|---|---|---|
create_estimate |
Mint a blank draft on an existing job (jobId required). Does not create jobs, rooms, or send email. |
If the job already has a draft estimate, returns that draft (reused: true). Non-draft linked estimate → estimate-already-linked. Stale job.estimateId pointing at a missing doc is relinked instead of minting a second blank when the handler can recover. |
save_proposal_draft |
Patch an existing draft (needs estimateId or resolvable jobId). |
Firestore set(..., { merge: true }) with guarded payloads: partial top-level fields; areas[] merged by room id; lineItems / colors merged by row id unless replaceLineItems / replaceColors. Server ignores client totals and recalculates from scope. OpenAPI: PortalOpsInput_save_proposal_draft. |
save_proposal_draft| Intent | Fields (include only what changes) |
|---|---|
| Copy | customerSummary, notes, crewNote, exclusions (exclusions shape) |
| Structured paint colors | colors merge by id; removeColorIds, replaceColors, clearColors — see estimate colors |
| Line items / options | lineItems merge by id; replaceLineItems:true. Flat amount: see the pricing rule |
| Remove line items | removeLineItemIds (line id or descriptorId) — draft only, idempotent; returns removedLineItemIds / lineItemIdsNotFound |
| Change one room or line | patchArea / patchLineItem: { id, ...fields to change }. An unknown room or line id is an error and saves nothing. A substrate id that is missing or not already on that room is substrate-not-found and saves nothing — add a new surface through areas |
| Pricing | hourlyRate, taxRate, discount, wastePercent |
| Base descriptors | descriptorIds / selectedDescriptors / descriptors (merge-add catalog rows) |
| Detach descriptors | removeDescriptorIds / detachDescriptorIds (catalog descriptorId or line id) — draft only; returns removedDescriptorIds / descriptorIdsNotFound |
| Rooms | One areas[] object per room with stable id + changed fields (L×W×H when adding rooms) |
| Remove rooms | removeAreaIds — not areas: [] |
PRICING RULE: price painting and staining through areas[] (substrates with productId, productionRateId, coats) so the crew work order gets hours and materials. Use a flat-priced lineItem only for an add-on such as lift or equipment rental (set flatAddOn:true). Never add a separate paint/stain materials line; materials come from the products on area substrates.
GOOD: areas:[{name:"Living room",length:18,width:15,height:9,substrates:[{name:"Walls",productionRateId,productId,coats:2}]}] plus lineItems:[{name:"Boom lift rental",amount:1200,flatAddOn:true}]. BAD: {name:"Exterior painting",amount:4800} (painting as a flat price, so no crew hours); {name:"Paint and materials",amount:650} or {name:"Duration (5 gal)",amount:450} (separate materials line).
| Code | Meaning |
|---|---|
descriptor-scope-required | upsert_estimate_descriptor was called with an estimate, proposal, job or customer key, or with hours, dimensions, substrates, or rate/product ids. Nothing is written. It edits the shared library only: resend without those keys (scope:"library" does not override them), or use save_proposal_draft for one estimate. price and flatAddOn may be stored for an add-on such as a lift rental. |
substrate-not-found | patchArea named a substrate id that is missing or not on that room. Nothing is saved. Add the surface through areas. |
unknown-field | Response includes allowedFields — the keys the tool accepts. |
| Do not | Why |
|---|---|
areas: [] or lineItems: [] | Probe payloads; server strips dangerous empties — agents must not send them. |
Room patch with substrates: [] | Clears all scope lines on that room unless you intentionally clear with clearSubstrates: true; empty substrates are ignored when existing lines remain. |
replaceDescriptors: true with no ids | Used to wipe descriptors; treated as no-op when it would delete everything. |
Save full read_proposal JSON back | Compact read rows omit builder fields — patch deltas only. |
create_estimate when job already has scope | Reuses draft when linked; do not use as a “reset”. Prefer read_proposal + targeted patches. |
totals-only save_proposal_draft | Does not rebuild missing scope; fix rooms/descriptors first, then verify totals on re-read. |
Partial draft without colors | Safe — omit colors to leave existing rows untouched. |
colors: [] alone | No-op (probe payloads stripped). Use clearColors:true or removeColorIds to delete rows. |
Trimmed colors without replaceColors | Safe — merges by id; rows you omit are kept. Use replaceColors:true only when rewriting the whole section. |
Client-sent totals | Ignored — totals are always recomputed from scope after save. |
| Inventing colors not in estimate text | Builder “Suggest from scope” only extracts mentions (SW/BM codes, known names). Ops/API rows should set source: "ops" when adding manually. |
estimate.colors[])Same field on the Firestore estimate as Estimate Builder → Colors (optional, collapsible). Not the customer share job.colorPlan picker — that stays on set_job_colors after deposit.
| Read | Where |
|---|---|
read_proposal | estimate.colors — rows with areaId, areaName, optional scope, brand, code, name, display, notes, source, optional citation |
read_job | job.estimateColors — same shape when job.estimateId is set |
Write: save_proposal_draft with colors rows (each has a stable id from read_proposal or derived from area+scope+code). Default is merge by id — upsert the rows you send, keep the rest. Remove with removeColorIds; full replace with replaceColors:true; clear all with clearColors:true. colors: [] alone is a no-op. Omit colors on unrelated patches.
source: manual (estimator in builder), ai-extract (text scan — include citation when present), ops (API/automation). Estimate Builder saves the full in-app list with ids — same merge rules apply when rows include stable ids.
Settings asks for extra confirmation when enabling these on a new key. Issue separate keys per automation when possible.
| Scope | Risk | Examples |
|---|---|---|
owner-finance | Owner $ — margin, burden, CFO, bank, job costing | analyze_numbers, save_job_costing |
proposals-estimates | Customer-facing proposals & send | send_proposal, save_proposal_draft |
jobs-files | Job CRUD, uploads, delete files | delete_job_file, upload_job_file |
settings-write | Organization settings, pricing and contract defaults | save_settings, upsert_estimate_product, upsert_production_rate |
crew-clock | Payroll-affecting clock & shifts | clock_in_user, edit_shift |
app-import | Bulk contacts, jobs, estimates, invoices — Import from another app | commit_app_import, undo_app_import |
client-comms-send)Find the conversation with list_messages: email threads carry a threadId, share page questions and messages carry an id and jobId. Every tool that reaches a customer previews first; repeat with confirm:true only after the owner says yes in chat.
reply_email_thread replies inside the customer's email thread, like Reply in the inbox. The preview returns a confirmationDigest; send it back with confirm:true. A changed thread or reply needs a new preview. At most 2 key emails per thread a day, never to an address on the email opt-out list.answer_customer_question and ignore_customer_question are the Reply and Ignore buttons on a share page question. send_share_message posts on the job's share page Messages tab. The homeowner's push notice goes only from the app; they see the answer on their share page.cancel_scheduled_proposal_send cancels a proposal's scheduled send and puts the estimate back to draft.Invoice send times use scope invoices-send: schedule_invoice_send (preview, then confirm:true; 30 seconds to 90 days ahead) and cancel_scheduled_invoice_send. Neither charges a card.
job-record)An opt-in group: Full access leaves it off. Start with read_job_record for the job's Paid mark, products, color plan rooms and color photos, prep sheet and office handoff notes (with their revision). It shows no prices and no photo links. None of these tools reaches a customer by itself.
set_job_paid is the Paid switch in the job's status menu. It needs a key issued by an admin and is refused for time and material jobs. It changes no invoice, payment or schedule.add_job_product, remove_job_product and confirm_job_product work like the job's Products panel. A removed product is remembered so the summary AI does not add it back.relabel_color_photo moves a color photo to another color plan room or changes its color label. delete_color_photo previews first; repeat with confirm:true to delete it. Adding color photos stays in the app.save_office_handoff replaces the staff-only handoff notes. Send the revision you read; a changed note is refused with the current revision so nothing is overwritten. add_estimate_note adds one line instead.save_job_prep_draft saves a prep sheet draft, from your text or a standard prep sheet. publish_job_prep_sheet previews first; with confirm:true the crew sees it and customer visit reminders include it.Archiving a job with set_job_status returns its checked-out tools to the shop, like the app, and the result says how many.
contacts-leads)An opt-in group: Full access leaves it off. These tools add and merge contacts, make Home File links, pause or stop one customer's follow-ups and resend a website lead. None of them emails or texts a customer by itself.
create_contact is Add contact on the Contacts page. It needs a name, email or phone. If that contact is already there it is refused with the existing contactId; change it with update_contact. Marketing consent and Home File access notes are not set here.merge_contacts is Find duplicates then Merge. Only contacts the app would group (same email, phone or full name) can be merged. It previews the kept record and how many jobs move; repeat with confirm:true. The others are archived with mergedInto, and their jobs move to the kept contact.make_home_file_link makes the customer's read-only Home File link, shown once. The customer opens it with a code emailed to the contact. Send it yourself with send_client_email or send_sms, then call mark_home_file_sent so the job's Home File alert clears.list_drip_enrollments lists follow-up enrollments, with names but no phone numbers or emails. pause_drip_enrollment pauses or resumes one. Like the app, both need a key issued by an admin or lead. Resuming previews first and needs confirm:true; a pause the follow-up engine set itself (a reply, a phone waiting on consent) is not lifted by a key. cancel_drip_enrollment previews first and needs a key issued by an admin. To turn a whole sequence off, use update_drip_sequence with enabled:false.resend_lead_to_google and resend_lead_webhook are the lead card's Add to Google Contacts and Resend buttons. Each needs a key issued by an admin, previews first, needs confirm:true, and sends once per Idempotency-Key.Linking a contact to a job is edit_job with contactId. A merged or deleted contact cannot be linked.
estimates-advanced)decline_proposal is Decline estimate in the Estimate Builder, for a sent estimate whose job still has its customer share link on. Without confirm:true it previews the customer, the email address and whether the job will be archived. Confirmed, it marks the estimate declined, archives the job unless it is already in production, moves a linked website lead to Lost, alerts the office and emails the customer the app's "what could we have done better" note. The optional reason is a note for your team and is not in the email. A key can't undo a decline, and it runs once per Idempotency-Key.
owner-finance, invoices-draft)Three invoice actions from the app. Each previews without confirm:true, runs once per Idempotency-Key, and never emails, texts or charges the customer.
save_payment_schedule (owner-finance, admin key issuer) is Save under Payment schedule on a fixed-price job's Invoices tab: 2 to 5 phases, each a percent of the sold price or fixed dollars, with at most one remainder phase. The preview shows each phase's amount. It is refused once any phase has been invoiced and for time-and-material jobs.reopen_voided_invoice (owner-finance, admin key issuer) is Reopen under Voided on the job's Billing panel. The invoice comes back open and held, never sent, for no more than it asked before the void and no more than is left to bill. It is refused when the invoice carries a payment, when another balance invoice is open, or when nothing is left to bill. Send it with send_invoice when ready.link_invoice_estimate (invoices-draft) is Link estimate / Change estimate on the Invoices page: the estimate must be on the invoice's own job, and the invoice then shows that estimate's scope and sold total.Deleting an invoice is not a key action yet; the app only deletes invoices with their job.
scheduling)The app's schedule suggestions are the cards on the Schedule queue: suggested dates, hours, crew lead and crew for a job. A key works the same cards; making new suggestions stays in the app. None of these tools notifies the crew or the customer.
list_schedule_suggestions lists the waiting cards with each job's current schedule and canApply. A card is blocked when the job's dates are locked or its schedule changed since the suggestion was made. It also lists jobs whose key apply can still be undone.apply_schedule_suggestion is Apply on a card. It previews the schedule before and after; with confirm:true it saves the dates, hours, lead and crew, marks the schedule approved and removes the card. A job that starts today or earlier becomes active, as in the app.undo_schedule_suggestion is Undo: it puts back the schedule and crew from before a key's apply, only while nothing else has changed that job's schedule or crew. An Apply made in the app is undone in the app.dismiss_schedule_suggestion is Dismiss: the card goes away and the schedule does not change. The app may suggest that job again the next time someone opens the Schedule queue.Each write needs an Idempotency-Key and confirm:true after the preview. To move a job by hand, use edit_job_schedule.
team-comms and direct-messages)A key speaks in team chat as its owner: the person who created the key, never whoever last changed its settings. Its messages show the owner's name and are marked as a key post, and the owner must still be an active admin or office member. Chats are Company (company), a team (team:<teamId>), a job chat (job-chat:<jobId>) and the owner's own direct messages. Private assistant chats are never read or written. None of these tools sends a push, text or email.
Direct messages have their own switch, direct-messages. It is off by default, Full access does not include it, and only the key's owner can turn it on. If anyone else rotates the key, the switch turns off (the rotate response says directMessagesTurnedOff: true) and the owner turns it back on. Without it, list_direct_messages, send_direct_message and any dm: chat return direct-messages-scope-required. A key made before owners were recorded returns key-owner-unknown for direct messages; issue a new key.
list_team_chat reads the newest messages in one chat: author, text, time, photo and file names, reaction counts, and any assistant card waiting for a decision. list_direct_messages lists the owner's direct message conversations.post_team_message posts to Company, a team or a job chat, and the post now shows in the app's chat. send_direct_message sends a direct message to one active team member in the conversation the owner already has with them, and starts one if there is none.share_photo_in_chat posts a photo that is already on a job (its photoId from list_photos). A photo still waiting for staff approval is refused; new photos go through upload_photo first.react_to_chat_message adds or removes the owner's reaction. delete_chat_message deletes only posts a key made, for everyone; the audit log keeps the deleted text.decline_chat_proposal is Cancel on an assistant card (a summary line, a tool check-in or a tool action). Only an admin owner or the person who asked can decline. To go ahead instead, do the step with its own tool, such as check_in_tool or edit_summary. Multi-step assistant actions stay in the app.Messages the app's chat safety filter would block are refused. Each write except post_team_message previews first and needs an Idempotency-Key and confirm:true. Pinning a chat stays in the app, because pins are each person's own.
people-access and settings-advanced)Both groups are opt-in, and every tool here needs the key's issuer to be an admin, like Admin in the app. A key never pairs, restores or merges an admin account. Each write previews first and needs an Idempotency-Key and confirm:true. Nobody is notified.
list_people_setup reads chat pairs, the three production crews, active people and removed or paused people. It returns no emails or phone numbers.save_chat_pair creates, renames, changes or removes a chat pair (Admin, Teams, Pairs), with people by userId. set_production_crew sets a crew's lead and members by roster name; jobs keep the crews they already have.restore_user brings back a removed or paused person with the role they had. merge_users moves a duplicate person's records onto the one to keep; its preview returns a fingerprint and expiresAt, and the confirm must send both back within 5 minutes. A merge cannot be undone here.set_company_logo replaces the light or dark logo (PNG, JPEG or WebP; padding is not trimmed). It shows in the app, share pages and emails.send_test_email and send_test_text send one [TEST] message to the key issuer's own email or mobile, like Settings, Diagnostics. There is no recipient field, and each is limited to 5 an hour.Stays with a person: a person's own Title access (their live permissions, including money and admin access), making anyone an admin, a full Delete of a person, and invite codes.
email-blasts)Opt-in, and every tool here needs the key's issuer to be an admin, like Email blasts in the app. A blast goes only to contacts who gave marketing consent and have not unsubscribed. Every email carries the company's postal address and an Unsubscribe link, and nobody gets the same blast twice.
list_email_blasts reads each blast's campaignId, subject, status (draft, sending, paused or sent) and counts, plus how many contacts a blast would reach now. It returns no email addresses.save_email_blast saves a new draft (a subject and a plain-text body), like Create in the app. Nothing is sent.send_email_blast previews first: the subject, the body, the audience size and a fingerprint. The confirm sends that fingerprint back with confirm:true; if the subject, body or audience size changed since the preview, the send is refused and needs a new preview. Each confirmed call sends one batch of up to 40. While complete is false, preview again and confirm with a new Idempotency-Key for the next batch; a paused blast says when it can go on (resumeAfterMs).Limits: a key sends to at most 500 contacts (send larger lists from the app), and keys start at most one new blast per company in 24 hours. Finishing a blast that already started does not count. A blast cannot be unsent. Admins get a notice when a key sends one.
Stays with a person: marketing opt-in. Consent has to come from the customer, so no tool marks anyone as opted in.
hubs)Opt-in and read only. A hub is a wall iPad set up with a one-time code from Settings → Hubs (admins) or Profile → Hubs (office). Nobody signs in on a hub, and it can only do hub things.
list_hubs reads each hub's id, name, whether it is on or switched off, when it was set up and last seen, and whose code set it up, plus unused setup codes (who made each and when it expires). It never returns a code. Needs an issuer who can set up hubs: an admin, or office with visit booking or sales access.list_hub_log reads Hub activity, newest first: each entry's kind (read for what a hub loaded, write for what it did, admin for setup changes), action, hub, who it was for and when. Optional hubId, limit (up to 200) and beforeMs (the last page's nextBeforeMs). Needs an admin key issuer.Stays with a person: making a setup code, renaming a hub and switching one off. A code is a way into the company, like an invite code.
code valuesHTTP layer returns { error, code, message?, hint?, toolName?, allowed? }. message says what happened. hint is one sentence the assistant can act on. Full enum: OpenAPI PortalOpsError. Tool-level failures may be 400 with domain codes (e.g. estimate-not-found).
| Code | Typical cause | Fix |
|---|---|---|
ops-brief-scope-denied | Tool not in any enabled scope group | Enable the group in Settings or pick a different tool; check allowed in the response. |
briefing-scope-required | brief / company-state without briefing-read | Add briefing-read to the key. |
finance-scope-required | Numbers / CFO tool without owner-finance | Add owner finance scope or use a non-finance tool. |
numbers-cap-required | Finance read/write when the signed-in user lacks Numbers cap (in-app admin chat path; rare on pure ppops_ flows) | Org admin with Numbers access, or adjust automation to non-finance tools. |
send-blocked | share_proposal / publish_proposal aliases | Save the draft; staff send from Portal. |
proposal-confirmation-stale | Recipient or proposal changed after preview | Read again, show the new recipient/content, and request fresh confirmation. |
money-write-blocked | Production-rate writes without settings-write, or save_job_costing, save_numbers_settings and bank match / reconcile on an ops key | Enable settings-write for production-rate changes. Accounting-book writes remain staff actions. |
money-field-blocked | Contract amount, price, cost, rate, deposit %, tax on add_job / pricing-config writes | Enable settings-write for product, descriptor and estimate-settings pricing. Job money fields remain restricted; remove the fields listed in unknownFields. |
customer-confirmation-required | book_estimate_visit / book_client_visit without customerConfirmed: true | Confirm the time with the customer first, then retry. |
drip-enable-blocked | update_drip_sequence with enabled: true | Edit the sequence; staff turn it on. |
bad-cursor | Data API cursor from another tool or filter set | Restart paging without cursor. |
create-estimate-blocked | persist_takeoff / save_takeoff | create_estimate + save_proposal_draft. |
ops-mcp-consent-stale | Scoped or full-access key allows an action outside this Ops grant's original consent snapshot | Obtain new portal:ops:v1 consent through normal Connect. Refresh tools alone cannot repair consent. |
insufficient_scope | OAuth grant lacks the requested action scope | Follow the normal mcp/www_authenticate challenge. Library reads inside batch request portal:ops:v1. Do not bypass the denial. |
invalid_token / Reconnect Pezley Portal to continue. | Missing or invalid connection token, or changed session identity | Pause dependent calls and reauthorize the app normally. |
invalid_grant | OAuth exchange/refresh grant is invalid, expired, revoked or replayed | Start a fresh supported Connect flow; a tool-metadata refresh is separate. |
New Ops consent is required. / ops-consent-required | Ops grant lacks its allowed-tool list | Complete new explicit Ops consent; never manufacture a grant. |
estimateId or jobId required | PDF/reopen call has no target | Resolve the proposal ID first. For a direct draft shortcut schema error, supply its required estimateId. |
ops-key-paused | An admin paused this key (HTTP 403) | Stop and tell the owner. An admin resumes it in Settings → Portal Ops keys. |
ops-key-expired | The key passed its expiry date (HTTP 401) | Stop and tell the owner. An admin rotates it or sets a new expiry. |
active-admin-or-office-required | The person who made or last re-scoped the key is no longer an active admin | An admin rotates the key in Settings → Portal Ops keys. Do not retry. |
direct-messages-scope-required | A direct message tool or dm: chat on a key without the direct-messages switch | The key's owner turns on direct messages in Settings → Portal Ops keys, or skip direct messages. |
key-owner-unknown / key-owner-not-active | Direct messages on a key made before owners were recorded, or the key's creator is no longer an active admin or office member | Issue a new key from the person the key should speak as. Do not retry. |
ops-key-no-longer-authorized | The key was rotated, revoked or re-scoped after it was checked | Use the current key; re-read scopes with describe. |
ops-writes-paused | An admin paused every key's writes for the org (HTTP 503) | Reads still work. Wait for an admin to resume writes. |
admin-promotion-needs-person / admin-invite-needs-person | Tried to make someone an admin or invite them as admin | A person does it in the app: Settings → Team. |
cannot-change-admin-role / cannot-deactivate-admin / cannot-edit-admin | Tried to change, rename or deactivate a current admin | A person does it in the app: Settings → Team. |
org-mismatch | Body orgId ≠ key org | Pass the correct top-level orgId. |
rate-limited | > 60 req/min on this key | Backoff using retryMs. |
scopes-empty | generate-key with no scopes | Pass explicit scope ids or ["*"]. |
unknown-field | Body used args or another undocumented top-level key | Move tool arguments to input. Remove the unknown field named in message. |
job-not-found | No job for the id that was tried | message includes the identifier. Call list_jobs with view: "index" and search (or jobNumber), then retry with that jobId. |
scheduling)Keys with Scheduling & visits get the same server tools the in-app schedule assistant uses for bars, spots, crew assignment, visits, delays, and shift reads — not a read-only subset. Issue scheduling alone for a schedule bot; add production-rates if the assistant needs rate-book capacity hints.
list_jobs (schedule + spots), read_job, list_crew, list_appointments, scan_shifts / analyze_time_trends for capacity.edit_job_schedule (startDate, endDate, estimatedHours, crewLeadName, notBefore, datesLocked). Shift the end date when you push the start unless you intend to shorten the job.add_spot_assignment / remove_spot_assignment — day-level overlay; does not move the schedule bar.assign_to_job; edit_job with hoursEstimate when planning length (not for arbitrary status edits — use job-status).list_schedule (estimator hours, booked visits, open slots), then book_estimate_visit (booking again moves it), offer_estimate_visit, cancel_estimate_visit, book_client_visit, cancel_client_visit. Book only after the customer confirmed: pass customerConfirmed: true. Booking never emails or texts the customer, and automatic visit reminders stay off unless you pass notifyCustomer: true because you were explicitly asked. When canceling an estimate visit linked to a CRM lead, pass nextLeadStatus: needs_visit (Contacted / Needs visit queue), new, or lost — the lead must not stay on Est. scheduled.post_job_delay (+ optional polish_delay_reason) — customer share + crew cascade.write_schedule_with_ai opens the Write with AI panel in the portal; automations should use edit_job_schedule or visit tools instead.ops-mcp-consent-stale). Clock in/out and Owner $ tools stay off the hosted catalog — not required for scheduling.Estimate drafts use create_estimate (blank draft on an existing job) and save_proposal_draft (rooms, descriptors, pricing, exclusions). Scope proposals-estimates or *. Use the job's Portal jobId, not the printed estimate number. Automations: see AI assistants before editing drafts.
Exclusions are what is NOT included — never stuff them into descriptor description or room notes. OpenAPI documents exclusions as:
{ "text": "…" } (optional id).{
"action": "exec",
"orgId": "your-org-id",
"toolName": "save_proposal_draft",
"input": {
"estimateId": "ESTIMATE_ID",
"exclusions": [
"Soffits and fascia are excluded.",
{ "text": "Moisture repairs behind siding are excluded." }
],
"customerSummary": "Prep and paint main body per scope."
}
}
Typical Hub flow (scope proposals-estimates or *). New blank draft: create_estimate first; existing job: start at read_proposal. See AI assistants.
read_proposal
→
2save_proposal_draft
→
3read_proposal
→
4Staff send in Portal
download_proposal_pdfincludeBase64: false if you only need metadata.reopen_proposal_draftresend_proposal_emailshare_proposal / publish_proposalsend_proposal to email the customer on file.send_proposal with the Send proposals scope. To personalize the email, pass messageOverride with a plain-text subject, body, or both. Portal adds the branded proposal link. Preview the recipient list and message, then confirm after approval.Jobs & files (jobs-files): create_job / add_job, edit_job, uploads, work orders, rename, hours, tasks. Use PO/quote as name — see job naming.
Delays (job-delays): post_job_delay with customer-visible copy; optional polish_delay_reason to tighten wording. Same semantics as crew check-in Delay.
Status & limbo (job-status): set_job_status for active, accepted, limbo, completed, archived; polish_limbo_reason for staff-facing limbo notes; flags for general / T&M jobs per OpenAPI schema.
{
"action": "exec",
"orgId": "your-org-id",
"toolName": "post_job_delay",
"input": {
"jobId": "JOB_ID",
"delayKind": "rain",
"reason": "Storms — crew rescheduled to Thursday."
}
}
The home-file scope (or Full access) grants read_home_file, set_home_file_access, set_home_file_formulas and set_home_file_leftovers. Jobs & files and morning brief scopes do not grant these tools. Gate codes, lockbox details, access notes and pets remain staff-only; these tools do not send or publish a customer Home File.
For formulas or leftovers, pass jobId and the matching row list. A matching row id replaces that row; a new row appends. removeIds removes selected rows, and replace: true replaces the whole list. Rows and parent metadata commit together. Concurrent edits to separate rows survive, and a failed transaction commits nothing. Each job save keeps the existing cap of 60 formulas or 40 leftovers; the response reports dropped overflow rows.
Use items[] for up to 20 jobs. Each job is a separate transaction: a later failure does not undo a job already saved. Prices are stripped from the timeline and row text. Use the supported consent flow if the requested tool is denied; changing a key or refreshing metadata does not upgrade an OAuth scope.
Margin, burden and CFO reads require owner-finance. Job-costing writes require the explicit opt-in job-costing-write grant; invoice drafts and sends have separate invoice grants. Bank tools remain prohibited for every Ops key. Without it, finance tools return 403 with finance-scope-required.
Tools include analyze_numbers, advise_cfo, query_cfo_knowledge, list_cfo_packs, draft_cfo_report, related owner-finance reads — full list under owner-finance in the scope table above and in OpenAPI x-portal-ops-scope-appendix.
owner-finance.
The same importer as Settings → Import from another app, on the Portal Ops key. It reads a PaintScout export (the .tar.gz, or its loose files) or the spreadsheet template CSV, matches it against this org's jobs, contacts, estimates, and invoices, and imports the result as one batch you can undo. DripJobs is coming soon.
Who can call it: keys with the app-import scope (high risk) or Full access, and org-admin ID tokens. One-click Connect (ChatGPT / Claude) cannot grant app-import — issue a manual key. Every write lands in the key's own org; orgId inside input is ignored and a top-level orgId for another org returns org-mismatch.
How to call it: the normal exec (one tool) or batch (ops[]) on portal-ops-mrz-tool. On hosted MCP use mrz_exec with toolName (or portal_ops_batch). There is no separate import endpoint and no ops_ shortcut for these four tools.
| Tool | Kind | What it does |
|---|---|---|
preview_app_import | write | Stages a preview (a write). Does not write contacts, jobs, estimates, or invoices. Input source (paintscout | generic), mode (unresolved-jobs default | sales-history), and one upload: tarGzBase64, files ({ path: text }), or csv. Optional quoteNumbers, recordIds, query, status, maxRows. Returns previewId, complete counts, duplicates, and sample rows / actions. The staged preview lasts 24 hours. Committing it keeps edits made to a matched job after the preview, including customerName. |
commit_app_import | write | Input previewId. Writes the staged preview and returns importBatchId with written / created / updated. |
list_app_import_batches | read | Recent batches (Settings and Portal Ops): importBatchId, status (committed | partial | undone), source, mode, counts, via. Optional limit (default 20, max 50). |
undo_app_import | write | Input importBatchId. Deletes records the batch created. On records it updated, puts back only the fields the import changed, re-read inside a transaction so a payment or punch in that gap is not overwritten. Hours logged after the import (hoursLogged, actualHours) and any other edit made after the import stay. A job with logged hours is left in place (not deleted) and is not set back to estimate (conflicts, reason: "has-hours"). A created invoice whose paidCents, payments, or paidAt differs from what the import wrote is left in place, and so are its job, contact, and estimate (reason: "has-payment"). An updated invoice in that state is left unchanged, including amountCents and contractTotalCents. That job's status stays too, including when the import had moved it off estimate. Changing only the invoice status does not keep the billed amount or the job status, and it is not reported as collected. The undo snapshot stores the invoice paidAt the commit wrote. A money field missing from that snapshot is not treated as a new payment, so a paidAt that was already on the invoice does not keep the billed amount or the previous payment. An invoice this import updated onto a created job is part of the batch, so undo does not call it an extra invoice. With no later payment, that job, its estimate, and its created invoices are removed and the updated invoice is restored. A later payment on that invoice keeps them, and the conflict op is restore. A refund that lowers the amount paid is described as a refund. An extra invoice on a created job says it was added, or that it was paid, matching that invoice. A job whose paidAt differs from the import is left in place too. Contact deletes are sized so the contact read, the jobs query, and the delete commit together. If that step stops after the jobs are already gone, undo resumes and finishes the contacts. Before those deletes, the same transaction reads the job and its shifts again. A punch that lands after the first hours check leaves that job, contact, estimate, and invoice in place (reason: "has-hours"). restored counts records undo actually wrote. A contact shared by several jobs is deleted only after every one of those jobs has been checked, so a payment on a later job keeps the contact. A new invoice on the job, including a deposit, keeps the job and its invoices. A contact that another job outside this batch still uses is left in place. Changing only a payment row does not roll paidCents or status back. Safe to repeat (alreadyUndone). The appImportPreviews rules deny is deploy-later and is not published from this branch. |
{ "action": "batch", "orgId": "your-org-id", "ops": [
{ "toolName": "preview_app_import", "input": { "source": "generic", "csv": "quoteNumber,firstName,…" } }
] }
// review counts + duplicates, then:
{ "action": "exec", "orgId": "your-org-id", "toolName": "commit_app_import", "input": { "previewId": "aip_…" } }
Duplicates: jobs match on the quote number only — never an invoice number, because the two sequences collide. Contacts match on PaintScout contact id, email, or 10-digit phone; estimates and invoices on their PaintScout ids. Each match is listed in duplicates with reason: "already-in-portal" and is updated, not created. Imported ids are stable, so importing the same quote again updates the same records.
Idempotent commit: previewId comes from the org, source, mode, file bytes, and selection. Calling commit_app_import again returns the same importBatchId with alreadyCommitted: true and writes nothing. A commit that stopped partway resumes the same batch: fields edited after the rows it already wrote stay, including a payment's method, check number, and client payment id. The saved undo snapshot is not replaced. Each contact, estimate, job, and invoice is written in its own transaction, so an edit made after the prepare read is not overwritten. A payment or refund that lands after that invoice was read stays, and so do the imported amount, status, and label. The undo snapshot stores what the import meant to write, not that live payment or refund. A job paidAt set in that gap stays on the job and is not stored as the import's paid date. Those payment conflicts are stored on the batch and show up from list_app_import_batches. The commit renews its claim while it reads and writes. It marks the preview committed only while that preview still says committing. If undo wins first, the commit stops and does not set committed. Previewing the same file and selection after a commit returns status: "committed". To import it again, undo that batch first, then preview again.
Limits: upload 4 MB (decoded tar.gz, or UTF-8 bytes of csv / files); a tar.gz may unpack to 32 MB; at most 200 files. A hosted MCP request is capped at 5.5 MB, and base64 adds a third, so send uploads near 4 MB over HTTP exec. preview_app_import, commit_app_import, and undo_app_import each add 5 to the rate-limit weight, on exec or inside batch, so one of them is not weight 1.
customerNotifySuppressed, the plan's sideEffects is always empty, and contacts get marketingConsent: false. Import sends no email or text, starts no drip or seasonal nurture, sends no proposal, and schedules no reminder or follow-up. Upload contents are not written to the Portal Ops activity log.
| Code | Meaning |
|---|---|
import-file-too-large (413) | Upload over 4 MB. |
import-unpacked-too-large (413) | tar.gz unpacks past 32 MB. |
import-input-required / import-too-many-files / import-unreadable | Missing, oversized file list, or unreadable upload. |
bad-source (400) | source must be paintscout or generic. |
bad-mode (400) | mode must be unresolved-jobs or sales-history. |
coming-soon (400) | source: "dripjobs" is recognized and not available yet. |
bad-plan (400) | The file was read but a plan could not be built. |
bad-payload (400) | A staged record failed validation. Run preview_app_import again. |
preview-not-found / preview-expired / preview-not-ready / preview-incomplete | Run preview_app_import again. |
commit-in-progress (409) | Another commit for this preview is running. Retry in a few minutes. Undo returns this too until that commit finishes, from Portal Ops or Settings. |
batch-undone (409) / batch-not-found (404) | The batch was undone, or is not in this org. A commit that notices undo mid-run returns batch-undone and writes nothing further. |
commit-lost (409) | The preview is no longer committing, so the commit stopped. |
Use the PaintScout PO or quote number as the job name (e.g. QUOTE_NUMBER). Put the person's name in customerName and address, phone, and email in contact fields — not as the job title. This keeps dispatch, crew, and integrations aligned.
Read-only, org-scoped data tools for assistants. Every call goes through exec / batch on the same endpoint and the same rate limit (60 requests / minute per key). Scope business-data covers most non-money records; CRM list_leads / get_lead need opt-in lead-intake; invoice reads need invoices-draft or owner-finance; costing reads need job-costing-write or owner-finance; payment reads need owner-finance.
| Resource | Tools |
|---|---|
| Leads (full record, attribution, form answers, status history) | list_leads, get_lead (scope lead-intake) |
| Customers + history | list_contacts, get_contact |
| Proposals / estimates (drafts, line items, prices, viewed / signed events) | list_estimates, get_estimate |
| Invoices & payments (Stripe + offline) — owner-finance | list_invoices, get_invoice, list_payments |
| Estimator calendars, open slots, booked visits | list_schedule |
| Jobs / production, crew, dates, check-ins | list_production, get_job_production |
| One job's customer activity (views, time on page, sent, accepted, paid, scheduling, share visits) | get_job_activity |
| Photos with who / when / room / caption / approval | list_photos |
| Every customer email + text with delivery status | list_messages |
| Follow-ups: drip enrollments, queued sends, texting consent | list_followups |
| Staff roster, roles, titles, permissions | list_staff |
| Shifts, clock-ins, PTO | list_hours |
| Job costing: supplier invoices, materials — owner-finance | list_job_costs |
| Colors & products per job | list_job_colors |
| Reviews & referrals | list_reviews_referrals |
| Settings reads: contract types, deposit %, rates, catalog | get_settings; settings-write adds complete-section reads and settings edits |
| Activity / audit log | list_activity |
Paging & filters (all list tools): limit (max 200), cursor (pass back nextCursor), sinceMs / untilMs (or ISO since / until), jobId, contactId, customer (name / email / phone text), and status where it applies. Secrets (key hashes, API keys, push tokens) are never returned. Pay rates, margin and burden are removed unless the key has owner-finance.
{
"action": "exec",
"orgId": "your-org-id",
"toolName": "list_messages",
"input": { "contactId": "CONTACT_ID", "sinceMs": 1760000000000, "limit": 50 }
}
photos)upload_photo attaches a base64 image (JPEG, PNG, WebP, GIF, HEIC; 12 MB max) to a job or estimate (areaId / substrateId place it on the proposal once approved). save_annotated_photo saves an AI markup as a new linked photo (parentPhotoId / parentStoragePath); the original is never changed. Every assistant photo starts approval.status: "pending" and is hidden from the customer share page, proposal, PDF, portfolio and share Ask until that photo is approved in Portal or explicitly selected through the separately granted approve_photos action. Approval uses the existing admin, estimator or office photo permission; only an active admin can remove approval. Private bytes stay token-free; approval creates a fresh immutable public copy for that job. Link an unattached estimate to a job before approval. download_photo returns a short-lived staff URL and optional base64. list_pending_share_photos lists pending records. annotate_photo uses the same new-linked-photo writer as save_annotated_photo. Existing MCP grants need fresh consent to gain the new tools.
webhooks)create_webhook with a public https URL and events from lead.created, customer.replied, proposal.viewed, proposal.signed, payment.received. The signing secret is returned once. Each POST carries X-Pezley-Event, X-Pezley-Delivery and X-Pezley-Signature: t=<unix>,v1=<hex> where v1 = HMAC-SHA256(secret, t + "." + rawBody). Bodies carry record ids only (leadId, jobId, contactId, estimateId, invoiceId, …) — read details with the data tools. Failed deliveries retry with backoff (up to 6 attempts). list_webhooks / delete_webhook manage subscriptions (max 10 per org).
notifyCustomer: true, drips cannot be turned on, and assistant-created leads are not enrolled in drips.settings-write permission allows organization product prices, production rates, estimate pricing, contract defaults, deposits and tax settings. Without it, those pricing changes remain blocked. Job money fields and accounting-book writes keep their existing restrictions. Keys cannot charge customers. Proposal draft pricing remains allowed.photos-approve grant may call approve_photos with one jobId and explicit photoIds. A current admin/office issuer is required; upload-only and legacy unscoped keys cannot approve. Revocation remains a signed-in staff action.persist_takeoff / save_takeoff are blocked. Create a draft with create_estimate, then edit rooms with save_proposal_draft.app-import. Use a manual key with that scope — see Import from another app.create_estimate_product (hosted MCP: ops_create_estimate_product) adds one product to the authenticated org library. Requires the existing Settings & pricing grant or explicit Full access and a currently active admin issuer. No id, tenant selector, update or delete. Existing MCP connections must have consented to this tool.
Supply the authorized name, pricePerUnit ($/gal, nonnegative cents) and coveragePerUnit (positive sqft/gal). Never invent price or coverage. Optional catalog fields and exact validation bounds are in the tool schema and OpenAPI. Unit is gal.
Use one stable Idempotency-Key request header per intentional addition, including hosted MCP. An optional input.idempotencyKey must match the header and never replaces it. Identical retries return the original product/id. Different fields with the same key conflict. A new key intentionally adds a separate row, including a same-name product; list first to avoid an unintended duplicate. The tool never overwrites an existing row. See docs/OPS_BRIEF_API.md for audit and release details.
Your organization controls who receives a Portal Ops key and which scopes each key has. Anyone holding the secret can perform every action allowed by those scopes for your org.
Pezley is not responsible for how external assistants, automations, or third parties use a key, or for data they read or write through it. Issuing a key means you accept that risk for your organization.
Org admins manage keys under Settings → Portal Ops keys at pezleyportal.com.