Choose compact or direct publication¶
A server publishes its operations in one of two shapes. Compact is the default and needs no option. Direct is chosen at construction:
or, through the command tree:
When to stay compact¶
A client lists three tools, search_tools, get_tool_details and
call_tool, whatever the size of the catalogue. The model searches (or browses
with an empty query), inspects the schema of the one operation it needs, and
calls it. A tool with eighty commands costs a client the same context as one
with three, and a command's full schema only enters the conversation when it
is about to be used.
Stay compact when the catalogue is large, when the client's context budget matters, or when the host applies its own operation-level policy rather than relying on the client's approval prompts.
When to go direct¶
Every exposed operation appears as its own native tool with its own schema and annotations. A client that confirms destructive tools, or shows tools in a picker, can act on each operation individually.
Go direct when a client relies on native per-tool approval, when the catalogue is small, or when a downstream integration expects one tool per command (the shape ophis published).
What does not change¶
Both modes share the registry, the policy and the results. Execution passes
through Registry.Invoke either way, the same failure envelope is used, and
WithResources works in both. An operation may be invoked without a prior
search in compact mode, and inspection grants no execution permission in
either.
What cannot be done¶
The mode is fixed when the server is constructed. A host that wants both
publishes two servers on two endpoints; nothing infers a mode from a client's
behaviour. An Apps shell (WithApps) is compact-only and fails construction
alongside WithMode(Direct).
Progressive discovery explains the trade in more depth.