McpClient.callTool
- CallToolResult callTool(string name, Json arguments, RequestOptions opts)
- CallToolResult callTool(string name, T args, RequestOptions opts)
- CallToolResult callTool(string name, Json arguments, void delegate(ProgressNotification) @(safe) onProgress)
- CallToolResult callTool(string name, T args, void delegate(ProgressNotification) @(safe) onProgress)
- CallToolResult callTool(Tool tool, Json arguments, RequestOptions opts)
mcp client client McpClient
constructorsfunctionsstatic functionsvariables
tools/call. Per-request progressToken / logLevel / onProgress are carried in opts (see RequestOptions).
Against a draft (MRTR / SEP-2322) server this transparently completes a Multi Round-Trip Request: if the server answers with an InputRequiredResult (the result carries inputRequests), each request is dispatched to the matching onSampling / onElicitation / onListRoots handler and the original tools/call is resubmitted with the answers in the top-level params.inputResponses map (and the server's opaque requestState echoed back), looping until the server returns a completed CallToolResult. The loop only engages when draft mode is enabled (see enableModern/connect); other protocol versions never see inputRequests.