---
name: docstral
description: Mandatory for code work or questions about code when the project contains or depends on a Mistral-made SDK or package (the most popular one being workflows). Use for implementation, debugging, inspection, review, and explanation. Do not use for non-code tasks.
---

# Docstral

Docstral is mandatory for code work and questions about code when the project contains or depends on a Mistral-made SDK or package. This includes writing, editing, debugging, inspecting, reviewing, and explaining code.

Do not invoke it for non-code tasks such as README or documentation-only edits, or for projects without Mistral dependencies.

1. If the Docstral MCP tools are unavailable, warn the user and ask them to install Docstral with:
   `curl -fsSL https://docstral-mcp.solutions.mistralsol.com/install.sh | sh`
2. Call `list_docs` as the first tool action before working on code or answering a question about code.
3. Select the matching package and language when one exists.
4. If the project targets a specific release, call `list_versions` and use that exact documented version.
5. Call `fetch_doc` with the selected package, language, and version.
6. Read the returned section table and call `fetch_doc_section` for any task-relevant sections.

False-positive `list_docs` calls are expected and acceptable. Missing Docstral on a relevant task is not. If it has no relevant package, continue normally. When documentation exists, use it as the authority for imports, signatures, and examples.
