From mistral-mcp
Triggers and monitors deployed Mistral Workflows for contract review, polls status, detects human-in-the-loop checkpoints via workflow_interact query, collects user input, and resumes execution. Use for AI-powered contract analysis with oversight.
How this skill is triggered — by the user, by Claude, or both
Slash command
/mistral-mcp:contract-review-workflowThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Orchestrates a deployed Mistral Workflow for contract review. Detects `wait_for_input()` human-in-the-loop checkpoints by querying a status handler, presents findings to the user, and resumes the workflow with their decision via `workflow_interact(action: "signal")`.
Orchestrates a deployed Mistral Workflow for contract review. Detects wait_for_input() human-in-the-loop checkpoints by querying a status handler, presents findings to the user, and resumes the workflow with their decision via workflow_interact(action: "signal").
Profile note: workflow_execute, workflow_status, and workflow_interact are available in the core profile (default). files_upload (for local PDF upload) requires MISTRAL_MCP_PROFILE=full.
Why workflows vs direct API: the workflow runs durably on Mistral's infrastructure — it persists across restarts, handles retries, and can run multi-step analysis (OCR → clause extraction → legal DB lookup → risk scoring) without keeping a connection open.
The name field in workflow_interact calls (signal handler, query handler) is defined by the deployed workflow. Ask the user for:
"get_checkpoint")"human_approval")Defaults used in the examples below — replace with the actual names from the workflow.
Ask the user for:
workflowIdentifier — the deployed workflow name or ID (visible in mistral://workflows)file_id (from files_upload, requires full profile) or a public URLreview_type (e.g. "vendor", "employment", "partnership") and language ("fr" or "en")Call workflow_execute:
{
"workflowIdentifier": "<workflow name or ID>",
"input": {
"document_id": "<file_id, or omit if using document_url>",
"document_url": "<URL, or omit if using file_id>",
"review_type": "<vendor|employment|partnership|other>",
"language": "fr"
}
}
Note the structuredContent.execution_id. Confirm to the user: "Workflow started — execution ID: <execution_id>."
Loop:
workflow_status with { "executionId": "<execution_id>" }structuredContent.status:
COMPLETED → go to Step 5FAILED / CANCELED / TIMED_OUT → surface structuredContent.result and stopRUNNING → probe for checkpoint (see below), then wait ~10 secondsWhile RUNNING, query the checkpoint handler to detect if the workflow is waiting for human input:
{
"executionId": "<execution_id>",
"action": "query",
"name": "get_checkpoint"
}
If structuredContent.result is non-null and contains checkpoint data (e.g. { "waiting": true, "data": {...} }), proceed to Step 4.
If no checkpoint or result is null, show a progress update and continue polling.
When a checkpoint is detected:
Display the checkpoint findings from the query result:
⏸ CHECKPOINT — Human review required
──────────────────────────────────────
[findings from query result.data — risk summary, flagged clauses, etc.]
Ask the user: "Approve and continue / Request changes?"
If approved, signal the workflow:
{
"executionId": "<execution_id>",
"action": "signal",
"name": "human_approval",
"input": { "approved": true }
}
If changes requested, capture the user's comment and signal:
{
"executionId": "<execution_id>",
"action": "signal",
"name": "human_approval",
"input": { "approved": false, "comment": "<user comment>" }
}
Return to Step 3 after signaling. A workflow may have multiple checkpoints.
When status === "COMPLETED", format structuredContent.result as a structured contract review:
✅ CONTRACT REVIEW COMPLETE
─────────────────────────────
Execution: <execution_id>
Overall risk: [level from result]
KEY FINDINGS
[structured list from result]
RECOMMENDED ACTIONS
[list from result]
Offer to pass the output to /mistral-mcp:contract-analyzer for a complementary stateless view, or to french_legal_summary for a plain-language summary.
Guides creation, editing, and verification of skills for AI coding agents using test-driven development with subagent scenarios. Use when authoring or debugging skills.
npx claudepluginhub swih/mistral-mcp --plugin mistral-mcp