Get media file contents
get_media_fileReads one file from Anki's media folder and returns it as base64, including viewable image content, so you can inspect a card-referenced image or audio file by bare filename.
Instructions
Read one file from Anki's media folder and return it as base64; images are also returned as image content the model can look at. Read-only. Use this when you need a referenced image/audio file's actual contents; use manage_collection list_media to find file names and store_media/delete_media to change files. Pass the bare filename as it appears in the card (e.g. "diagram.png"); paths and ".." are rejected. Returns an error object if the file doesn't exist.
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": {
"filename": "<filename>"
},
"name": "get_media_file"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| filename | Yes | Bare media file name as referenced in a card, e.g. "image.png" (no paths) |