Skip to main content
Glama

proxy_tool_call

Facilitates dynamic tool execution within the MCP Server For Local by accepting dictionary-formatted requests, enabling seamless integration and interaction with external tools.

Instructions

代理工具,根据工具名动态调用其他服务端的工具,输入格式为字典:{'tool': 'tool_name', 'args': {...}}

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
paramsYes

Implementation Reference

  • The proxy_tool_call handler function that dynamically routes tool calls to appropriate backend servers based on tool_mapping.
    @mcp.tool(description="代理工具,根据工具名动态调用其他服务端的工具,输入格式为字典:{'tool': 'tool_name', 'args': {...}}")
    async def proxy_tool_call(params: Dict[str, Any]) -> str:
        """代理工具调用"""
        try:
            tool_name = params.get("tool")
            tool_args = params.get("args", {})
            
            if not tool_name:
                return "⚠️ 工具名称缺失"
                
            if tool_name not in tool_mapping:
                return f"⚠️ 未知工具: {tool_name}"
                
            server_name = tool_mapping[tool_name]
            if server_name not in sessions:
                return f"⚠️ 服务器 {server_name} 未连接"
                
            session = sessions[server_name]
            result = await session.call_tool(tool_name, tool_args)
            return result.content[0].text
            
        except Exception as e:
            logger.error(f"Tool call error: {str(e)}")
            return f"⚠️ 工具调用失败: {str(e)}"
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It describes the input format but fails to mention critical aspects like error handling, authentication requirements, rate limits, or what happens if the proxied tool fails. The description is insufficient for a mutation-capable tool with zero annotation coverage.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is brief and front-loaded with the core purpose, using only two sentences. While efficient, it might be overly concise given the tool's complexity, as it omits necessary details that would help the agent use it effectively.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's complexity (dynamic tool calling with nested objects), lack of annotations, no output schema, and low schema coverage, the description is incomplete. It doesn't cover return values, error cases, or operational constraints, making it inadequate for safe and effective use by an AI agent.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, and the description only partially compensates by specifying the input format as a dictionary with 'tool' and 'args' keys. However, it doesn't explain the semantics of 'tool' (e.g., valid tool names) or 'args' (e.g., expected structure), leaving significant gaps in parameter understanding beyond the basic schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose3/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states the tool 'dynamically calls other server-side tools based on tool name', which provides a general purpose but lacks specificity about what types of tools or services it proxies. It doesn't distinguish from siblings since there are none, but the verb+resource combination ('proxy' + 'tool call') is somewhat vague about the actual operation.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives, prerequisites, or context for its application. It mentions the input format but doesn't explain scenarios where dynamic tool calling is preferred over direct invocation, leaving the agent with minimal usage direction.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Related Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Dreamboat-Rachel/MCP-Server-For-Local'

If you have feedback or need assistance with the MCP directory API, please join our Discord server