Run utility
run_utilityExecute a single string utility on input and return its output. Use run_pipeline for chaining multiple transformations.
Instructions
Run a single utility on input and return {output, outputEncoding?}. For two or more transformations in a row, make one run_pipeline call instead of chaining run_utility calls; if you do not know the id yet, find it with list_utilities. Plain text output is returned as-is; a JSON-producing utility returns pretty-printed JSON text; a byte-producing utility (e.g. gzip_compress, get_bytes) returns base64 with outputEncoding: "base64". inputEncoding controls how input itself is decoded first: "text" (default) uses it as-is, "base64" or "hex" decode it to raw bytes, "json" parses it. Params are validated against describe_utility's spec; invalid ones are rejected. Input is capped at 1,000,000 bytes, output text past 1,000,000 characters is cut off (flagged truncated, with fullLength), and the call is stopped after 20s. A failing utility returns isError with the error message. Utilities that run arbitrary user JavaScript (e.g. "custom_js") are refused, and the few that need a browser DOM parser (e.g. "xml_to_json", "html_table_to_csv") fail here.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | Utility id (see list_utilities / describe_utility). | |
| input | Yes | The value to run the utility on. | |
| params | No | Utility parameters (see describe_utility for names/kinds); params left out use their declared default. | |
| inputEncoding | No | How to decode `input` before passing it to the utility. Default "text". |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| output | Yes | The result: text as-is, JSON pretty-printed, bytes as base64. | |
| truncated | No | True when `output` was cut off at the output limit. | |
| fullLength | No | Length `output` would have had untruncated, when `truncated`. | |
| outputEncoding | No | Present when `output` is base64-encoded bytes. |