How to Use Server-Side Tools

Last verified 24 Aug 2026

Inference provides a single control plane for managing inference workflows. It includes a Model Catalog where you can view available foundation models, including both DigitalOcean-hosted and third-party commercial models, compare model capabilities and pricing, use routing to match inference requests to the best-fit model, and run inference using serverless or dedicated deployments.

Server-side tools are capabilities you attach to an inference request that the Inference platform runs for you during the model turn. When the model decides to use a tool, the platform executes it and folds the result back into the conversation. Server-side tools differ from client-side tools, where the model returns which tool to call and with which arguments, and your app runs the function and sends the result back in a follow-up request.

Function calling is listed because you declare it in the same tools array as the other server-side tools. Execution of function calling happens client-side where your application runs the function and returns the result.

We support server-side integrations that extend the model’s capabilities during inference. Instead of managing tool orchestration yourself, you add tool definitions in your API request and the platform handles discovery, execution, and response integration automatically. You can use the following server-side tools with serverless inference, dedicated inference, and inference routers:

Supported Tool Use For
Web Search (Public Preview) Search the web for real-time information.
We use a third-party web search service (Exa.ai) for all models.
Web Fetch (Public Preview) Fetch URLs and PDF content from the web.
We use a third-party web fetch service (Exa.ai) for non-Anthropic models. For Anthropic models, requests pass through to Anthropic’s web fetch service.
Model Synthesis (Public Preview) Multi-model tool that runs up to eight analysis models in parallel on the same task. A judge compares panel results, then the outer model writes one final answer.
Panel models can use server-side web search and fetch within configured limits. API only.
Knowledge Base Retrieval Query your private data sources during inference using retrieval-augmented generation (RAG).
MCP Enable the model to access remote MCP servers and orchestrate calls across them.
Tool Search (For Anthropic and OpenAI models only) Search the tools catalog to use during inference.
Computer Use (For Anthropic and OpenAI models only) UI action harness for interacting with the local system.
Bash/Local Shell (For Anthropic and OpenAI models only) Run commands in the local shell.
Web Fetch (For Anthropic models only) Fetch URL/PDF content from the web.
Text Editor (For Anthropic models only) Edit or view text files in the local workspace.
Apply Patch (For OpenAI models only) Apply a structured code patch.
Function Calling (For Anthropic and OpenAI models only) App-defined calls.

Web Search, Web Fetch for non-Anthropic models, Model Synthesis, Knowledge Base Retrieval, and MCP are DigitalOcean-hosted server-side tools. Passthrough tools to the provider include Tool Search, Computer Use, Bash, Local Shell, Web Fetch, Text Editor, Apply Patch, and Function Calling.

For pricing information, see Tools Usage Pricing.

Get Started

Server-side tools work with both the Chat Completions API and the Responses API, and with the Messages API for Anthropic models. To use server-side tools, add the tool definitions to the tools array in your API request. Set tool_choice to auto to let the model decide when to query a tool, or required to always query it before responding.

To use tools with dedicated inference or an inference router, set the model field to your dedicated inference model slug or router name, as described in Use Dedicated Inference and Use Inference Router.

The following example sends a Responses API request with knowledge base retrieval and web search tools enabled for serverless inference:

import os
from pydo.inference import Client

client = Client(token=os.environ.get("MODEL_ACCESS_KEY"))

resp = client.responses.create(
    model="deepseek-v4-pro",
    input="What is actions infrastructure? Answer using the knowledge base and search the web for real-time information.",
    tools=[
        {
            "type": "knowledge_base_retrieval",
            "knowledge_base_id": "<your-knowledge-base-id>",
        },
        {
            "type": "web_search",
            "max_uses": 3,
            "max_results": 5,
        },
    ],
    stream=False,
    max_output_tokens=1024,
)

print(resp)
import { InferenceClient } from "@digitalocean/dots";

const client = new InferenceClient({
    apiKey: process.env.MODEL_ACCESS_KEY,
});

const resp = await client.responses.create({
    model: "deepseek-v4-pro",
    input: "What is actions infrastructure? Answer using the knowledge base and search the web for real-time information.",
    tools: [
        {
            type: "knowledge_base_retrieval",
            knowledge_base_id: "<your-knowledge-base-id>",
        },
        {
            type: "web_search",
            max_uses: 3,
            max_results: 5,
        },
    ],
    stream: false,
    max_output_tokens: 1024,
});

console.log(resp);
curl -X POST https://inference.do-ai.run/v1/responses \
  -H "Authorization: Bearer $MODEL_ACCESS_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "deepseek-v4-pro",
    "input": "What is actions infrastructure? Answer using the knowledge base and search the web for real-time information.",
    "tools": [
      {
        "type": "knowledge_base_retrieval",
        "knowledge_base_id": "<your-knowledge-base-id>"
      },
      {
        "type": "web_search",
        "max_uses": 3,
        "max_results": 5
      }
    ],
    "stream": false,
    "max_output_tokens": 1024
  }'

Combine Tools in One Request

You can include multiple server-side tools in the tools array of a single request. In one turn, DigitalOcean-hosted tools and provider passthrough tools can all execute, and the model incorporates their results into its response.

When you include the model synthesis tool with other server-side tools such as web_search, results from those tools are included in the summary the model synthesis tool sends to the outer model. The model synthesis tool runs at most once per turn. Duplicate model synthesis tool entries in the same request are ignored after the first invocation, and nested model synthesis tool calls are blocked.

We can't find any results for your search.

Try using different keywords or simplifying your search terms.