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

# LLM Server Tools

> Give any LLM tools that Eden AI runs during the request, such as web search, and get the final answer back in one response, with no tool loop on your side.

**LLM Server Tools**

Give any LLM tools that Eden AI runs during the request, such as web search, and get the final answer back in one response, with no tool loop on your side.

A server tool is a tool Eden AI runs for the model while it answers, so you get the final answer in one response, with no tool call for you to run and send back.

Server tools work on every model, on [Chat Completions](https://www.edenai.co/docs/v3/llms/chat-completions.md), [Responses](https://www.edenai.co/docs/v3/llms/responses.md) and Messages (`/v3/v1/messages`).

## Available Server Tools

| Tool | What it does |
| - | - |
| `edenai:web_search` | Searches the web and cites its sources. See [Web Search](https://www.edenai.co/docs/v3/llms/web-search.md). |

## How It Works

**1. You declare the tool**

Add `{"type": "edenai:<tool>"}` to `tools`, with its settings under `parameters`.

**2. The model calls it**

The model decides when it needs the tool, and with what input.

**3. The tool runs**

Eden AI runs the call, or the provider runs its own version of the tool when it has one, and the result goes back to the model.

**4. The model answers**

The model calls the tool again or answers. The response holds the answer and the calls that led to it.

## Declare a Server Tool

The tool object is the same on all three endpoints:

```json Chat Completions theme={null}
{
  "model": "~gpt-luna-latest",
  "messages": [{"role": "user", "content": "What is the latest stable release of Python?"}],
  "tools": [
    {"type": "edenai:web_search", "parameters": {"max_results": 5}}
  ]
}
```

```json Responses theme={null}
{
  "model": "~gpt-luna-latest",
  "input": "What is the latest stable release of Python?",
  "tools": [
    {"type": "edenai:web_search", "parameters": {"max_results": 5}}
  ]
}
```

```json Messages theme={null}
{
  "model": "~claude-sonnet-latest",
  "max_tokens": 1024,
  "messages": [{"role": "user", "content": "What is the latest stable release of Python?"}],
  "tools": [
    {"type": "edenai:web_search", "parameters": {"max_results": 5}}
  ]
}
```

A model name starting with `~` names no provider: Eden AI picks the one that serves it ([Provider Routing](https://www.edenai.co/docs/v3/llms/provider-routing.md)), and the tool works whichever it picks. Each tool's page lists its `parameters`. A parameter the tool does not know is ignored.

## With Your Own Tools

Server tools and your own function tools can share a request. When the model calls one of yours, the response returns that call as usual, for you to run. Server tool calls the model made before it have already run.

## In the Response

The response keeps its endpoint's usual shape, and shows each server tool call the way that endpoint shows its own: for example, a `web_search_call` item on Responses or a `server_tool_use` block on Messages. `usage.server_tool_use` counts Eden AI's calls on all three endpoints. A [streamed](https://www.edenai.co/docs/v3/llms/streaming.md) request gets the same events. When Eden AI runs the tool, the stream starts once the whole answer is ready, the tool calls first. When the provider runs its own version, the stream comes as the provider generates it, unless the tool's page says otherwise.

## Billing

* **The tool's runs**, at that tool's price, given on its page.
* **The model calls.** After each round of tool calls, the model is called again with the results in its prompt, so every call's tokens are billed.

## Limits

* **5 model calls per request** when Eden AI runs the tool. The last one answers from the results it has, without calling a tool again.
* When the provider runs its own version, the provider's limits apply.
* Each tool has its own limits on its page.

## Next Steps

> [card] [Web Search](https://www.edenai.co/docs/v3/llms/web-search.md)
>
> Let any model search the web while it answers

> [card] [Chat Completions](https://www.edenai.co/docs/v3/llms/chat-completions.md)
>
> Send messages to any LLM


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.