image_read
Reads image files (PNG, JPEG, GIF, WebP) up to 25 MiB from a session’s allowed folders and returns their bytes; use offset/length to fetch large images in chunks or relay files from another computer.
Instructions
席の端末にある画像ファイル1枚(絶対path、png/jpeg/gif/webp、25 MiBまで)のバイト列を返す。別端末の席はsession_idだけで現地のファイルを読む(1通の上限を超えないよう、現地とは一片ずつやり取りして1枚にして返す)。読める場所は、席の作業フォルダと一時フォルダの中だけ(symlinkは解いてから見る)。誤りのcode: IMAGE_PATH_INVALID / IMAGE_NOT_FOUND / IMAGE_PATH_NOT_ALLOWED / IMAGE_NOT_AN_IMAGE / IMAGE_TOO_LARGE。length を付けると、offsetから最大 length バイトの一片をchunk_base64で返す(Aiterm同士の中継用)。
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": {
"session_id": "<session_id>",
"path": "<path>"
},
"name": "image_read"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | 画像ファイルの絶対path(席の端末の上のpath) | |
| length | No | 一片で読む時の長さ(6 MiBまで)。省略すると画像1枚をimageで返す | |
| offset | No | 一片で読む時の開始バイト | |
| remote | No | 別端末のAitermで実行する時のSSH接続情報。hostだけならssh_configの接続名として使う。Aitermは接続情報を保存・管理しない。passphraseは会話記録に残るため、ssh-agentかpassphrase_env(環境変数名)を推奨する。 | |
| session_id | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | ||
| bytes | No | ||
| offset | No | ||
| schema | Yes | ||
| sha256 | Yes | ||
| mime_type | Yes | ||
| session_id | Yes | ||
| total_bytes | No | ||
| chunk_base64 | No |