> ## Documentation Index
> Fetch the complete documentation index at: https://docs.impellabs.tech/llms.txt
> Use this file to discover all available pages before exploring further.

# Lifecycle

> From connecting a server to a tool being called.

## Discovery

Runs when an operator connects a server and whenever they press
**Re-discover**. Never inside a conversation — it is two round trips, and a
customer is waiting.

<Steps>
  <Step title="initialize">
    Handshake. The platform stores your protocol version and `serverInfo`.
  </Step>

  <Step title="tools/list">
    Each tool is validated (name, description, schema) and stored.
  </Step>

  <Step title="Reconciled">
    New tools are added **disabled**. Tools you no longer offer are deleted.
    Descriptions and schemas are refreshed.
  </Step>
</Steps>

<Warning>
  Changing a tool's schema does nothing until someone re-discovers. There is
  no push channel — if you ship a breaking argument change, tell the operator.
</Warning>

## The two gates

A tool is callable only when **both** are true:

<CardGroup cols={2}>
  <Card title="Operator enabled it" icon="user-shield">
    Per tool, in the ops console. This is the incident switch: one misbehaving
    tool goes off in seconds without touching your server.
  </Card>

  <Card title="Customer enabled the capability" icon="toggle-on">
    **Connected tools** on the assistant. Their workspace, their choice.
  </Card>
</CardGroup>

## Inside a turn

<Steps>
  <Step title="Resolved once">
    The platform reads the enabled tools from its cache — one lookup per turn,
    no network.
  </Step>

  <Step title="Declared to the model">
    Your tools are offered alongside the built-ins, namespaced, with
    `finish_turn` always last.
  </Step>

  <Step title="Called">
    `tools/call` with your bare tool name and the model's arguments.
  </Step>

  <Step title="Fed back">
    The result is appended to the conversation and the model continues — often
    calling another tool before it replies.
  </Step>
</Steps>

## What you can see

Every turn records which tools were called and whether each succeeded, visible
in the assistant's turn debugger. Side-effecting calls also leave a ledger row.
