base64_convert
Encode UTF-8 text to Base64, or decode Base64, with the standard or URL-safe alphabet. Use it for data URIs, HTTP headers or token segments; to read a JWT use jwt_decode. Runs without network access and does not store your input. Input up to 100,000 bytes; larger input is an error. Encode returns base64 and bytes; URL-safe output has no padding. Decode accepts padded or unpadded input and returns text when the bytes are valid UTF-8, otherwise text null plus hex. Invalid Base64 is an error.
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": {
"data": "<data>",
"action": "<action>"
},
"name": "base64_convert"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| data | Yes | Text or Base64 data, up to 100 KB. | |
| action | Yes | ||
| url_safe | No | Use the URL-safe alphabet without padding. | |
| l402_proof | No | L402 payment proof "<macaroon>:<preimage>". Omit on the first call; an unpaid call returns a 0 sat Lightning invoice and the macaroon. Pay the invoice, then repeat the call with this argument set. |