Call one of the custom tools listed in the `<custom-tools>` context block. Pass its `tool` name and its arguments in `args`, keyed by the parameter names the block declares — a JSON object, e.g. `{"city": "Minsk", "days": 3}` for a tool declaring `city` and `days`.
Arguments are validated against the declared types (string, integer, boolean, list of strings), and a declared-but-missing required argument is refused. The declared arguments you supplied reach the script under the names you used, unchanged (an integral number is normalized, so `days: 3.0` arrives as `3`; an optional argument passed as `null` counts as omitted). Keys the block does not declare are ignored and reported back with the script's output or failure, never as an error of its own; a call refused before the tool is resolved carries no such report. The script's own output is returned, with the exit status when it is not clean. A call is refused when the tool does not exist or has no usable definition, when you are not granted it, or when an argument is missing or of the wrong type; beyond that it fails only when the run cannot complete — the script did not finish in time, left a background process holding its pipes past the drain limit, or could not start.