DeepFellow DOCS

Using Tools

Tool calling provides a powerful and flexible way for models to interface with external systems and access information from outside their training data.

Tools and Toolboxes

Tools expose discrete capabilities to the model. When generating a response, the model determines whether an instruction requires invoking a tool – for example, to retrieve data or execute a specific operation.

In DeepFellow, the concept of tools is equivalent to the concept of Function Calling in OpenAI API. Within the DeepFellow architecture, tools are orchestrated by MCP Servers according to the Model Context Protocol (MCP).

A Toolbox is an MCP Server that aggregates tools, resources, and prompts from all the MCP Servers it contains. Use Toolboxes to organize tools into groups and simplify tool calling.

Supported MCP Protocols

DeepFellow Server and DeepFellow Infra support the following MCP protocols:

  • Streamable HTTP (path: /mcp)
  • SSE (path: /sse)

The examples in this guide use Streamable HTTP.

Tool Types

DeepFellow supports the following tool types:

  • File Search – searches DeepFellow Server vector stores using DeepFellow Server's v1/vector_stores API.
  • Image Generation – generates images using DeepFellow Infra's v1/images/generations API.
  • External MCP – connects to external MCP Servers.
  • Infra MCP – uses tools hosted on DeepFellow Infra via mcp service.
  • Websearch – searches web pages and fetches their content.
  • Custom – uses DeepFellow Infra's custom service.

Adding Toolboxes

You can also create and manage toolboxes and tools from the DeepFellow Server Web Panel.

To add a toolbox, use the POST /toolboxes/ endpoint:

curl -X POST \
  'https://your-deepfellow-server.com/toolboxes/' \
  -H 'Authorization: Bearer DEEPFELLOW_PROJECT_API_KEY' \
  -H 'accept: application/json' \
  -d '{"name": "my-toolbox"}'

Adding Tools

To add tools to a toolbox, use POST /toolboxes/{TOOLBOX_ID}/tools endpoint with the appropriate schema in the body:

curl -X POST \
  'https://your-deepfellow-server.com/toolboxes/{TOOLBOX_ID}/tools' \
  -H 'Authorization: Bearer DEEPFELLOW_PROJECT_API_KEY' \
  -H 'accept: application/json' \
  -d '{ TOOL_BODY }'

The following tabs show the request body for each tool type.

Tool Calling

DeepFellow offers two primary methods for connecting Model Context Protocol (MCP) servers:

  • Standard
  • Built-in

Each serves a specific use case based on your security and integration requirements.

Comparison Summary

FeatureStandardBuilt-in
Protocolhttp:// or https://df://local/
Auth RequiredYes (Bearer Token)No (extracted from request)
External AccessOpen / DirectRestricted / Hidden
Best ForThird-party integrationsInternal, secure tool calls

The Standard method functions like a typical streamable-http or SSE (Server-Sent Events) MCP connection.

  • Setup: Requires a standard HTTP URL and an authorization token.

  • Accessibility: External applications have direct access to the toolbox or tool MCP server.

  • Configuration:

    • Server URL: http://your-deepfellow-server.com/toolboxes/[TOOLBOX_ID]/mcp

    • Header: Requires an Authorization bearer token.

      Authorization: Bearer DEEPFELLOW_PROJECT_API_KEY

Via MCP Inspector

You can test tools using the MCP Inspector.

  1. Run npx @modelcontextprotocol/inspector node build/index.js.

  2. Set Transport Type to the preferred mode: Streamable HTTP or SSE.

  3. In the URL field, enter your tool or toolbox URL:

    • Tool URL: https://your-deepfellow-server.com/toolboxes/{TOOLBOX_ID}/tools/{TOOL_ID}/mcp
    • Toolbox URL: https://your-deepfellow-server.com/toolboxes/{TOOLBOX_ID}/mcp

    For SSE, replace /mcp with /sse.

  4. Expand the Authentication section, enter Authorization in the header field, and Bearer {DEEPFELLOW_PROJECT_API_KEY} as the value. Make sure the toggle is enabled.

    View of correctly filled fields in MCP Inspector.

  5. Click Connect. A green notification indicates a successful connection.

  6. From the toolbar, select Tools and click List Tools. The list of tools appears after a moment.

    Tool list in MCP Inspector.

  7. Select a tool and click Run Tool to use it.

