Skip to content
1 min read · 48 words

Variable: encodeTextTool

ts
const encodeTextTool: Tool<SpooledArtifact>;

Encode or decode text using common schemes: base64, url (percent-encoding), html_entities.

Remarks

base64 uses the portable globalThis.btoa/atob pair so the tool works in browsers, Node, and edge runtimes. Encoding/decoding errors are returned as Error: strings rather than thrown so the model can react in-line.