Skip to main content
Alan’s agent just issued a tool call against a live warehouse database and it ran in production — without explicit approval. He only noticed because he happened to be watching the trace. To prevent surprises like this, it helps to understand the nine discrete stages of a tool call. The Model Context Protocol Associate (MCPA) Certification walks these stages in order:
  1. Declaration
  2. Discovery
  3. Exposure
  4. Selection
  5. Authorization
  6. Invocation
  7. Execution
  8. Result
  9. Integration
Five of these stages occur before any network traffic reaches a server. Below we review those pre-call stages first, then continue through invocation, execution, and result handling.
A horizontal infographic titled "Nine Stages of a Tool Call" showing nine numbered steps (Declaration, Discovery, Exposure, Selection, Authorization, Invocation, Execution, Result, Integration) connected along a pipeline with a server icon above the invocation stage. Each step is represented by a teal circular node and grouped under phase labels like Discovery, Selection, Authorization, Execution, and Integration.

Quick overview (summary table)

Stage 1 — Declaration

The tool author (server author) publishes each tool with:
  • a name,
  • a human-readable description, and
  • an input schema that declares accepted arguments and types.
This schema is authoritative for what the tool expects.

Stage 2 — Discovery

The host (client) queries the server for available tools (e.g., tools/list) and learns which tools exist. A minimal declaration might look like:
Hosts may cache tool lists, but see the determinism rules below.

Stage 3 — Exposure

The host converts the server-provided declaration into a concise representation the model can read — names, descriptions, and schemas only. No secrets or internal metadata should be exposed. For example:
This is the representation the model uses to decide whether and how to use a tool.

Stage 4 — Selection

After seeing exposed tool definitions, the model selects a tool and prepares the arguments it intends to supply. This selection is entirely the model’s output (it proposes the request), but the request is not yet executed. Before the host sends any network requests, it must obtain explicit informed consent from the user. The UI presented to the user must include the tool, the target server, and the exact arguments together — not just a generic statement that “the assistant wants to call a tool.” Example UI mockup:
Always show the tool name, the server it will call, and the concrete arguments in the confirmation prompt. A vague confirmation like “assistant wants to use a tool” is insufficient for informed consent.
Only when the user explicitly allows the call does the host proceed to invocation.

Stage 6 — Invocation and Stage 7 — Execution

Once authorized, the host sends the model’s requested tool name plus arguments to the server. The host owns the network connection; the model only generates the request content. Typical request shape (with optional progress token in _meta):
The server executes the request. Responses can take several forms:
  • Text: plain text results (e.g., “14 cartons of milk left on the fifth shelf”).
  • Media blocks: images or audio (base64-encoded with a MIME type).
  • Resource links: pointers (e.g., stock://milk) that the server continues to manage.
  • Structured content: data matching the declared output schema for client parsing.
Long-running calls can report incremental progress. If the host provided _meta.progressToken, the server should publish progress notifications with strictly increasing numeric values, for example:
Request timeouts are enforced by the host. If a user cancels:
  • Over stdio: client sends notification/cancelled with the request ID.
  • Over streamable HTTP: client closes the response stream.

Result: response shape and semantics

Every result in the current revision includes a required resultType. Two values exist:
  • complete — the server finished producing an answer.
  • input_required — the server needs additional input from the user to continue.
Example (complete result):
Example (server requests more input):
Compatibility note: older servers may omit resultType. Clients must treat such responses as complete for backward compatibility.

Application-level errors

If a tool encounters an application-level error (e.g., item not found, service unavailable), the server returns an HTTP/JSON response whose payload indicates the error; this is not a transport/protocol failure. Example:
This ensures the model can see and react to application-level failures. Transport-level errors (e.g., dropped connections) remain separate and are not surfaced as model-readable payload.
Annotations provided by servers (e.g., readOnlyHint, destructiveHint, idempotentHint, openWorldHint) are untrusted metadata. Do not make authorization or security decisions based solely on these hints.

Progress updates and continuations

When the server requests further input mid-call, it returns resultType: "input_required", includes prompt text in content, and supplies an outputSchema describing required fields. The host displays the prompt (with context and any partial results), collects user input, and either resumes the existing call via the transport’s continuation mechanism or sends a follow-up invocation. Example server prompt seeking more detail:
When the user replies, the host passes these values back to the server in the continuation request.

Caching and determinism

Hosts do not need to refresh the tool list before every call, but tools/list must return a deterministic ordering so clients can cache safely. Example:
Servers may mark results as cacheable with a TTL (milliseconds) and a cache scope (per-user or global) to indicate whether other clients on the server can reuse the response.

End-to-end flow

Putting it together: declaration → discovery → exposure → selection → authorization → invocation → execution → result → integration. Understanding and enforcing these stages — especially the authorization step — prevents models from performing unexpected actions on production systems and ensures users retain control over tool-driven side effects.

Watch Video