Via v1/responses

  • standard connection

    • tool

      curl -X POST \
        'http://your-deepfellow-server.com/v1/responses' \
        -H 'Authorization: Bearer DEEPFELLOW_PROJECT_API_KEY' \
        -H 'Content-Type: application/json' \
        -H 'accept: application/json' \
        -d '{
        "input": "Find me connection between Berlin HBF and airport",
        "model": "qwen3:8b",
        "tools": [
          {
            "type": "mcp",
            "server_label": "Berlin Bus Transport",
            "server_description": "Searching connections between different bus stations in Berlin.",
            "server_url": "http://your-deepfellow-server.com/toolboxes/69b97a9d0a101cfacc4282b2/tools/c89f6bdd67924f339911cd5c3d6c222f/mcp",
            "headers": {
               "Authorization": "Bearer DEEPFELLOW_PROJECT_API_KEY"
            },
            "require_approval": "never"
          }
        ]
      }'
    • toolbox

      curl -X POST \
        'http://your-deepfellow-server.com/v1/responses' \
        -H 'Authorization: Bearer DEEPFELLOW_PROJECT_API_KEY' \
        -H 'Content-Type: application/json' \
        -H 'accept: application/json' \
        -d '{
        "input": "Find me connection between Berlin HBF and airport",
        "model": "qwen3:8b",
        "tools": [
          {
            "type": "mcp",
            "server_label": "Berlin Transport",
            "server_description": "Searching connections in Berlin.",
            "server_url": "http://your-deepfellow-server.com/toolboxes/69b97a9d0a101cfacc4282b2/mcp",
            "headers": {
               "Authorization": "Bearer DEEPFELLOW_PROJECT_API_KEY"
            },
            "require_approval": "never"
          }
        ]
      }'
      
  • built-in connection

    • tool

      curl -X POST \
        'http://your-deepfellow-server.com/v1/responses' \
        -H 'Authorization: Bearer DEEPFELLOW_PROJECT_API_KEY' \
        -H 'Content-Type: application/json' \
        -H 'accept: application/json' \
        -d '{
        "input": "Find me connection between Berlin HBF and airport",
        "model": "qwen3:8b",
        "tools": [
          {
            "type": "mcp",
            "server_label": "Berlin Bus Transport",
            "server_description": "Searching connections between different bus stations in Berlin.",
            "server_url": "df://local/toolboxes/69b97a9d0a101cfacc4282b2/tools/c89f6bdd67924f339911cd5c3d6c222f/mcp",
            "require_approval": "never"
          }
        ]
      }'
    • toolbox

      curl -X POST \
        'http://your-deepfellow-server.com/v1/responses' \
        -H 'Authorization: Bearer DEEPFELLOW_PROJECT_API_KEY' \
        -H 'Content-Type: application/json' \
        -H 'accept: application/json' \
        -d '{
        "input": "Find me connection between Berlin HBF and airport",
        "model": "qwen3:8b",
        "tools": [
          {
            "type": "mcp",
            "server_label": "Berlin Transport",
            "server_description": "Searching connections in Berlin.",
            "server_url": "df://local/toolboxes/69b97a9d0a101cfacc4282b2/mcp",
            "require_approval": "never"
          }
        ]
      }'

Updating Tools and Toolboxes

To update a tool, use POST /toolboxes/{TOOLBOX_ID}/tools/{TOOL_ID} endpoint. It accepts the same schema as the tool creation endpoint, with all fields optional:

curl -X POST \
  'https://your-deepfellow-server.com/toolboxes/{TOOLBOX_ID}/tools/{TOOL_ID}' \
  -H 'Authorization: Bearer DEEPFELLOW_PROJECT_API_KEY' \
  -H 'accept: application/json' \
  -d '{ TOOL_BODY }'

Similarly, to update a toolbox, use POST /toolboxes/{TOOLBOX_ID} endpoint. It accepts the same schema as the toolbox creation endpoint, with all fields optional:

curl -X POST \
  'https://your-deepfellow-server.com/toolboxes/{TOOLBOX_ID}' \
  -H 'Authorization: Bearer DEEPFELLOW_PROJECT_API_KEY' \
  -H 'accept: application/json' \
  -d '{"name": "my-toolbox"}'

Removing Tools and Toolboxes

To remove a tool, use DELETE /toolboxes/{TOOLBOX_ID}/tools/{TOOL_ID} endpoint:

curl -X DELETE \
  'https://your-deepfellow-server.com/toolboxes/{TOOLBOX_ID}/tools/{TOOL_ID}' \
  -H 'Authorization: Bearer DEEPFELLOW_PROJECT_API_KEY' \
  -H 'accept: application/json'

Similarly, to remove a toolbox, use DELETE /toolboxes/{TOOLBOX_ID} endpoint:

curl -X DELETE \
  'https://your-deepfellow-server.com/toolboxes/{TOOLBOX_ID}' \
  -H 'Authorization: Bearer DEEPFELLOW_PROJECT_API_KEY' \
  -H 'accept: application/json'

We use cookies on our website. We use them to ensure proper functioning of the site and, if you agree, for purposes such as analytics, marketing, and targeting ads.

On this page