BesluitBron 1.4.4-23 Status Sign in

The Process of a Call

Last changed on .

A single user query results in one or more tool calls. This page describes what happens during one such call, from the query arriving at the MCP address to the response being sent to the assistant.

The steps

flowchart TD
    A["AI assistant<br/>tools/call search_documents"] --> E["MCP address<br/>which address,<br/>which toolbox"]
    E --> S["McpConnectorSurface<br/>run this tool"]
    S --> X["ToolExecutor<br/>start timing,<br/>note the origin"]
    X --> Q["Search service<br/>clean the inlet,<br/>check the source name,<br/>limit the scope"]
    Q --> C{"Is the answer there?<br/>Is it already in the buffer?"}
    C -->|yes| HIT["UpstreamCache<br/>well-known answer"]
    C -->|no| P["Source platform<br/>search query in the language<br/>of the platform"]
    P --> W["UpstreamCache<br/>record the answer"]
    HIT --> PREC["Search service<br/>determine the search precision"]
    W --> PREC
    PREC --> L["Request Log<br/>tool, cost, hits,<br/>size, origin"]
    L --> R["AI assistant<br/>result as JSON"]

What is enforced at each step

  • The input is sanitised before it reaches the platform. Wildcards and search language constructs that the source would execute are removed. A specified source name is checked against the list of existing sources. An unknown source results in an error rather than an empty result, as an empty result would be interpreted as ‘there is nothing’;
  • The scope is limited. A tool never returns an unlimited number of results, as this would fill the assistant’s memory without actually answering the question any better. Anything that falls outside this scope is covered by the ‘more_to_find’ field from Zoekprecisie;
  • Precision is determined by a single shared feature, rather than being re-engineered for each tool;
  • The call is logged before the response is sent. This means that even a call that ends in an error is recorded in the log.
  • The session remains with the connector on which it was opened. A client that opens a session on one connector and then attempts to access another will receive a refusal stating which connector the session belongs to. Without this rule, the client would receive the tools from the first connector at the address of the second. The service retains this association for thirty minutes after the session’s last request; after that, the session is no longer recognised even by the transport layer itself. The time limit is specified at BesluitBron:Mcp:SessionBindingRetentionMinutes. From version 1.3.7 onwards.

What the assistant gets in return

A compact JSON response containing the search results, their source details and precision fields. If the tool has a follow-up, a link to it will be provided: the next window, the full text of a document or the relevant meeting document.

The assistant processes that answer into running text. That text is not the register’s answer. That difference is the reason why each result is assigned an identifier. See Bronvermelding.