Skip to content

Commit 934affe

Browse files
committed
Merge pull request 'feat: add url field in list tools api' (#476) from add-url-info into main
Reviewed-on: https://git.biggo.com/Funmula/dive-mcp-host/pulls/476
2 parents a07d2a7 + 99339e4 commit 934affe

File tree

3 files changed

+6
-0
lines changed

3 files changed

+6
-0
lines changed

dive_mcp_host/host/tools/mcp_server.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,9 @@ class McpServerInfo(BaseModel):
9090
initialize_result.instructions: Server instructions.
9191
"""
9292

93+
url: str | None = None
94+
"""URL for streamable http / sse."""
95+
9396
error: BaseException | BaseExceptionGroup | None
9497
"""The error that occurred of the MCP server."""
9598

@@ -268,6 +271,7 @@ def server_info(self) -> McpServerInfo:
268271
initialize_result=self._initialize_result,
269272
tools=tools,
270273
client_status=self._client_status,
274+
url=self.config.url,
271275
error=self._exception,
272276
)
273277

dive_mcp_host/httpd/routers/models.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,7 @@ class McpTool(BaseModel):
100100
description: str
101101
enabled: bool
102102
icon: str
103+
url: str | None = None
103104
error: str | None = None
104105

105106

dive_mcp_host/httpd/routers/tools.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ async def list_tools( # noqa: PLR0912, C901
7171
)
7272
for tool in server_info.tools
7373
],
74+
url=server_info.url,
7475
description="",
7576
enabled=True,
7677
icon="",

0 commit comments

Comments
 (0)