summaryrefslogtreecommitdiffhomepage
path: root/src/context/tools
diff options
context:
space:
mode:
authorAdam Malczewski <[email protected]>2026-03-29 17:51:22 +0900
committerAdam Malczewski <[email protected]>2026-03-29 17:51:22 +0900
commit73c25761f6b879d78ebd8ecddac35881848831db (patch)
tree10c3e7e585e44dbd38aeef07295c39d93c9d1fec /src/context/tools
parente8d107e454b3804e089a33ce5fe7c931040d4647 (diff)
downloadai-pulse-obsidian-plugin-main.tar.gz
ai-pulse-obsidian-plugin-main.zip
enable image attachments to the chatHEADmain
Diffstat (limited to 'src/context/tools')
-rw-r--r--src/context/tools/save-image.json26
1 files changed, 26 insertions, 0 deletions
diff --git a/src/context/tools/save-image.json b/src/context/tools/save-image.json
new file mode 100644
index 0000000..6b8bb47
--- /dev/null
+++ b/src/context/tools/save-image.json
@@ -0,0 +1,26 @@
+{
+ "id": "save_image",
+ "label": "Save Image",
+ "description": "Save attached image(s) to the vault at a specified path.",
+ "friendlyName": "Save Image",
+ "requiresApproval": true,
+ "definition": {
+ "type": "function",
+ "function": {
+ "name": "save_image",
+ "description": "Save image(s) attached to the current chat message into the vault. The user has attached image(s) to their message — this tool writes them as files. You provide the vault-relative path WITHOUT the file extension (the correct extension is detected automatically from the image type). If multiple images are attached and you provide a single path, they will be saved as path_1.ext, path_2.ext, etc. If no images are attached, this tool returns an error. This action requires user approval.",
+ "parameters": {
+ "type": "object",
+ "required": [
+ "file_path"
+ ],
+ "properties": {
+ "file_path": {
+ "type": "string",
+ "description": "The vault-relative path for the image WITHOUT the file extension. The extension is added automatically based on the image type (e.g., .jpg, .png). Example: 'attachments/cool-keyboard' will become 'attachments/cool-keyboard.jpg'. For multiple images with a single path, they are numbered: 'attachments/cool-keyboard_1.jpg', 'attachments/cool-keyboard_2.jpg', etc."
+ }
+ }
+ }
+ }
+ }
+}