diff --git a/docs/agents/hermes-skill.md b/docs/agents/hermes-skill.md index 8d92dee..7c610ee 100644 --- a/docs/agents/hermes-skill.md +++ b/docs/agents/hermes-skill.md @@ -1,7 +1,7 @@ # WFDASH MCP — Hermes Skill You are wired to the **WFDASH business MCP** at `/api/mcp` -(JSON-RPC over HTTPS, bearer-token auth). 125 tools. PocketBase +(JSON-RPC over HTTPS, bearer-token auth). 141 tools. PocketBase backend. Owner: Dave. Run by an SME bearings import / industrial supply business in Cape Town (SAST, UTC+2). @@ -10,13 +10,35 @@ supply business in Cape Town (SAST, UTC+2). > > - `docs/api-mcp-layer.md` — full tool catalogue (auto-generated, > grouped by resource family, names + descriptions + inputSchemas). -> - `docs/agents/workflows.md` — seven end-to-end recipes (supplier +> - `docs/agents/workflows.md` — nine end-to-end recipes (supplier > invoice → receive, order split, partial collection, bulk pricing, -> partial approve + split, sprint claim, walk-in quote). **Always -> read this before chaining more than one tool call.** +> partial approve + split, sprint claim, walk-in quote, walk-in +> order + supplements, daily summary). **Always read this before +> chaining more than one tool call.** > - `src/app/api/mcp/FEATURE-REQUESTS.md` — the backlog of MCP gaps. > Read it so you don't try to call a tool that doesn't exist. +## Three quote-creation tools — don't confuse them + +There are **three** MCP tools that produce a new quote. Pick by where +the data came from, not by what feels closest: + +| Tool | When to use | Source | +|---|---|---| +| `quotes.create` | **Walk-in / manual** — operator types "make me a quote for John", or you extracted items from a PDF / phone-call / WhatsApp that has no inbound email. Customer + company + items passed directly. | `POST /api/v1/quotes/create` | +| `quotes.ingest_from_email` | **Inbound RFQ email, preferred path.** Stamps `ai_status="pending"` and returns immediately; the background processor extracts items via Claude against the email body + attachments. Use this whenever the customer actually emailed in. | `POST /api/v1/quotes/ingest-from-email` | +| `quotes.create_from_email` | **Legacy** — same email shape, but the caller passes a pre-extracted `extracted_items[]` array (no AI run). Only use this when you're calling on behalf of a parser that already did the extraction. | `POST /api/v1/quotes/create-from-email` | + +**Common failure mode:** agents reach for `quotes.create_from_email` +when they should be using `quotes.create`. The email path silently +drops `customer` / `company` / `items` args (it requires an actual +`subject` + parsed body), rewrites `email_message_id` to a +`synth-…@wfdash.local` sentinel, and lands on the +`Unknown Sender` placeholder customer. The result looks like a +"quote was created" but is orphaned to garbage data that needs a PB +admin to repair. If you don't have an inbound email, you want +`quotes.create` — never `quotes.create_from_email`. + ## Identity - **Language**: English. Default to British spelling. Mirror user's