@qvac/skills 0.0.0 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE.md +198 -0
- package/README.md +40 -0
- package/index.d.ts +4 -0
- package/index.js +9 -0
- package/package.json +87 -1
- package/skills/apple-notes/SKILL.md +92 -0
- package/skills/apple-notes/append-note.applescript +9 -0
- package/skills/apple-notes/cli.schema.json +32 -0
- package/skills/apple-notes/create-note.applescript +15 -0
- package/skills/apple-notes/delete-note.applescript +10 -0
- package/skills/apple-notes/edit-note.applescript +10 -0
- package/skills/apple-notes/read-note.applescript +28 -0
- package/skills/apple-notes/references/read.md +65 -0
- package/skills/apple-notes/references/write.md +105 -0
- package/skills/apple-notes/search-notes.applescript +21 -0
- package/skills/apple-reminders/SKILL.md +129 -0
- package/skills/apple-reminders/cli.schema.json +201 -0
- package/skills/apple-reminders/references/edit.md +69 -0
- package/skills/apple-reminders/references/view.md +58 -0
- package/skills/asana/SKILL.md +59 -0
- package/skills/diagrams/SKILL.md +107 -0
- package/skills/diagrams/references/class.md +29 -0
- package/skills/diagrams/references/er.md +27 -0
- package/skills/diagrams/references/flowchart.md +33 -0
- package/skills/diagrams/references/gantt.md +38 -0
- package/skills/diagrams/references/mindmap.md +35 -0
- package/skills/diagrams/references/pie.md +27 -0
- package/skills/diagrams/references/sequence.md +32 -0
- package/skills/diagrams/references/state.md +30 -0
- package/skills/diagrams/references/timeline.md +28 -0
- package/skills/excel/SKILL.md +120 -0
- package/skills/excel/references/create.md +374 -0
- package/skills/excel/references/edit.md +353 -0
- package/skills/excel/references/read.md +99 -0
- package/skills/github/SKILL.md +42 -0
- package/skills/gmail/SKILL.md +142 -0
- package/skills/gmail/operations.json +71 -0
- package/skills/google-calendar/SKILL.md +139 -0
- package/skills/google-calendar/operations.json +62 -0
- package/skills/google-docs/SKILL.md +74 -0
- package/skills/google-docs/operations.json +61 -0
- package/skills/google-docs/references/create.md +97 -0
- package/skills/google-docs/references/edit.md +146 -0
- package/skills/google-docs/references/read.md +49 -0
- package/skills/google-drive/SKILL.md +118 -0
- package/skills/google-drive/operations.json +40 -0
- package/skills/google-sheets/SKILL.md +71 -0
- package/skills/google-sheets/operations.json +85 -0
- package/skills/google-sheets/references/create.md +54 -0
- package/skills/google-sheets/references/edit.md +124 -0
- package/skills/google-sheets/references/read.md +74 -0
- package/skills/image-generation/SKILL.md +48 -0
- package/skills/music-generation/SKILL.md +76 -0
- package/skills/notion/SKILL.md +61 -0
- package/skills/notion/operations.json +53 -0
- package/skills/notion/references/comments.md +65 -0
- package/skills/notion/references/databases.md +68 -0
- package/skills/notion/references/pages.md +119 -0
- package/skills/notion/references/tasks.md +28 -0
- package/skills/obsidian/SKILL.md +122 -0
- package/skills/obsidian/cli.schema.json +392 -0
- package/skills/obsidian/references/read.md +79 -0
- package/skills/obsidian/references/write.md +67 -0
- package/skills/pdf/SKILL.md +110 -0
- package/skills/pdf/references/create.md +169 -0
- package/skills/pdf/references/transform.md +270 -0
- package/skills/pdf/scripts/decrypt.py +26 -0
- package/skills/pdf/scripts/encrypt.py +25 -0
- package/skills/pdf/scripts/extract_text.py +25 -0
- package/skills/pdf/scripts/merge.py +21 -0
- package/skills/pdf/scripts/rotate.py +27 -0
- package/skills/presentations/SKILL.md +118 -0
- package/skills/presentations/references/create.md +399 -0
- package/skills/presentations/references/edit.md +314 -0
- package/skills/presentations/references/read.md +127 -0
- package/skills/spotify/SKILL.md +86 -0
- package/skills/weather/SKILL.md +33 -0
- package/skills/word/SKILL.md +141 -0
- package/skills/word/references/create.md +368 -0
- package/skills/word/references/edit.md +704 -0
- package/skills/word/references/read.md +141 -0
- package/skills/word/references/replace.md +86 -0
- package/skills/word/scripts/list_paragraphs.py +19 -0
- package/skills/word/scripts/replace_paragraphs.py +58 -0
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
# Reading and Finding Google Docs
|
|
2
|
+
|
|
3
|
+
Every request is one `http_request` call with a structured object. For each request, set `auth.tokenCredentialKey` to `google_docs_access_token`.
|
|
4
|
+
|
|
5
|
+
## Get a document
|
|
6
|
+
|
|
7
|
+
```json
|
|
8
|
+
{
|
|
9
|
+
"url": "https://docs.googleapis.com/v1/documents/{documentId}",
|
|
10
|
+
"auth": { "tokenCredentialKey": "google_docs_access_token" },
|
|
11
|
+
"method": "GET"
|
|
12
|
+
}
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
Returns the full document structure with all content, styling, and revisions.
|
|
16
|
+
The text lives in `body.content[]` → `paragraph.elements[]` → `textRun.content`;
|
|
17
|
+
walk that array and join the `content` strings to reconstruct the text. Present
|
|
18
|
+
the text, not the JSON. A read-only question ("what does the doc say", "summarize
|
|
19
|
+
it") ends here — do not follow a read with an edit.
|
|
20
|
+
|
|
21
|
+
## List or search for documents
|
|
22
|
+
|
|
23
|
+
Use the Google Drive API with a MIME type filter to find Google Docs by name.
|
|
24
|
+
The `documentId` you need for a follow-up read or edit is the file `id`.
|
|
25
|
+
|
|
26
|
+
```json
|
|
27
|
+
{
|
|
28
|
+
"url": "https://www.googleapis.com/drive/v3/files",
|
|
29
|
+
"auth": { "tokenCredentialKey": "google_docs_access_token" },
|
|
30
|
+
"method": "GET",
|
|
31
|
+
"query": {
|
|
32
|
+
"q": "mimeType='application/vnd.google-apps.document' and name contains 'report'",
|
|
33
|
+
"pageSize": 10,
|
|
34
|
+
"fields": "files(id,name,modifiedTime,webViewLink)"
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
To list recent documents without a name filter, drop the `and name contains …`
|
|
40
|
+
clause and add `"orderBy": "modifiedTime desc"` to the query. Run the search
|
|
41
|
+
ONCE; if it returns nothing, say so rather than retrying with variations.
|
|
42
|
+
|
|
43
|
+
## Common Mistakes
|
|
44
|
+
|
|
45
|
+
- Searching with the wrong MIME type — it must be
|
|
46
|
+
`application/vnd.google-apps.document`.
|
|
47
|
+
- Echoing the raw JSON to the user instead of the extracted text.
|
|
48
|
+
- Fetching the document through the Drive API — content comes only from the
|
|
49
|
+
Docs API `GET`.
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: google-drive
|
|
3
|
+
description: Search, list, download metadata, and manage Google Drive files and folders via the Google Drive REST API.
|
|
4
|
+
tools: [http_request, drive_create_folder, drive_trash]
|
|
5
|
+
platform: [darwin, linux, win32]
|
|
6
|
+
credentials: [google_drive_access_token]
|
|
7
|
+
allow_list: [https://www.googleapis.com/drive/v3/]
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# Google Drive
|
|
11
|
+
|
|
12
|
+
Use `drive_create_folder` to create folders and `drive_trash` to trash files; use `http_request` for everything else (list, search, get, export, rename). For each `http_request`, set `auth.tokenCredentialKey` to `google_drive_access_token`.
|
|
13
|
+
|
|
14
|
+
## Prerequisites
|
|
15
|
+
|
|
16
|
+
Google Drive must be connected. Each Google skill is connected separately, with its
|
|
17
|
+
own app and its own approval — connecting one grants nothing to the others. If
|
|
18
|
+
credentials are missing, tell the user to connect Google Drive from Settings, or to
|
|
19
|
+
set the `google_drive_access_token` credential.
|
|
20
|
+
|
|
21
|
+
## Base URL
|
|
22
|
+
|
|
23
|
+
`https://www.googleapis.com/drive/v3`
|
|
24
|
+
|
|
25
|
+
Always pass a `fields` mask on list/get calls — default payloads are huge. Keep `pageSize` small (5–10) unless the user asks for more.
|
|
26
|
+
|
|
27
|
+
## Common Operations
|
|
28
|
+
|
|
29
|
+
### List recent files
|
|
30
|
+
|
|
31
|
+
```json
|
|
32
|
+
{
|
|
33
|
+
"url": "https://www.googleapis.com/drive/v3/files",
|
|
34
|
+
"auth": { "tokenCredentialKey": "google_drive_access_token" },
|
|
35
|
+
"method": "GET",
|
|
36
|
+
"query": {
|
|
37
|
+
"pageSize": 5,
|
|
38
|
+
"orderBy": "modifiedTime desc",
|
|
39
|
+
"fields": "files(id,name,mimeType,modifiedTime,webViewLink),nextPageToken"
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
### Search by name
|
|
45
|
+
|
|
46
|
+
```json
|
|
47
|
+
{
|
|
48
|
+
"url": "https://www.googleapis.com/drive/v3/files",
|
|
49
|
+
"auth": { "tokenCredentialKey": "google_drive_access_token" },
|
|
50
|
+
"method": "GET",
|
|
51
|
+
"query": {
|
|
52
|
+
"q": "name contains 'roadmap' and trashed = false",
|
|
53
|
+
"pageSize": 5,
|
|
54
|
+
"fields": "files(id,name,mimeType,modifiedTime,webViewLink),nextPageToken"
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
Other useful `q` recipes: folders only → `mimeType = 'application/vnd.google-apps.folder' and trashed = false`; inside a folder → `'{folderId}' in parents and trashed = false`.
|
|
60
|
+
|
|
61
|
+
### Get file metadata
|
|
62
|
+
|
|
63
|
+
Only when the `fileId` is known — list/search first instead of guessing ids.
|
|
64
|
+
|
|
65
|
+
```json
|
|
66
|
+
{
|
|
67
|
+
"url": "https://www.googleapis.com/drive/v3/files/{fileId}",
|
|
68
|
+
"auth": { "tokenCredentialKey": "google_drive_access_token" },
|
|
69
|
+
"method": "GET",
|
|
70
|
+
"query": {
|
|
71
|
+
"fields": "id,name,mimeType,size,modifiedTime,owners(displayName,emailAddress),webViewLink"
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
### Export Google Doc as plain text
|
|
77
|
+
|
|
78
|
+
```json
|
|
79
|
+
{
|
|
80
|
+
"url": "https://www.googleapis.com/drive/v3/files/{fileId}/export",
|
|
81
|
+
"auth": { "tokenCredentialKey": "google_drive_access_token" },
|
|
82
|
+
"method": "GET",
|
|
83
|
+
"query": { "mimeType": "text/plain" }
|
|
84
|
+
}
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
### Rename or move a file to trash
|
|
88
|
+
|
|
89
|
+
`PATCH` with only the fields to change.
|
|
90
|
+
|
|
91
|
+
```json
|
|
92
|
+
{
|
|
93
|
+
"url": "https://www.googleapis.com/drive/v3/files/{fileId}",
|
|
94
|
+
"auth": { "tokenCredentialKey": "google_drive_access_token" },
|
|
95
|
+
"method": "PATCH",
|
|
96
|
+
"body": { "trashed": true }
|
|
97
|
+
}
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
## MIME Types Reference
|
|
101
|
+
|
|
102
|
+
- Google Docs: `application/vnd.google-apps.document` — export as `text/plain`
|
|
103
|
+
- Google Sheets: `application/vnd.google-apps.spreadsheet` — export as `text/csv`
|
|
104
|
+
- Google Slides: `application/vnd.google-apps.presentation` — export as `text/plain`
|
|
105
|
+
- Folder: `application/vnd.google-apps.folder`
|
|
106
|
+
|
|
107
|
+
## Output Policy
|
|
108
|
+
|
|
109
|
+
- For lists, show name, type, and last modified; limit to 5 files unless asked for more.
|
|
110
|
+
- When `webViewLink` is available, render the file name as a Markdown link to it — `[name](webViewLink)`. Never present the URL bare or wrapped in backticks, or it won't be clickable.
|
|
111
|
+
- Never attempt to download large binary files; export text content instead.
|
|
112
|
+
- Confirm before trashing files; show the file name so the user can verify.
|
|
113
|
+
|
|
114
|
+
## Common Mistakes
|
|
115
|
+
|
|
116
|
+
- Calling `files.list` without a `fields` mask — payloads are huge by default.
|
|
117
|
+
- Calling `files.get` with a guessed file id — list/search first.
|
|
118
|
+
- Downloading binaries instead of exporting text.
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
{
|
|
2
|
+
"operations": [
|
|
3
|
+
{
|
|
4
|
+
"tool": "drive_create_folder",
|
|
5
|
+
"description": "Create a Google Drive folder, optionally inside a parent folder.",
|
|
6
|
+
"parameters": {
|
|
7
|
+
"type": "object",
|
|
8
|
+
"properties": {
|
|
9
|
+
"name": { "type": "string", "description": "Folder name" },
|
|
10
|
+
"parentId": {
|
|
11
|
+
"type": "string",
|
|
12
|
+
"description": "Parent folder id; omit for the Drive root"
|
|
13
|
+
}
|
|
14
|
+
},
|
|
15
|
+
"required": ["name"]
|
|
16
|
+
},
|
|
17
|
+
"request": {
|
|
18
|
+
"method": "POST",
|
|
19
|
+
"url": "https://www.googleapis.com/drive/v3/files",
|
|
20
|
+
"builder": "drive-create-folder"
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
"tool": "drive_trash",
|
|
25
|
+
"description": "Move a Google Drive file or folder to the trash. Confirm the file name with the user first; list or search for the id, never guess it.",
|
|
26
|
+
"parameters": {
|
|
27
|
+
"type": "object",
|
|
28
|
+
"properties": {
|
|
29
|
+
"fileId": { "type": "string", "description": "File id from a previous files.list" }
|
|
30
|
+
},
|
|
31
|
+
"required": ["fileId"]
|
|
32
|
+
},
|
|
33
|
+
"request": {
|
|
34
|
+
"method": "PATCH",
|
|
35
|
+
"url": "https://www.googleapis.com/drive/v3/files/{fileId}",
|
|
36
|
+
"builder": "drive-trash"
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
]
|
|
40
|
+
}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: google-sheets
|
|
3
|
+
description: Create, read, and update Google Sheets spreadsheets via the Google Sheets REST API.
|
|
4
|
+
tools: [http_request, sheets_create, sheets_write_values, sheets_append_values]
|
|
5
|
+
platform: [darwin, linux, win32]
|
|
6
|
+
credentials: [google_sheets_access_token]
|
|
7
|
+
allow_list:
|
|
8
|
+
[https://sheets.googleapis.com/v4/spreadsheets, https://www.googleapis.com/drive/v3/files]
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
# Google Sheets
|
|
12
|
+
|
|
13
|
+
Use `sheets_create`, `sheets_write_values`, and `sheets_append_values` for
|
|
14
|
+
creating and writing cells — they set `valueInputOption` for you. Use
|
|
15
|
+
`http_request` for everything else (reads, `batchUpdate`, Drive search, trash).
|
|
16
|
+
For each `http_request`, set `auth.tokenCredentialKey` to
|
|
17
|
+
`google_sheets_access_token`. Call one tool per operation with one complete structured
|
|
18
|
+
object; `body` and `values` are JSON values, never serialized strings.
|
|
19
|
+
|
|
20
|
+
## Load the Recipe File First
|
|
21
|
+
|
|
22
|
+
This file carries no requests. The working calls live in three reference
|
|
23
|
+
files — load the one for the job with the `skill` tool BEFORE calling any tool,
|
|
24
|
+
then copy its call and change only the values:
|
|
25
|
+
|
|
26
|
+
Each load is a real `skill` tool call — printing the call as JSON or text in
|
|
27
|
+
your reply loads nothing.
|
|
28
|
+
|
|
29
|
+
- **Reading or finding spreadsheets** — "what's in the sheet", "show me the
|
|
30
|
+
values", "find / list my spreadsheets": call the `skill` tool with
|
|
31
|
+
`name: "google-sheets"` and `file: "references/read.md"`.
|
|
32
|
+
- **Creating a new spreadsheet** (no existing spreadsheet involved; may fill
|
|
33
|
+
it with a first table): call the `skill` tool with `name: "google-sheets"`
|
|
34
|
+
and `file: "references/create.md"`.
|
|
35
|
+
- **Changing an existing spreadsheet** — write or overwrite cells, append rows,
|
|
36
|
+
clear a range, add a sheet tab, other structural changes, move it to the
|
|
37
|
+
trash: call the `skill` tool with `name: "google-sheets"` and
|
|
38
|
+
`file: "references/edit.md"`.
|
|
39
|
+
|
|
40
|
+
Never write a call from memory. The recipes carry the range rules and the
|
|
41
|
+
exact request shapes that fail in non-obvious ways when improvised; loading
|
|
42
|
+
the file is one cheap read-only call.
|
|
43
|
+
|
|
44
|
+
## Prerequisites
|
|
45
|
+
|
|
46
|
+
Google Sheets must be connected. Each Google skill is connected separately, with its
|
|
47
|
+
own app and its own approval — connecting one grants nothing to the others. If
|
|
48
|
+
credentials are missing, tell the user to connect Google Sheets from Settings, or to
|
|
49
|
+
set the `google_sheets_access_token` credential.
|
|
50
|
+
|
|
51
|
+
## Identifiers and Ranges
|
|
52
|
+
|
|
53
|
+
Spreadsheets are identified by `spreadsheetId` — the alphanumeric string in the
|
|
54
|
+
URL `docs.google.com/spreadsheets/d/{spreadsheetId}/...`, or the `id` of a
|
|
55
|
+
`sheets_create` result or Drive search hit. Listing and searching use the
|
|
56
|
+
Google Drive API, not the Sheets API.
|
|
57
|
+
|
|
58
|
+
Ranges use A1 notation: `Sheet1!A1`, `Sheet1!A1:B10`, `Sheet1!A:A` (entire
|
|
59
|
+
column), `Sheet1!1:1` (entire row); quote sheet names with spaces:
|
|
60
|
+
`'My Sheet'!A1`. The first sheet of a spreadsheet is NOT always called
|
|
61
|
+
`Sheet1` — Google names it in the account's language (`Página1`, `Feuille1`,
|
|
62
|
+
`Tabellenblatt1`, …). A range with no sheet name (`A1:C3`) always targets the
|
|
63
|
+
first sheet; the recipe files say when to use it.
|
|
64
|
+
|
|
65
|
+
## Output Policy
|
|
66
|
+
|
|
67
|
+
- For reads, present values in a table format with headers when available.
|
|
68
|
+
- For writes, confirm the range and values with the user first unless they
|
|
69
|
+
already spelled them out.
|
|
70
|
+
- Report success only when the response contains the `spreadsheetId` and the
|
|
71
|
+
updated range, and name the spreadsheet (title or link) in the answer.
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
{
|
|
2
|
+
"operations": [
|
|
3
|
+
{
|
|
4
|
+
"tool": "sheets_create",
|
|
5
|
+
"description": "Create an empty Google Sheets spreadsheet. The response id is the spreadsheetId for later writes.",
|
|
6
|
+
"parameters": {
|
|
7
|
+
"type": "object",
|
|
8
|
+
"properties": {
|
|
9
|
+
"name": { "type": "string", "description": "Spreadsheet name" }
|
|
10
|
+
},
|
|
11
|
+
"required": ["name"]
|
|
12
|
+
},
|
|
13
|
+
"request": {
|
|
14
|
+
"method": "POST",
|
|
15
|
+
"url": "https://www.googleapis.com/drive/v3/files",
|
|
16
|
+
"builder": "sheets-create"
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
"tool": "sheets_write_values",
|
|
21
|
+
"description": "Overwrite cells in a range with a 2D array of rows. The range must match the data dimensions or be a single top-left cell. valueInputOption defaults to USER_ENTERED (formulas and dates are parsed).",
|
|
22
|
+
"parameters": {
|
|
23
|
+
"type": "object",
|
|
24
|
+
"properties": {
|
|
25
|
+
"spreadsheetId": { "type": "string", "description": "Spreadsheet id" },
|
|
26
|
+
"range": {
|
|
27
|
+
"type": "string",
|
|
28
|
+
"description": "A1 notation. Omit the sheet name to target the first sheet whatever its language (e.g. A1); name a sheet only for another tab, quoted if it has spaces (e.g. 'My Sheet'!A1)"
|
|
29
|
+
},
|
|
30
|
+
"values": {
|
|
31
|
+
"type": "array",
|
|
32
|
+
"items": {
|
|
33
|
+
"type": "array",
|
|
34
|
+
"items": { "type": ["string", "number", "boolean", "null"] }
|
|
35
|
+
},
|
|
36
|
+
"description": "Rows of cell values"
|
|
37
|
+
},
|
|
38
|
+
"valueInputOption": {
|
|
39
|
+
"type": "string",
|
|
40
|
+
"enum": ["RAW", "USER_ENTERED"],
|
|
41
|
+
"description": "RAW inserts values as-is; USER_ENTERED parses formulas and dates"
|
|
42
|
+
}
|
|
43
|
+
},
|
|
44
|
+
"required": ["spreadsheetId", "range", "values"]
|
|
45
|
+
},
|
|
46
|
+
"request": {
|
|
47
|
+
"method": "PUT",
|
|
48
|
+
"url": "https://sheets.googleapis.com/v4/spreadsheets/{spreadsheetId}/values/{range}",
|
|
49
|
+
"builder": "sheets-write-values"
|
|
50
|
+
}
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
"tool": "sheets_append_values",
|
|
54
|
+
"description": "Append rows after the last row of data in a range. valueInputOption defaults to USER_ENTERED.",
|
|
55
|
+
"parameters": {
|
|
56
|
+
"type": "object",
|
|
57
|
+
"properties": {
|
|
58
|
+
"spreadsheetId": { "type": "string", "description": "Spreadsheet id" },
|
|
59
|
+
"range": {
|
|
60
|
+
"type": "string",
|
|
61
|
+
"description": "A1 notation of the table's columns to append to. Omit the sheet name for the first sheet (e.g. A:C); name a sheet only for another tab (e.g. 'My Sheet'!A:C)"
|
|
62
|
+
},
|
|
63
|
+
"values": {
|
|
64
|
+
"type": "array",
|
|
65
|
+
"items": {
|
|
66
|
+
"type": "array",
|
|
67
|
+
"items": { "type": ["string", "number", "boolean", "null"] }
|
|
68
|
+
},
|
|
69
|
+
"description": "Rows of cell values"
|
|
70
|
+
},
|
|
71
|
+
"valueInputOption": {
|
|
72
|
+
"type": "string",
|
|
73
|
+
"enum": ["RAW", "USER_ENTERED"]
|
|
74
|
+
}
|
|
75
|
+
},
|
|
76
|
+
"required": ["spreadsheetId", "range", "values"]
|
|
77
|
+
},
|
|
78
|
+
"request": {
|
|
79
|
+
"method": "POST",
|
|
80
|
+
"url": "https://sheets.googleapis.com/v4/spreadsheets/{spreadsheetId}/values/{range}:append",
|
|
81
|
+
"builder": "sheets-append-values"
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
]
|
|
85
|
+
}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
# Creating a Spreadsheet
|
|
2
|
+
|
|
3
|
+
Two tool calls: `sheets_create` makes the file, `sheets_write_values` fills
|
|
4
|
+
it. Typed tools select their own credential.
|
|
5
|
+
|
|
6
|
+
## Create the spreadsheet
|
|
7
|
+
|
|
8
|
+
```json
|
|
9
|
+
{ "name": "My Spreadsheet" }
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
Call `sheets_create` with that object. The result's `id` is the
|
|
13
|
+
`spreadsheetId`. Capture it and keep using it. Create exactly once — never
|
|
14
|
+
follow a successful create with a Drive search or another create to rediscover
|
|
15
|
+
the id.
|
|
16
|
+
|
|
17
|
+
## Fill it with a first table
|
|
18
|
+
|
|
19
|
+
Call `sheets_write_values`. `values` is an array of rows; every row is an array
|
|
20
|
+
of cells. Use the range `A1` with NO sheet name: the new file's only sheet is
|
|
21
|
+
named in the account's language (`Sheet1`, `Página1`, `Feuille1`, …), and a
|
|
22
|
+
range without a sheet name always targets the first sheet, so the write cannot
|
|
23
|
+
fail on the name.
|
|
24
|
+
|
|
25
|
+
```json
|
|
26
|
+
{
|
|
27
|
+
"spreadsheetId": "<id from sheets_create>",
|
|
28
|
+
"range": "A1",
|
|
29
|
+
"values": [
|
|
30
|
+
["Name", "Age"],
|
|
31
|
+
["Alice", 30],
|
|
32
|
+
["Bob", 25]
|
|
33
|
+
]
|
|
34
|
+
}
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
`valueInputOption` defaults to `USER_ENTERED` (formulas, numbers and dates are
|
|
38
|
+
parsed like typing them in); pass `"valueInputOption": "RAW"` only to store
|
|
39
|
+
every value exactly as given. The response reports `updatedRange` and
|
|
40
|
+
`updatedCells` — that is the confirmation.
|
|
41
|
+
|
|
42
|
+
## Finishing
|
|
43
|
+
|
|
44
|
+
Answer with the spreadsheet name and the link
|
|
45
|
+
`https://docs.google.com/spreadsheets/d/{spreadsheetId}/edit`. Do not read the
|
|
46
|
+
values back to "confirm" a write that already reported `updatedCells`.
|
|
47
|
+
|
|
48
|
+
## Common Mistakes
|
|
49
|
+
|
|
50
|
+
- Writing to `Sheet1!A1` on a freshly created file — if the account's language
|
|
51
|
+
is not English the sheet is not called `Sheet1` and the write fails with
|
|
52
|
+
`Unable to parse range`. Use `A1` without a sheet name.
|
|
53
|
+
- Creating through `http_request` — `sheets_create` is the supported path.
|
|
54
|
+
- Passing `values` as a string, or rows that are not arrays.
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
# Editing an Existing Spreadsheet
|
|
2
|
+
|
|
3
|
+
Cell writes use the typed tools `sheets_write_values` (overwrite) and
|
|
4
|
+
`sheets_append_values` (add rows) — they set `valueInputOption` for you.
|
|
5
|
+
Everything else (clear, structural changes, trash) is one `http_request` with
|
|
6
|
+
a structured object. For each `http_request`, set `auth.tokenCredentialKey` to `google_sheets_access_token`. Get the `spreadsheetId` from the URL the user gave, an earlier
|
|
7
|
+
`sheets_create` result, or a Drive search (`references/read.md`).
|
|
8
|
+
|
|
9
|
+
Ranges: a range with no sheet name (`A1`, `A2:B10`) targets the first sheet
|
|
10
|
+
whatever its language. Name a sheet only for another tab, quoted if it has
|
|
11
|
+
spaces (`'My Sheet'!A1`).
|
|
12
|
+
|
|
13
|
+
## Overwrite cells
|
|
14
|
+
|
|
15
|
+
Call `sheets_write_values`. The range is the top-left cell; the values block
|
|
16
|
+
grows from there. `values` is an array of rows, each an array of cells.
|
|
17
|
+
|
|
18
|
+
```json
|
|
19
|
+
{
|
|
20
|
+
"spreadsheetId": "<id>",
|
|
21
|
+
"range": "A1",
|
|
22
|
+
"values": [
|
|
23
|
+
["Name", "Age"],
|
|
24
|
+
["Alice", 30],
|
|
25
|
+
["Bob", 25]
|
|
26
|
+
]
|
|
27
|
+
}
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
To change one cell, use that cell as the range with a single-row, single-cell
|
|
31
|
+
`values` array (`"range": "B2", "values": [["100"]]`). Pass
|
|
32
|
+
`"valueInputOption": "RAW"` only to store values exactly as given; the default
|
|
33
|
+
`USER_ENTERED` parses formulas, numbers and dates.
|
|
34
|
+
|
|
35
|
+
## Append rows
|
|
36
|
+
|
|
37
|
+
Call `sheets_append_values` with the range of the table the rows belong to
|
|
38
|
+
(its columns, not the empty row you expect); the API finds the first empty row
|
|
39
|
+
after that table.
|
|
40
|
+
|
|
41
|
+
```json
|
|
42
|
+
{
|
|
43
|
+
"spreadsheetId": "<id>",
|
|
44
|
+
"range": "A:B",
|
|
45
|
+
"values": [
|
|
46
|
+
["Charlie", 28],
|
|
47
|
+
["Diana", 32]
|
|
48
|
+
]
|
|
49
|
+
}
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
## Clear a range
|
|
53
|
+
|
|
54
|
+
```json
|
|
55
|
+
{
|
|
56
|
+
"url": "https://sheets.googleapis.com/v4/spreadsheets/{spreadsheetId}/values/A2:B10:clear",
|
|
57
|
+
"auth": { "tokenCredentialKey": "google_sheets_access_token" },
|
|
58
|
+
"method": "POST",
|
|
59
|
+
"body": {}
|
|
60
|
+
}
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
## Structural changes (batchUpdate)
|
|
64
|
+
|
|
65
|
+
Adding or removing sheets, resizing, formatting, and other structural
|
|
66
|
+
operations use `batchUpdate`; its items are always wrapped in
|
|
67
|
+
`{ "requests": [ … ] }`, and cell values never go through it:
|
|
68
|
+
|
|
69
|
+
```json
|
|
70
|
+
{
|
|
71
|
+
"url": "https://sheets.googleapis.com/v4/spreadsheets/{spreadsheetId}:batchUpdate",
|
|
72
|
+
"auth": { "tokenCredentialKey": "google_sheets_access_token" },
|
|
73
|
+
"method": "POST",
|
|
74
|
+
"body": {
|
|
75
|
+
"requests": [
|
|
76
|
+
{
|
|
77
|
+
"addSheet": {
|
|
78
|
+
"properties": { "title": "New Sheet", "sheetType": "GRID" }
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
]
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
Requests that target a sheet by `sheetId` (delete, resize, format) need the
|
|
87
|
+
numeric id from the metadata call in `references/read.md`, not the tab name.
|
|
88
|
+
|
|
89
|
+
## Move a spreadsheet to the trash
|
|
90
|
+
|
|
91
|
+
Trashing goes through the Drive API; the user can restore it from Drive's
|
|
92
|
+
trash. Only do this when the user explicitly asks to delete or remove the
|
|
93
|
+
spreadsheet.
|
|
94
|
+
|
|
95
|
+
```json
|
|
96
|
+
{
|
|
97
|
+
"url": "https://www.googleapis.com/drive/v3/files/{spreadsheetId}",
|
|
98
|
+
"auth": { "tokenCredentialKey": "google_sheets_access_token" },
|
|
99
|
+
"method": "PATCH",
|
|
100
|
+
"body": { "trashed": true }
|
|
101
|
+
}
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
## If a range is rejected
|
|
105
|
+
|
|
106
|
+
`400 Unable to parse range: Sheet1!A1` means the spreadsheet has no sheet
|
|
107
|
+
called `Sheet1` — Google names the first sheet in the account's language. Do
|
|
108
|
+
NOT retry the same range: drop the sheet name, or GET the metadata
|
|
109
|
+
(`references/read.md`) for the real title.
|
|
110
|
+
|
|
111
|
+
## Finishing
|
|
112
|
+
|
|
113
|
+
A write is confirmed by `updatedRange`/`updatedCells` (or `updates` for
|
|
114
|
+
append, `replies` for batchUpdate) in the response — do not read the values
|
|
115
|
+
back to check. Name the spreadsheet in the answer.
|
|
116
|
+
|
|
117
|
+
## Common Mistakes
|
|
118
|
+
|
|
119
|
+
- Writing cell values with `http_request` PUT or with `batchUpdate` — use the
|
|
120
|
+
typed tools.
|
|
121
|
+
- Naming a sheet that does not exist (`Sheet1!…` on a non-English account) —
|
|
122
|
+
leave the sheet name out for the first sheet.
|
|
123
|
+
- Appending to an empty row range instead of the table's columns.
|
|
124
|
+
- Passing `values` as a string, or rows that are not arrays.
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
# Reading and Finding Spreadsheets
|
|
2
|
+
|
|
3
|
+
Reads go through `http_request` with a structured object. For each request, set `auth.tokenCredentialKey` to `google_sheets_access_token`.
|
|
4
|
+
|
|
5
|
+
## Get values from a range
|
|
6
|
+
|
|
7
|
+
Always specify `valueRenderOption`: `FORMATTED_VALUE` for displayed values
|
|
8
|
+
(formulas evaluated) or `UNFORMATTED_VALUE` for raw cell content.
|
|
9
|
+
|
|
10
|
+
```json
|
|
11
|
+
{
|
|
12
|
+
"url": "https://sheets.googleapis.com/v4/spreadsheets/{spreadsheetId}/values/A1:C10",
|
|
13
|
+
"auth": { "tokenCredentialKey": "google_sheets_access_token" },
|
|
14
|
+
"method": "GET",
|
|
15
|
+
"query": { "valueRenderOption": "FORMATTED_VALUE" }
|
|
16
|
+
}
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
A range with no sheet name (`A1:C10`) reads the first sheet whatever its
|
|
20
|
+
language; add a sheet name only for another tab, quoted if it has spaces
|
|
21
|
+
(`'My Sheet'!A1:C10`). The response contains a `values` array of rows; each row
|
|
22
|
+
is an array of cell strings. Trailing empty cells are omitted, so rows can
|
|
23
|
+
differ in length. To read everything on the first sheet, GET the spreadsheet
|
|
24
|
+
metadata below for the tab title and use it alone as the range. Present the
|
|
25
|
+
rows as a table with the first row as headers when it looks like one.
|
|
26
|
+
|
|
27
|
+
## Get spreadsheet metadata (sheet names)
|
|
28
|
+
|
|
29
|
+
When you need the tab names or their numeric ids before a follow-up call:
|
|
30
|
+
|
|
31
|
+
```json
|
|
32
|
+
{
|
|
33
|
+
"url": "https://sheets.googleapis.com/v4/spreadsheets/{spreadsheetId}",
|
|
34
|
+
"auth": { "tokenCredentialKey": "google_sheets_access_token" },
|
|
35
|
+
"method": "GET",
|
|
36
|
+
"query": { "fields": "spreadsheetId,properties.title,sheets.properties" }
|
|
37
|
+
}
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
## List or search for spreadsheets
|
|
41
|
+
|
|
42
|
+
Use the Google Drive API with a MIME type filter to find spreadsheets by name.
|
|
43
|
+
The `spreadsheetId` you need for a follow-up call is the file `id`.
|
|
44
|
+
|
|
45
|
+
```json
|
|
46
|
+
{
|
|
47
|
+
"url": "https://www.googleapis.com/drive/v3/files",
|
|
48
|
+
"auth": { "tokenCredentialKey": "google_sheets_access_token" },
|
|
49
|
+
"method": "GET",
|
|
50
|
+
"query": {
|
|
51
|
+
"q": "mimeType='application/vnd.google-apps.spreadsheet' and name contains 'budget' and trashed = false",
|
|
52
|
+
"pageSize": 10,
|
|
53
|
+
"fields": "files(id,name,modifiedTime,webViewLink)"
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
To list recent spreadsheets without a name filter, drop the `and name contains …`
|
|
59
|
+
clause and add `"orderBy": "modifiedTime desc"`. Run the search ONCE; if it
|
|
60
|
+
returns nothing, say so rather than retrying with variations.
|
|
61
|
+
|
|
62
|
+
## If a range is rejected
|
|
63
|
+
|
|
64
|
+
`400 Unable to parse range: Sheet1!A1` means the spreadsheet has no sheet
|
|
65
|
+
called `Sheet1` — Google names the first sheet in the account's language. Do
|
|
66
|
+
NOT retry the same range: drop the sheet name (`A1:C10`) or take the real title
|
|
67
|
+
from the metadata call above.
|
|
68
|
+
|
|
69
|
+
## Common Mistakes
|
|
70
|
+
|
|
71
|
+
- Using the wrong MIME type when searching (should be
|
|
72
|
+
`application/vnd.google-apps.spreadsheet`).
|
|
73
|
+
- Reading values through the Drive API — cell values come only from the Sheets
|
|
74
|
+
API `values` endpoint.
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: image-generation
|
|
3
|
+
description: Generate images from text prompts with the local diffusion model.
|
|
4
|
+
tools: [generate_image, edit_image]
|
|
5
|
+
platform: [darwin, linux, win32]
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Image generation
|
|
9
|
+
|
|
10
|
+
Call `generate_image` when the user asks for an image, picture, illustration,
|
|
11
|
+
drawing, or logo. The generated image is saved as a chat attachment and shown
|
|
12
|
+
to the user automatically — never describe pixels, paste data, or apologize
|
|
13
|
+
about being text-only; just confirm what you generated.
|
|
14
|
+
|
|
15
|
+
```json
|
|
16
|
+
{ "prompt": "a watercolor cat on a windowsill, soft morning light" }
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
## Parameters
|
|
20
|
+
|
|
21
|
+
- `prompt` (required) — describe subject, style, and mood in plain language.
|
|
22
|
+
- `width` / `height` — pixels, multiples of 64, max 1024. Default 512×512;
|
|
23
|
+
only change them when the user asks for a specific shape (e.g. wide banner
|
|
24
|
+
→ 1024×512).
|
|
25
|
+
- `negative_prompt` — what to avoid (e.g. `blurry, low quality, watermark`).
|
|
26
|
+
- `seed` — set only when the user wants a reproducible or slightly varied
|
|
27
|
+
retry of a previous result.
|
|
28
|
+
- `steps` — leave unset unless the user asks for a faster draft (lower) or
|
|
29
|
+
higher quality (higher, max 100).
|
|
30
|
+
|
|
31
|
+
## Editing an existing image
|
|
32
|
+
|
|
33
|
+
Call `edit_image` when the user wants an image from this chat modified,
|
|
34
|
+
restyled, or varied ("make it a watercolor", "same but at night"). It edits
|
|
35
|
+
the most recent image by default; pass `attachment_id` (from an earlier
|
|
36
|
+
result) to target another. `strength` 0..1 sets how far to move from the
|
|
37
|
+
source: 0.3-0.5 for subtle changes, 0.7 (default) for restyling, 0.9 for
|
|
38
|
+
loose reinterpretation. Output keeps the source dimensions.
|
|
39
|
+
|
|
40
|
+
```json
|
|
41
|
+
{ "prompt": "turn it into a watercolor painting", "strength": 0.7 }
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
## Notes
|
|
45
|
+
|
|
46
|
+
- Generation takes a while; the result arrives as an attachment in this turn.
|
|
47
|
+
- One generation or edit at a time — if the tool reports it is busy, wait and
|
|
48
|
+
retry instead of stacking calls.
|