attachment_share
Shares a file from the attachments directory as a chat card with a download button, letting clients fetch bytes on demand so conversations stay small; use it to show images instead of describing them.
Instructions
Put a file from the attachments directory in front of the user, as a card in the chat with a download button. Use this instead of pasting a file:// link when you have produced a file for them. The BYTES are never sent with this call: the client fetches them on demand, so the conversation stays small and reopening the chat costs nothing. A file outside the attachments directory is COPIED IN automatically when its directory is one the operator listed in ATTACHMENTS_IMPORT_ROOTS (render output dirs, typically); anything else must be copied into the attachments directory first. Sharing an IMAGE is how you show the user a picture — do that instead of describing it in prose, and do NOT read_image it first: read_image loads the pixels into YOUR context (thousands of tokens per picture, so a handful exhausts the window) and shows the user nothing. One call per file is expected; a gallery of a dozen renders is a dozen calls.
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": {
"path": "<path>"
},
"name": "attachment_share"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mime | No | MIME type, if you know it. | |
| name | No | Name to show the user; defaults to the stored name. | |
| path | Yes | Absolute path under the attachments directory, or under a configured import root (copied in). |