Skip to content

Commit aaa9625

Browse files
CasperGNmsfussellmarcduiker
authored
docs: add docs for integrating MCP Toolbox for Databases as tool(s) (#4964)
* docs: add docs for integrating MCP Toolbox for Databases as tool(s) Signed-off-by: Casper Nielsen <casper@diagrid.io> * docs: move tools & MCP Toolbox for Databases into integration section Signed-off-by: Casper Nielsen <casper@diagrid.io> * Update dapr-agents-integrations.md Co-authored-by: Mark Fussell <markfussell@gmail.com> Signed-off-by: Casper Nielsen <whopsec@protonmail.com> * Update daprdocs/content/en/developing-applications/dapr-agents/dapr-agents-integrations.md Co-authored-by: Marc Duiker <marcduiker@users.noreply.github.com> Signed-off-by: Casper Nielsen <whopsec@protonmail.com> --------- Signed-off-by: Casper Nielsen <casper@diagrid.io> Signed-off-by: Casper Nielsen <whopsec@protonmail.com> Co-authored-by: Mark Fussell <markfussell@gmail.com> Co-authored-by: Marc Duiker <marcduiker@users.noreply.github.com>
1 parent 48fe65f commit aaa9625

File tree

2 files changed

+37
-1
lines changed

2 files changed

+37
-1
lines changed

daprdocs/content/en/developing-applications/dapr-agents/dapr-agents-core-concepts.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -194,6 +194,7 @@ tools = client.get_all_tools()
194194

195195
Once connected, the MCP client fetches all available tools from the server and prepares them for immediate use within the agent’s toolset. This allows agents to incorporate capabilities exposed by external processes—such as local Python scripts or remote services without hardcoding or preloading them. Agents can invoke these tools at runtime, expanding their behavior based on what’s offered by the active MCP server.
196196

197+
197198
### Memory
198199
Agents retain context across interactions, enhancing their ability to provide coherent and adaptive responses. Memory options range from simple in-memory lists for managing chat history to vector databases for semantic search, and also integrates with [Dapr state stores](https://docs.dapr.io/developing-applications/building-blocks/state-management/howto-get-save-state/), for scalable and persistent memory for advanced use cases from 28 different state store providers.
199200

daprdocs/content/en/developing-applications/dapr-agents/dapr-agents-integrations.md

Lines changed: 36 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -313,4 +313,39 @@ While the Arxiv Fetcher provides robust functionality for retrieving and process
313313

314314
* **Building a Searchable Knowledge Base**: Combine fetched papers with integrations like text splitting and vector embeddings for advanced search capabilities.
315315
* **Retrieval-Augmented Generation (RAG)**: Use processed papers as inputs for RAG pipelines to power question-answering systems.
316-
* **Automated Literature Surveys**: Generate summaries or insights based on the fetched and processed research.
316+
* **Automated Literature Surveys**: Generate summaries or insights based on the fetched and processed research.
317+
318+
## Tools
319+
320+
### MCP Toolbox for databases
321+
322+
Dapr Agents support integrating with [MCP Toolbox for Databases](https://googleapis.github.io/genai-toolbox/getting-started/introduction/) by implementing a wrapper that loads the available tools into the `Tool` model Dapr Agents utilize.
323+
324+
To integrate the Toolbox, load the tools as follows:
325+
326+
```python
327+
from toolbox_core import ToolboxSyncClient
328+
client = ToolboxSyncClient("http://127.0.0.1:5000")
329+
agent_tools = AgentTool.from_toolbox_many(client.load_toolset("your-tools-name-here"))
330+
agent = DurableAgent(
331+
..
332+
tools=agent_tools
333+
)
334+
335+
..
336+
# Remember to close the tool
337+
finally:
338+
client.close()
339+
```
340+
341+
Or wrap it in a `with` statement:
342+
343+
```python
344+
from toolbox_core import ToolboxSyncClient
345+
with ToolboxSyncClient("http://127.0.0.1:5000") as client:
346+
agent_tools = AgentTool.from_toolbox_many(client.load_toolset("your-tools-name-here"))
347+
agent = DurableAgent(
348+
..
349+
tools=agent_tools
350+
)
351+
```

0 commit comments

Comments
 (0)