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_storesAPI. - Image Generation – generates images using DeepFellow Infra's
v1/images/generationsAPI. - External MCP – connects to external MCP Servers.
- Infra MCP – uses tools hosted on DeepFellow Infra via
mcpservice. - 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.
Requires:
- non-empty vector store
For the quickest way to use file_search without setting up a toolbox, see How to Create Your RAG.
Schema:
{
"type": "file_search",
"vector_store_ids": "array of strings",
"max_num_results": "integer",
"filters": "object",
"ranking_options": "object"
}where:
vector_store_ids– list of vector store IDs allowed to be accessedmax_num_results– maximum number of returned results; integer between 1 and 50, defaults to 25filters– additional filtersranking_options– reranker options for choosing the final search results
Compatible with OpenAI file search tool.
Example:
curl -X POST \
'https://your-deepfellow-server.com/toolboxes/69b2c38a606170264e30f7c0/tools' \
-H 'Authorization: Bearer DEEPFELLOW_PROJECT_API_KEY' \
-H 'Content-Type: application/json' \
-H 'accept: application/json' \
-d '{
"type": "file_search",
"vector_store_ids": [
"69b2c436606170264e30f7c2"
],
"filters": {
"key": "document_type",
"type": "eq",
"value": "blogpost"
},
"max_num_results": 5,
"ranking_options": {
"ranker": "auto",
"score_threshold": 0.8
}
}'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
| Feature | Standard | Built-in |
|---|---|---|
| Protocol | http:// or https:// | df://local/ |
| Auth Required | Yes (Bearer Token) | No (extracted from request) |
| External Access | Open / Direct | Restricted / Hidden |
| Best For | Third-party integrations | Internal, 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.
-
Run
npx @modelcontextprotocol/inspector node build/index.js. -
Set Transport Type to the preferred mode: Streamable HTTP or SSE.
-
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
/mcpwith/sse. - Tool URL:
-
Expand the Authentication section, enter
Authorizationin the header field, andBearer {DEEPFELLOW_PROJECT_API_KEY}as the value. Make sure the toggle is enabled.
-
Click Connect. A green notification indicates a successful connection.
-
From the toolbar, select Tools and click List Tools. The list of tools appears after a moment.

-
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.