How are Mistral web search executions identified separately from answers?

The Citead team, updated

In short. Mistral identifies web search executions with tool.execution records and keeps generated answers in separate message.output records.

Definition: In Mistral's Websearch output, a tool.execution entry identifies the web search operation and its execution metadata. A separate message.output entry identifies the generated answer and can contain response text together with reference chunks.

Key facts

  • Mistral names the web search record tool.execution; its name is web_search, its object is entry, and its type is tool.execution, according to the Websearch documentation.
  • The execution record has created_at and completed_at timestamps for when the tool starts and finishes, plus an id that uniquely identifies that execution. The same documentation describes these fields explicitly.
  • The answer record is message.output. Its content is a list of chunks, and the record also has object, type, created_at, completed_at, id, agent_id, model, and role fields.
  • A reference chunk can expose type, text, tool, title, url, and source. Mistral describes these chunks as interleaved with the model response text for citations during Retrieval-Augmented Generation tool calls.
  • Mistral documents web_search and web_search_premium for the Conversations API and Agents API. The Websearch page says Chat Completions responses do not include the search result references returned by these tools.

What distinguishes the execution record from the answer?

The record type is the first discriminator. Mistral's Websearch documentation describes a tool.execution entry as the web search tool call itself. The fields name, object, type, created_at, completed_at, and id describe that operation. They identify the tool and its execution interval without being the answer text.

The answer is represented by message.output. Mistral describes it as the generated answer from the agent. Its content contains chunks, including text chunks and tool_reference chunks. A reference chunk can carry the title and URL of a source, alongside the tool and source fields.

The shape can be recorded as follows:

{
  "type": "tool.execution",
  "name": "web_search",
  "object": "entry",
  "created_at": "<timestamp>",
  "completed_at": "<timestamp>",
  "id": "<tool execution id>"
}

The field names and values shown here match the Websearch output explanation. The answer belongs in a separate message.output record, whose content can include the references that support the response.

How should the timestamps be read?

For tool.execution, created_at marks when the web search execution started and completed_at marks when it finished. Mistral's Websearch documentation assigns these timestamps to the search operation. The execution id is a separate identifier for that operation.

For message.output, Mistral gives created_at and completed_at a different meaning: they mark when the message was created and completed. The message also has its own id, while agent_id identifies the agent that generated it. A log that keeps the record type, its id, and its timestamp pair can therefore distinguish search timing from answer timing.

Which API response contains these records?

Mistral's Websearch documentation states that web_search and web_search_premium work with /v1/conversations and the Agents API. The page gives a conversation example and then explains its separate output entries. It also states that these tools are unsupported in /v1/chat/completions because Chat Completions responses do not include the search result references they return.

The Conversations documentation shows built-in tools passed in the same tools array as Connectors and says that the model decides which tool to call based on the query. Its handling example iterates through response.outputs and prints content only when the output type is message.output:

for output in response.outputs:
    if output.type == "message.output":
        print(output.content)

That filter selects answer records. A consumer that needs the search execution record must retain the tool.execution entry as a separate output type.

FAQ

Does message.output replace tool.execution?

No. Mistral documents them as different entry types. tool.execution describes the web search operation, while message.output describes the generated answer and its content chunks.

Use created_at and completed_at on the tool.execution record. Mistral assigns the same field names on message.output to the creation and completion of the answer message.

Where can source URLs appear?

Mistral documents url as a field of a tool_reference chunk inside message.output content. The same explanation also lists the reference title, tool, and source fields.

Sources

  1. Mistral AI, "Websearch", undated
  2. Mistral AI, "Using Connectors in conversations", undated

Check how a page reads to answer engines. Open the GEO score analyzer

Test a page and see what to fix first

The analysis usually takes less than 10 seconds and needs no account.

400,000+ pages scored in the public benchmark