base64_manage
Encode or decode base64 for text and files. Encode text to base64, decode base64 to text, read files as base64, or write base64 data to files.
Instructions
Base64 encode/decode utility. Supports: encode text to base64, decode base64 to text, encode file to base64 string, or decode base64 string to file. Useful for preparing content for edit_file's content_base64 parameter.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | No | File path (for 'encode_file' action: path to file to read; for 'decode_file' action: path to write the decoded content to). | |
| text | No | Text to encode (for 'encode' action) or base64 string to decode (for 'decode' action). | |
| action | Yes | Action to perform: 'encode' - encode text to base64, 'decode' - decode base64 to text, 'encode_file' - read file and output base64, 'decode_file' - decode base64 and write to file | |
| encoding | No | Text encoding (default: 'utf8'). Used for encoding/decoding text and file operations. |