Multi-server MCP implementation for Order-to-Cash process automation with ERP and CRM integration
Strong foundation with explicit tool annotations, comprehensive parameter descriptions, and clear error handling patterns. All 8 tools have descriptions (avg 180 chars, within baseline 194). Input schemas are fully typed with enums where appropriate (e.g., DealStatus in update_deal). Tool names follow verb_noun convention (get_*, create_*, update_*, check_*). However, output schemas are not explicitly documented in the visible code, only inferred from return types (DealDto, CreateCustomerResponse, etc.). Parameter descriptions are detailed and include constraints (max lengths, formats, examples). Error handling is structured via ToolException with error codes (NOT_FOUND, CONFLICT, ValidationError). Idempotency is declared via McpServerTool attributes. Main gaps: no documented output field mappings, no pagination support for list-like operations, and no recovery guidance in error messages.
Verifica se uno SKU è disponibile per una quantità. available è true se la giacenza libera (onHand meno le quantità già riservate da altri ordini) copre la quantità richiesta; onHand è la giacenza fisica, leadTimeDays i giorni di riassortimento. SKU inesistente in ERP: errore NOT_FOUND.
Crea un cliente nell'anagrafica ERP e restituisce { customerId }. Usarlo solo dopo aver verificato con get_customer che il cliente non esista: una partita IVA già registrata dà errore CONFLICT.
Crea un ordine di vendita nell'ERP e riserva lo stock delle righe. Operazione sensibile. Le righe usano il prezzo unitario del deal. Con la stessa idempotencyKey restituisce l'ordine già creato invece di crearne un secondo. status è Confirmed se tutte le righe erano disponibili, altrimenti Backorder. Cliente o SKU inesistenti: errore NOT_FOUND.
Legge l'anagrafica di un'azienda del CRM (nome, partita IVA, email, indirizzo) dato il companyId del deal. Azienda inesistente: errore NOT_FOUND.
Cerca un cliente nell'anagrafica ERP per partita IVA oppure per email: fornire almeno uno dei due (se ci sono entrambi vale prima la partita IVA). Restituisce { customer }: customer è null se il cliente non esiste, e non è un errore. isBlocked = true indica un cliente bloccato.
Output schemas not explicitly documented. Return types (DealDto, CreateCustomerResponse, StockCheckDto) are inferred from C# method signatures but not exposed as JSON Schema in tool definitions. LLMs cannot reliably predict response structure without explicit schema documentation.
Error messages lack recovery guidance. ToolException returns error codes (NOT_FOUND, CONFLICT, ValidationError) but does not suggest next steps. E.g., 'Deal D-1001 not found' should suggest 'Call get_deal with a valid dealId or list_deals to discover available deals.'
Inferred effective spec: 2025-06-18+.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-23 | C | 60 | 2025-06-18+ | v2 |
Legge un deal del CRM: nome, importo, valuta, stage, azienda (companyId), righe (sku, quantity, unitPrice) e revision. revision cresce solo con le modifiche commerciali del deal. Deal inesistente: errore NOT_FOUND.
Legge un ordine ERP completo di righe dato l'orderId (GUID restituito da create_order). Ordine inesistente: errore NOT_FOUND.
Scrive sul deal lo stato del processo Order-to-Cash, il numero dell'ordine ERP se creato e una nota; ogni chiamata aggiunge una voce allo storico del deal e non modifica revision. Restituisce { ok }. Deal inesistente: errore NOT_FOUND.
No pagination support for multi-item results. create_order accepts 'lines' array (1-100 items) but no limit/offset or cursor mechanism. If deals or orders scale, list operations will blow context windows.
Destructive operations (create_order, update_deal) lack dry-run or confirmation step. Agents can accidentally create duplicate orders or update deal status without verification. IdempotencyKey mitigates create_order but update_deal is non-idempotent.
Parameter 'lines' in create_order uses nested object schema but no explicit validation of unitPrice decimal places (max 2) is visible in the schema definition, only in description. JSON Schema should enforce this via pattern or multipleOf.