Skip to main content

execute_tool

Function execute_tool 

Source
pub async fn execute_tool(
    provider: &Provider,
    tool: &Tool,
    args: &HashMap<String, Value>,
    keyring: &Keyring,
) -> Result<Value, HttpError>
Expand description

Execute an HTTP tool call against a provider’s API.

Supports two modes:

  1. Location-aware (OpenAPI tools): Parameters are classified by x-ati-param-location metadata in the input schema. Path params are substituted into the URL template, query params go to the query string, header params become request headers, and body params go to the JSON body.
  2. Legacy (hand-written TOML tools): GET → all args as query params, POST/PUT/DELETE → JSON body.