Encode File To Base64
encode_file_to_base64Reads a file in binary mode and returns its contents as a base64 string. Requires an absolute path for security.
Instructions
Encode a file to a base64 string.
This tool reads a file in binary mode and returns its contents encoded as a base64 string. Only absolute paths are allowed for security reasons.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"file_path": "<file_path>"
},
"name": "encode_file_to_base64"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file_path | Yes | Absolute path to the file to encode to base64 |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |