Skip to content

Commit 50f1044

Browse files
Merge pull request #46 from SecretiveShell/fix-tool-api
do not force str on tool endpoints
2 parents 86fd211 + 723e731 commit 50f1044

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

mcp_bridge/mcpManagement/prompts.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ async def get_prompts() -> dict[str, ListPromptsResult]:
1919

2020

2121
@router.post("/{prompt_name}")
22-
async def get_prompt(prompt_name: str, args: dict[str, str] = {}) -> GetPromptResult:
22+
async def get_prompt(prompt_name: str, args: dict[str, Any] = {}) -> GetPromptResult:
2323
"""Evaluate a prompt"""
2424

2525
client = await ClientManager.get_client_from_prompt(prompt_name)

mcp_bridge/mcpManagement/tools.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
from typing import Any
12
from fastapi import APIRouter, HTTPException
23
from mcp_bridge.mcp_clients.McpClientManager import ClientManager
34
from mcp.types import ListToolsResult, CallToolResult
@@ -18,7 +19,7 @@ async def get_tools() -> dict[str, ListToolsResult]:
1819

1920

2021
@router.post("/{tool_name}/call")
21-
async def call_tool(tool_name: str, arguments: dict[str, str] = {}) -> CallToolResult:
22+
async def call_tool(tool_name: str, arguments: dict[str, Any] = {}) -> CallToolResult:
2223
"""Call a tool"""
2324

2425
client = await ClientManager.get_client_from_tool(tool_name)

0 commit comments

Comments
 (0)