Skip to main content
Glama
Swih

Mistral MCP — Document Extraction

by Swih

Mistral chat completion

mistral_chat
Read-only

Generate Mistral chat completions from role-based messages for drafting, code review, or low-latency classification; returns assistant text and token usage.

Instructions

Generate a chat completion using a Mistral model.

When to use:

  • Drafting French (or any European-language) content where Mistral shines.

  • Codestral for code-specific generation/review.

  • Ministral for cheap / low-latency classification.

Returns structured content with the assistant text and token usage. Does NOT stream — use mistral_chat_stream for long outputs with progress updates.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
seedNoRandom seed for deterministic sampling. Maps to Mistral's `random_seed`.
modelNoChat model. Default: mistral-medium-latest (override with MISTRAL_DEFAULT_MODEL).
top_pNoNucleus sampling probability mass: 0.1 considers tokens in the top 10% of probability mass. Prefer adjusting this or temperature, not both.
messagesYesChat messages in role/content form.
max_tokensNoMaximum number of tokens to generate. Input tokens plus this limit must fit within the model's context length.
temperatureNoSampling temperature: higher values make output more random; lower values make it more focused. Prefer adjusting this or top_p, not both.
response_formatNoForce a structured output: `{type:"json_object"}` for JSON mode, `{type:"json_schema", json_schema:{...}}` for strict schema mode.
reasoning_effortNoReasoning effort; supported values depend on the selected model.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
textYes
modelYes
usageNo
finish_reasonNo
reasoning_contentNoReasoning trace returned by Magistral models. Absent for non-reasoning models.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed19 schema fields changedv0.8.3
    • changedInput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
    • removedInput schema / additionalProperties
      Removed value: -false
    • addedInput schema / properties / max_tokens / description
      Added value: +"Maximum number of tokens to generate. Input tokens plus this limit must fit within the model's context length."
    • addedInput schema / properties / max_tokens / maximum
      Added value: +9007199254740991
    • removedInput schema / properties / messages / items / additionalProperties
      Removed value: -false
    • addedInput schema / properties / messages / items / properties / content / description
      Added value: +"Text of the message."
    • addedInput schema / properties / messages / items / properties / role / description
      Added value: +"Message author: system for instructions, user for requests, or assistant for prior replies."
    • changedInput schema / properties / model / description
      Previous value: -"Mistral chat model alias. Allowed: mistral-large-latest, mistral-medium-latest, mistral-small-latest, ministral-3b-latest, ministral-8b-latest, ministral-14b-latest, magistral-medium-latest, magistral-small-latest, devstral-latest, devstral-small-latest, codestral-latest, voxtral-small-latest. Default: mistral-medium-latest."New value: +"Chat model. Default: mistral-medium-latest (override with MISTRAL_DEFAULT_MODEL)."
    • removedInput schema / properties / model / enum
      Removed value: -[
      -  "mistral-large-latest",
      -  "mistral-medium-latest",
      -  "mistral-small-latest",
      -  "ministral-3b-latest",
      -  "ministral-8b-latest",
      -  "ministral-14b-latest",
      -  "magistral-medium-latest",
      -  "magistral-small-latest",
      -  "devstral-latest",
      -  "devstral-small-latest",
      -  "codestral-latest",
      -  "voxtral-small-latest"
      -]
    • addedInput schema / properties / model / maxLength
      Added value: +200
    • addedInput schema / properties / model / minLength
      Added value: +1
    • changedInput schema / properties / reasoning_effort / description
      Previous value: -"Controls reasoning depth for Magistral models. 'high' enables full chain-of-thought; 'none' disables it. Ignored on non-reasoning models."New value: +"Reasoning effort; supported values depend on the selected model."
    • changedInput schema / properties / reasoning_effort / enum
      Previous value: -[
      -  "none",
      -  "high"
      -]New value: +[
      +  "none",
      +  "minimal",
      +  "low",
      +  "medium",
      +  "high",
      +  "xhigh"
      +]
    • changedInput schema / properties / response_format / anyOf
      Previous value: -[
      -  {
      -    "additionalProperties": false,
      -    "properties": {
      -      "type": {
      -        "const": "text",
      -        "type": "string"
      -      }
      -    },
      -    "required": [
      -      "type"
      -    ],
      -    "type": "object"
      -  },
      -  {
      -    "additionalProperties": false,
      -    "properties": {
      -      "type": {
      -        "const": "json_object",
      -        "type": "string"
      -      }
      -    },
      -    "required": [
      -      "type"
      -    ],
      -    "type": "object"
      -  },
      -  {
      -    "additionalProperties": false,
      -    "properties": {
      -      "json_schema": {
      -        "additionalProperties": false,
      -        "properties": {
      -          "description": {
      -            "type": "string"
      -          },
      -          "name": {
      -            "description": "Identifier for the schema; surfaced in API errors.",
      -            "maxLength": 64,
      -            "minLength": 1,
      -            "type": "string"
      -          },
      -          "schema": {
      -            "additionalProperties": {},
      -            "description": "JSON Schema object the response must conform to.",
      -            "type": "object"
      -          },
      -          "strict": {
      -            "description": "If true, the API rejects responses that do not strictly match the schema.",
      -            "type": "boolean"
      -          }
      -        },
      -        "required": [
      -          "name",
      -          "schema"
      -        ],
      -        "type": "object"
      -      },
      -      "type": {
      -        "const": "json_schema",
      -        "type": "string"
      -      }
      -    },
      -    "required": [
      -      "type",
      -      "json_schema"
      -    ],
      -    "type": "object"
      -  }
      -]New value: +[
      +  {
      +    "properties": {
      +      "type": {
      +        "const": "text",
      +        "description": "Generate plain text without a JSON format constraint.",
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "type"
      +    ],
      +    "type": "object"
      +  },
      +  {
      +    "properties": {
      +      "type": {
      +        "const": "json_object",
      +        "description": "Generate JSON. Also instruct the model to produce JSON in a system or user message.",
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "type"
      +    ],
      +    "type": "object"
      +  },
      +  {
      +    "properties": {
      +      "json_schema": {
      +        "description": "Named JSON Schema and optional strictness for the generated response.",
      +        "properties": {
      +          "description": {
      +            "description": "Description of the response the schema defines.",
      +            "type": "string"
      +          },
      +          "name": {
      +            "description": "Identifier for the schema; surfaced in API errors.",
      +            "maxLength": 64,
      +            "minLength": 1,
      +            "type": "string"
      +          },
      +          "schema": {
      +            "additionalProperties": {},
      +            "description": "JSON Schema object the response must conform to.",
      +            "propertyNames": {
      +              "type": "string"
      +            },
      +            "type": "object"
      +          },
      +          "strict": {
      +            "description": "If true, the API rejects responses that do not strictly match the schema.",
      +            "type": "boolean"
      +          }
      +        },
      +        "required": [
      +          "name",
      +          "schema"
      +        ],
      +        "type": "object"
      +      },
      +      "type": {
      +        "const": "json_schema",
      +        "description": "Generate JSON conforming to the supplied json_schema.",
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "type",
      +      "json_schema"
      +    ],
      +    "type": "object"
      +  }
      +]
    • addedInput schema / properties / seed / maximum
      Added value: +9007199254740991
    • addedInput schema / properties / seed / minimum
      Added value: +-9007199254740991
    • addedInput schema / properties / temperature / description
      Added value: +"Sampling temperature: higher values make output more random; lower values make it more focused. Prefer adjusting this or top_p, not both."
    • addedInput schema / properties / top_p / description
      Added value: +"Nucleus sampling probability mass: 0.1 considers tokens in the top 10% of probability mass. Prefer adjusting this or temperature, not both."
    • changedOutput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
  2. Changed4 schema fields changedv0.7.0
    • addedInput schema / properties / reasoning_effort
      Added value: +{
      +  "description": "Controls reasoning depth for Magistral models. 'high' enables full chain-of-thought; 'none' disables it. Ignored on non-reasoning models.",
      +  "enum": [
      +    "none",
      +    "high"
      +  ],
      +  "type": "string"
      +}
    • addedInput schema / properties / response_format
      Added value: +{
      +  "anyOf": [
      +    {
      +      "additionalProperties": false,
      +      "properties": {
      +        "type": {
      +          "const": "text",
      +          "type": "string"
      +        }
      +      },
      +      "required": [
      +        "type"
      +      ],
      +      "type": "object"
      +    },
      +    {
      +      "additionalProperties": false,
      +      "properties": {
      +        "type": {
      +          "const": "json_object",
      +          "type": "string"
      +        }
      +      },
      +      "required": [
      +        "type"
      +      ],
      +      "type": "object"
      +    },
      +    {
      +      "additionalProperties": false,
      +      "properties": {
      +        "json_schema": {
      +          "additionalProperties": false,
      +          "properties": {
      +            "description": {
      +              "type": "string"
      +            },
      +            "name": {
      +              "description": "Identifier for the schema; surfaced in API errors.",
      +              "maxLength": 64,
      +              "minLength": 1,
      +              "type": "string"
      +            },
      +            "schema": {
      +              "additionalProperties": {},
      +              "description": "JSON Schema object the response must conform to.",
      +              "type": "object"
      +            },
      +            "strict": {
      +              "description": "If true, the API rejects responses that do not strictly match the schema.",
      +              "type": "boolean"
      +            }
      +          },
      +          "required": [
      +            "name",
      +            "schema"
      +          ],
      +          "type": "object"
      +        },
      +        "type": {
      +          "const": "json_schema",
      +          "type": "string"
      +        }
      +      },
      +      "required": [
      +        "type",
      +        "json_schema"
      +      ],
      +      "type": "object"
      +    }
      +  ],
      +  "description": "Force a structured output: `{type:\"json_object\"}` for JSON mode, `{type:\"json_schema\", json_schema:{...}}` for strict schema mode."
      +}
    • addedInput schema / properties / seed
      Added value: +{
      +  "description": "Random seed for deterministic sampling. Maps to Mistral's `random_seed`.",
      +  "type": "integer"
      +}
    • addedOutput schema / properties / reasoning_content
      Added value: +{
      +  "description": "Reasoning trace returned by Magistral models. Absent for non-reasoning models.",
      +  "type": "string"
      +}
  3. First observedv0.4.0

TDQS

A4.4/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations cover safety (readOnlyHint=true, destructiveHint=false, openWorldHint=true), so the bar is lower. The description still adds useful non-safety behavior: it does not stream, and it returns structured content with assistant text and token usage. It does not mention rate limits, latency, or error behavior, keeping it short of a 5.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loads the core action, organizes guidance as scannable bullets, and closes with the return shape and the streaming exclusion. No filler sentences.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With an output schema present, the description needn't detail return values, and annotations cover safety. It still supplies the streaming caveat and model-family guidance. Minor gap: it never states default model behavior or auth expectations, but that is largely handled by the schema's model description.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema already documents seed, model, top_p, temperature, response_format, and reasoning_effort thoroughly. The description adds only indirect model-selection guidance ('Codestral', 'Ministral') rather than explaining parameters, so baseline 3 applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The opening line states a specific verb and resource: 'Generate a chat completion using a Mistral model.' The bullets further differentiate sub-cases (French/European drafting, Codestral for code, Ministral for cheap classification), letting an agent distinguish this from codestral_fim and other siblings.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicit 'When to use' bullets plus a named exclusion: 'Does NOT stream — use mistral_chat_stream for long outputs with progress updates.' This gives both positive triggers and a concrete alternative with the condition that selects it.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.