Why contracts come first
The tools are the only way the advisory and documentation components can touch travel systems. Their contracts are the stable layer: the Microsoft Foundry build and the LangGraph build both call the same operations, and the evaluation set checks the same arguments. A strict contract makes the system testable and limits what a manipulated model can do.
- Arguments are typed, bounded and validated by the travel gateway, never trusted from the model.
- Every tool declares whether it changes anything, whether it is safe to retry and what scope it needs.
- AI-facing tools can read counts and draft. Sending a custom message, requesting assistance, stopping travel, evacuating and closing an incident are acts of a named duty officer.
- No tool, and no path from any tool, can read an exact location, send a message or change a rule.
The tool catalogue
| Tool | Purpose | Changes data | Safe to retry | Scope | Needs approval |
|---|---|---|---|---|---|
| get_incident_summary | Read incident facts with no names or locations | No | Yes | incident.read | No |
| get_incident_status | Read muster counts and status | No | Yes | muster.read | No |
| get_event_details | Read a risk event's area, time and source | No | Yes | event.read | No |
| get_trip_counts | Read counts of travelers by country and day | No | Yes | trips.read | No |
| search_policies | Retrieve policies and templates with citation and version | No | Yes | knowledge.read | No |
| propose_severity | Record an advisory severity assessment | Yes, a proposal only | Yes, by key | severity.propose | The duty officer decides |
| draft_incident_report | Create a draft incident report from structured facts | Yes, a draft only | Yes, by key | report.draft | The officer signs before filing |
| draft_traveler_guidance | Create draft guidance text for review | Yes, a draft only | Yes, by key | guidance.draft | The officer approves before any use |
| draft_lessons | Create a draft lessons-learned note | Yes, a draft only | Yes, by key | lessons.draft | The security director reviews |
| file_report | File a report to the record | Yes | Yes, by key | report.file | Signature required; not callable by AI |
| send_custom_alert | Send non-template text to travelers | Yes | Yes, by key | alert.custom | Officer approval; not callable by AI |
| close_incident | Close an incident | Yes | Yes, by key | incident.close | Officer only, blocked while travelers are unresolved; not callable by AI |
An operation, in OpenAPI
Proposing a severity is the most consequential AI-facing write, and it is only a proposal. The operation requires an idempotency key, model version, uncertainty and evidence, and refuses anything that looks like a traveler list, a message or a decision.
openapi: 3.1.0
info: { title: Travel duty of care tools, version: 1.2.0 }
paths:
/incidents/{incident_id}/severity-proposals:
post:
operationId: propose_severity
summary: Record an advisory severity assessment. A proposal only: it sends nothing, closes nothing and cannot name travelers.
parameters:
- { name: incident_id, in: path, required: true, schema: { type: string } }
- { name: Idempotency-Key, in: header, required: true, schema: { type: string, minLength: 16 } }
requestBody:
required: true
content:
application/json:
schema:
type: object
required: [model_version, severity, uncertainty, evidence]
properties:
model_version: { type: string }
severity: { type: string, enum: [low, medium, high, critical] }
uncertainty: { type: number, minimum: 0, maximum: 1 }
evidence: { type: array, description: Pointers to the event records and sources used, items: { type: string } }
responses:
"201": { description: Recorded as advice for the duty officer }
"200": { description: Same Idempotency-Key replayed; returns the original proposal }
"422": { description: Missing uncertainty, or an attempt to include travelers, messages or decisions }
"403": { description: Caller scope failed }A read tool, as an MCP definition
The platform sees tools through the Model Context Protocol. The definition repeats the constraints that matter: required fields, an enumerated list of what to include, no names or locations and read-only hints.
{
"name": "get_incident_status",
"description": "Read an incident's muster counts and status. Read only. No names and no locations.",
"inputSchema": {
"type": "object",
"required": ["incident_id"],
"properties": {
"incident_id": { "type": "string" },
"include": { "type": "array", "maxItems": 3,
"items": { "enum": ["status", "muster_counts", "open_count"] } }
}
},
"annotations": { "readOnlyHint": true, "idempotentHint": true }
}Error model
| Code | Meaning | What the platform does |
|---|---|---|
| invalid_argument | A field failed validation | Route to an officer with the reason; never retry unchanged |
| not_found | Incident, event or report unknown | Check the identifier; do not guess |
| conflict | A report already signed or filed, or an incident closed | Re-read state; never overwrite a signed record |
| forbidden | Scope or signature check failed | Do not retry; route to a person; raise a security event |
| rate_limited | Too many calls | Back off, then queue |
| unavailable | Backend down or timed out | Retry once with the same key, then fall back to manual documentation |
Rules every tool follows
Idempotency
Every write takes an idempotency key. A replay returns the original result and never creates a second one.
Propose, never decide
AI-facing writes create proposals and drafts. Sending, closing, filing and approving are acts of a named person with strong authentication.
Uncertainty always
A proposal without a stated uncertainty and its evidence is refused.
Versioning
Contracts are versioned. A breaking change is a new major version, run side by side until the evaluation set passes on it.
Audit
Each call writes an audit record with the arguments hash, the caller, the model version, the outcome and the trace identifier.
Contract tests
- Every tool definition validates against the schema and has an owner, a scope and a retry rule.
- Property tests send out-of-range, oversized and malformed arguments and expect invalid_argument, never a partial write.
- A replay test sends each write twice with the same key and expects one result.
- A reachability test proves that no AI-facing credential or route can reach the register's exact locations, the alert engine or the communications service.
- The Foundry build and the LangGraph build run the same contract suite against a mock backend.
Build this for your business
This example is speculative, but the same pattern, minimal and consented data, deterministic rules for every safety duty, a governed gateway, runtime security, advisory-only AI and accountable people, fits any service that looks after people. We can scope a pilot on your own systems.
Book a discovery call