Skip to content

Commit 8c09b4f

Browse files
committed
add mcp before tools and improve description
Signed-off-by: Lukas Schaefer <[email protected]>
1 parent b2209a2 commit 8c09b4f

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

ex_app/lib/all_tools/mcp.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,10 @@ async def get_tools(nc: Nextcloud):
2020
mcp_config = {}
2121
try:
2222
server = MultiServerMCPClient(mcp_config)
23-
return await asyncio.wait_for(server.get_tools(), timeout=120)
23+
tools = await asyncio.wait_for(server.get_tools(), timeout=120)
24+
for tool in tools:
25+
tool.name = "mcp_" + tool.name
26+
return tools
2427
except Exception as e:
2528
tb_str = "".join(traceback.format_exception(e))
2629
log(nc, LogLvl.ERROR, "Failed to load MCP servers: " + tb_str)

ex_app/lib/main.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ async def lifespan(app: FastAPI):
7777
SettingsField(
7878
id="mcp_config",
7979
title=_("MCP Config"),
80-
description=_("JSON configuration for the MCP. For an example look at https://langchain-ai.github.io/langgraph/agents/mcp/ but make sure to only use streamable_http MCPs."),
80+
description=_("JSON configuration for the MCP. Structured as {\"service_name\": {\"url\": \"https://service.url\",\"transport\": \"streamable_http\"}}. For more details view the documentation for context_agent."),
8181
type=SettingsFieldType.TEXT,
8282
default="",
8383
placeholder="{\"weather\": {\"url\": \"https://weather.internet/mcp\",\"transport\": \"streamable_http\"}}",

0 commit comments

Comments
 (0)