postToolsCallWithHttpInfo method
Runs one of the caller's activated tools and answers with its output.
Runs one of the caller's activated tools and answers with its output. This is the endpoint onto the tool plane's DYNAMIC half — the half no build-time catalogue can hold, because it is per-tenant: an org's connected connector actions, its authored skills, its agents and functions, and the tools of every external MCP server it registered. A tool's existence, its price and its activation are all rows, not code, so they cannot be known until the caller is. One policy, the registry's: resolve by precedence, refuse an unactivated tool 403, settle a priced one through the x402 client or fail closed 402, then dispatch to the winning source bound to the caller's own (org, project). One metered unit, one audit record. A caller can only ever dispatch its own tools. Discovery is GET /v1/tools — ?activated=true for the callable set.
Note: This method returns the HTTP Response.
Parameters:
- ToolCall toolCall (required):
Implementation
Future<Response> postToolsCallWithHttpInfo(ToolCall toolCall,) async {
// ignore: prefer_const_declarations
final path = r'/v1/tools/call';
// ignore: prefer_final_locals
Object? postBody = toolCall;
final queryParams = <QueryParam>[];
final headerParams = <String, String>{};
final formParams = <String, String>{};
const contentTypes = <String>['application/json'];
return apiClient.invokeAPI(
path,
'POST',
queryParams,
postBody,
headerParams,
formParams,
contentTypes.isEmpty ? null : contentTypes.first,
);
}