Convert a local file
jj_convert_fileConverts local files by uploading a path or base64 content to the Jam Jam API, waiting for completion, and returning embedded text for small text formats or a file path for binary outputs.
Instructions
Uploads a local file (path, or base64 content) to the Jam Jam API, waits for the conversion to finish, and returns the result: embedded text for small text formats (ChordPro, .lrc, .lab...), or a local file path for binary formats (PDF, MIDI, MP4...). Call jj_list_formats first to find valid "output" ids for your input. Consumes one unit of the conversion quota (6/week free, 500/month Premium, see jj_check_usage), which is a different counter from notebook reads and writes.
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": {
"output": "<output>"
},
"name": "jj_convert_file"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | No | Absolute or relative local path to the file to convert. Mutually exclusive with contentBase64. | |
| output | Yes | Output format id from jj_list_formats (e.g. "pdf-songbook", "midi", "songbook"). | |
| deliver | No | "download" (default) returns the artifact; "carnet" saves it to the caller's Jam Jam notebook instead (requires an account). | |
| options | No | Extra per-format options, see jj_list_formats for the target format. | |
| filename | No | File name (with extension). Required with contentBase64; defaults to the basename of "path". | |
| maxWaitMs | No | Maximum time to wait for the job to finish, in milliseconds (default 120000, hard cap 600000). If exceeded, the job keeps running server-side; poll it with jj_get_job. | |
| inputFormat | No | Input format id from jj_list_formats (e.g. "pdf-songbook", "audio-file"). Omit to let the server detect it. | |
| contentBase64 | No | Base64-encoded file content. Mutually exclusive with path. Requires "filename". |