Skip to main content
A backend (also called a provider mode) controls how your tools are presented to the LLM. It sits between the agent and your tools, deciding what the LLM sees and how it invokes them.

Why Backends Matter

When an LLM connects to your MCP server, it calls list_tools() to discover what’s available. The backend determines what comes back: The choice of backend directly affects:

Available Backends

Plain

All tools exposed directly. Simple, no wrapping. Best for small APIs.

Search

Semantic search over tools. Agent discovers then calls. Best for large APIs.

Plan

Agent submits a JSON execution plan. Sequential steps with data passing. Best for workflows.

Code

Agent writes Python to call tools. Maximum efficiency. Best for complex logic.

Configuring a Backend

The default is Plain. Change it by passing ProviderType.SEARCH, ProviderType.PLAN, or ProviderType.CODE.

Comparison

Backends + Stages

Backends work on top of stages. If you define stages, the backend only operates on the tools visible in the current stage:not all tools:
In the browse stage with Code mode, tools.pay() raises an error:it’s only available after transitioning to checkout.