@anuma/sdk 6.27.2 → 6.27.4
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/README.md +21 -0
- package/dist/expo/index.cjs +76 -65
- package/dist/expo/index.mjs +76 -65
- package/dist/tools/index.cjs +77 -66
- package/dist/tools/index.d.mts +13 -8
- package/dist/tools/index.d.ts +13 -8
- package/dist/tools/index.mjs +77 -66
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -97,3 +97,24 @@ https://docs.anuma.ai/
|
|
|
97
97
|
|
|
98
98
|
Contributions are welcome. Please open an issue or pull request on
|
|
99
99
|
[GitHub](https://github.com/anuma-ai/sdk).
|
|
100
|
+
|
|
101
|
+
Before opening a PR, run `pnpm test` and `pnpm check`.
|
|
102
|
+
|
|
103
|
+
### Tool, app-generation and slide e2e tests
|
|
104
|
+
|
|
105
|
+
`pnpm e2e:tools` runs the live-model tests in `test/tools/` and
|
|
106
|
+
`test/classifier/` (`vitest.e2e.config.mts`) against a real portal. Copy
|
|
107
|
+
`.env.example` to `.env` and set `PORTAL_API_KEY` (and `ANUMA_API_URL` to
|
|
108
|
+
point at a portal other than dev). Pass a file-name filter to run a subset:
|
|
109
|
+
|
|
110
|
+
```sh
|
|
111
|
+
pnpm e2e:tools # everything
|
|
112
|
+
pnpm e2e:tools weather # test/tools/weather.ts only
|
|
113
|
+
pnpm e2e:tools slide # the slide-generation tests
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
CI runs the same suite on PRs that touch the tool, app-generation or slide code
|
|
117
|
+
(see the `changes` job in `.github/workflows/e2e-tools.yml` for the exact paths)
|
|
118
|
+
and again in the merge queue. PRs without access to the `PORTAL_API_KEY` secret
|
|
119
|
+
(forks, Dependabot) skip it and get their result in the queue. On a PR the result
|
|
120
|
+
is advisory; the queue run is the one that blocks.
|
package/dist/expo/index.cjs
CHANGED
|
@@ -25305,49 +25305,69 @@ function notionUpdatePageTool(run) {
|
|
|
25305
25305
|
type: "function",
|
|
25306
25306
|
function: {
|
|
25307
25307
|
name: "notion-update-page",
|
|
25308
|
-
description: "Update a Notion page's properties or content.
|
|
25308
|
+
description: "Update a Notion page's properties or content. Arguments are flat: page_id, command, and the parameter that command needs. 'insert_content' appends Markdown (needs content). 'update_content' does search-and-replace edits (needs content_updates). 'replace_content' replaces all content (needs new_str). 'update_properties' changes properties (needs properties). 'apply_template' applies a template page (needs template_id). 'update_verification' marks the page verified or unverified (needs verification_status, plus optional verification_expiry_days only when verified).",
|
|
25309
25309
|
arguments: {
|
|
25310
25310
|
type: "object",
|
|
25311
25311
|
properties: {
|
|
25312
|
-
|
|
25313
|
-
type: "
|
|
25314
|
-
description: "
|
|
25315
|
-
|
|
25316
|
-
|
|
25317
|
-
|
|
25318
|
-
|
|
25319
|
-
|
|
25320
|
-
|
|
25321
|
-
|
|
25322
|
-
|
|
25323
|
-
|
|
25324
|
-
|
|
25325
|
-
|
|
25326
|
-
|
|
25327
|
-
|
|
25328
|
-
|
|
25329
|
-
|
|
25312
|
+
page_id: {
|
|
25313
|
+
type: "string",
|
|
25314
|
+
description: "The ID of the page to update (with or without dashes)"
|
|
25315
|
+
},
|
|
25316
|
+
command: {
|
|
25317
|
+
type: "string",
|
|
25318
|
+
enum: [
|
|
25319
|
+
"update_properties",
|
|
25320
|
+
"update_content",
|
|
25321
|
+
"replace_content",
|
|
25322
|
+
"insert_content",
|
|
25323
|
+
"apply_template",
|
|
25324
|
+
"update_verification"
|
|
25325
|
+
],
|
|
25326
|
+
description: "The update command to execute"
|
|
25327
|
+
},
|
|
25328
|
+
content: {
|
|
25329
|
+
type: "string",
|
|
25330
|
+
description: "For insert_content: the Notion-flavored Markdown to insert"
|
|
25331
|
+
},
|
|
25332
|
+
content_updates: {
|
|
25333
|
+
type: "array",
|
|
25334
|
+
description: "For update_content: search-and-replace edits. Each old_str must match existing page text.",
|
|
25335
|
+
items: {
|
|
25336
|
+
type: "object",
|
|
25330
25337
|
properties: {
|
|
25331
|
-
type: "
|
|
25332
|
-
|
|
25333
|
-
},
|
|
25334
|
-
new_str: {
|
|
25335
|
-
type: "string",
|
|
25336
|
-
description: "For replace_content/replace_content_range/insert_content_after: the new content string"
|
|
25338
|
+
old_str: { type: "string", description: "Existing text to replace" },
|
|
25339
|
+
new_str: { type: "string", description: "Replacement text" }
|
|
25337
25340
|
},
|
|
25338
|
-
|
|
25339
|
-
|
|
25340
|
-
|
|
25341
|
-
|
|
25342
|
-
|
|
25343
|
-
|
|
25344
|
-
|
|
25345
|
-
|
|
25346
|
-
|
|
25347
|
-
|
|
25341
|
+
required: ["old_str", "new_str"]
|
|
25342
|
+
}
|
|
25343
|
+
},
|
|
25344
|
+
new_str: {
|
|
25345
|
+
type: "string",
|
|
25346
|
+
description: "For replace_content: the new page content in Notion-flavored Markdown"
|
|
25347
|
+
},
|
|
25348
|
+
properties: {
|
|
25349
|
+
type: "object",
|
|
25350
|
+
description: "For update_properties: JSON map of property names to values. Use null to remove a value."
|
|
25351
|
+
},
|
|
25352
|
+
allow_deleting_content: {
|
|
25353
|
+
type: "boolean",
|
|
25354
|
+
description: "For replace_content/update_content: allow deletion of child pages/databases"
|
|
25355
|
+
},
|
|
25356
|
+
template_id: {
|
|
25357
|
+
type: "string",
|
|
25358
|
+
description: "For apply_template: the ID of the template page to apply"
|
|
25359
|
+
},
|
|
25360
|
+
verification_status: {
|
|
25361
|
+
type: "string",
|
|
25362
|
+
enum: ["verified", "unverified"],
|
|
25363
|
+
description: "For update_verification: the new verification status"
|
|
25364
|
+
},
|
|
25365
|
+
verification_expiry_days: {
|
|
25366
|
+
type: "number",
|
|
25367
|
+
description: "For update_verification: days until the verification expires. Only allowed when verification_status is 'verified'"
|
|
25348
25368
|
}
|
|
25349
25369
|
},
|
|
25350
|
-
required: ["
|
|
25370
|
+
required: ["page_id", "command"]
|
|
25351
25371
|
}
|
|
25352
25372
|
}
|
|
25353
25373
|
});
|
|
@@ -25400,30 +25420,27 @@ function notionCreateDatabaseTool(run) {
|
|
|
25400
25420
|
type: "function",
|
|
25401
25421
|
function: {
|
|
25402
25422
|
name: "notion-create-database",
|
|
25403
|
-
description:
|
|
25423
|
+
description: `Create a new Notion database. Define the columns with a SQL DDL string in schema, for example 'CREATE TABLE ("Name" TITLE, "Notes" RICH_TEXT, "Done" CHECKBOX)'.`,
|
|
25404
25424
|
arguments: {
|
|
25405
25425
|
type: "object",
|
|
25406
25426
|
properties: {
|
|
25407
|
-
|
|
25408
|
-
type: "
|
|
25409
|
-
description: "
|
|
25410
|
-
},
|
|
25411
|
-
parent: {
|
|
25412
|
-
type: "object",
|
|
25413
|
-
description: "Parent page: {type:'page_id', page_id:'...'}. Omit for private workspace-level database."
|
|
25427
|
+
schema: {
|
|
25428
|
+
type: "string",
|
|
25429
|
+
description: "SQL DDL CREATE TABLE statement defining the columns, with quoted column names and types such as TITLE, RICH_TEXT, CHECKBOX"
|
|
25414
25430
|
},
|
|
25415
25431
|
title: {
|
|
25416
|
-
type: "
|
|
25417
|
-
description: "Title of the database
|
|
25418
|
-
items: { type: "object" }
|
|
25432
|
+
type: "string",
|
|
25433
|
+
description: "Title of the database"
|
|
25419
25434
|
},
|
|
25420
|
-
|
|
25421
|
-
type: "
|
|
25422
|
-
description: "
|
|
25423
|
-
|
|
25435
|
+
parent: {
|
|
25436
|
+
type: "object",
|
|
25437
|
+
description: "Parent page: {page_id:'...'}. Omit for private workspace-level database.",
|
|
25438
|
+
properties: {
|
|
25439
|
+
page_id: { type: "string", description: "The ID of the parent page" }
|
|
25440
|
+
}
|
|
25424
25441
|
}
|
|
25425
25442
|
},
|
|
25426
|
-
required: ["
|
|
25443
|
+
required: ["schema"]
|
|
25427
25444
|
}
|
|
25428
25445
|
}
|
|
25429
25446
|
});
|
|
@@ -25433,7 +25450,7 @@ function notionUpdateDataSourceTool(run) {
|
|
|
25433
25450
|
type: "function",
|
|
25434
25451
|
function: {
|
|
25435
25452
|
name: "notion-update-data-source",
|
|
25436
|
-
description:
|
|
25453
|
+
description: `Update a Notion data source's columns, title, or other attributes. Change columns with SQL DDL in statements, for example 'ADD COLUMN "Owner" RICH_TEXT' or 'ADD COLUMN "Done" CHECKBOX'.`,
|
|
25437
25454
|
arguments: {
|
|
25438
25455
|
type: "object",
|
|
25439
25456
|
properties: {
|
|
@@ -25441,19 +25458,13 @@ function notionUpdateDataSourceTool(run) {
|
|
|
25441
25458
|
type: "string",
|
|
25442
25459
|
description: "The ID of the data source to update (UUID). Can be a data source ID or database ID."
|
|
25443
25460
|
},
|
|
25444
|
-
|
|
25445
|
-
type: "
|
|
25446
|
-
description: "
|
|
25447
|
-
items: { type: "object" }
|
|
25448
|
-
},
|
|
25449
|
-
description: {
|
|
25450
|
-
type: "array",
|
|
25451
|
-
description: "New description as rich text array (max 100)",
|
|
25452
|
-
items: { type: "object" }
|
|
25461
|
+
statements: {
|
|
25462
|
+
type: "string",
|
|
25463
|
+
description: "SQL DDL statements that change the columns, such as ADD COLUMN"
|
|
25453
25464
|
},
|
|
25454
|
-
|
|
25455
|
-
type: "
|
|
25456
|
-
description: "
|
|
25465
|
+
title: {
|
|
25466
|
+
type: "string",
|
|
25467
|
+
description: "New title of the data source"
|
|
25457
25468
|
},
|
|
25458
25469
|
is_inline: {
|
|
25459
25470
|
type: "boolean",
|
package/dist/expo/index.mjs
CHANGED
|
@@ -23631,49 +23631,69 @@ function notionUpdatePageTool(run) {
|
|
|
23631
23631
|
type: "function",
|
|
23632
23632
|
function: {
|
|
23633
23633
|
name: "notion-update-page",
|
|
23634
|
-
description: "Update a Notion page's properties or content.
|
|
23634
|
+
description: "Update a Notion page's properties or content. Arguments are flat: page_id, command, and the parameter that command needs. 'insert_content' appends Markdown (needs content). 'update_content' does search-and-replace edits (needs content_updates). 'replace_content' replaces all content (needs new_str). 'update_properties' changes properties (needs properties). 'apply_template' applies a template page (needs template_id). 'update_verification' marks the page verified or unverified (needs verification_status, plus optional verification_expiry_days only when verified).",
|
|
23635
23635
|
arguments: {
|
|
23636
23636
|
type: "object",
|
|
23637
23637
|
properties: {
|
|
23638
|
-
|
|
23639
|
-
type: "
|
|
23640
|
-
description: "
|
|
23641
|
-
|
|
23642
|
-
|
|
23643
|
-
|
|
23644
|
-
|
|
23645
|
-
|
|
23646
|
-
|
|
23647
|
-
|
|
23648
|
-
|
|
23649
|
-
|
|
23650
|
-
|
|
23651
|
-
|
|
23652
|
-
|
|
23653
|
-
|
|
23654
|
-
|
|
23655
|
-
|
|
23638
|
+
page_id: {
|
|
23639
|
+
type: "string",
|
|
23640
|
+
description: "The ID of the page to update (with or without dashes)"
|
|
23641
|
+
},
|
|
23642
|
+
command: {
|
|
23643
|
+
type: "string",
|
|
23644
|
+
enum: [
|
|
23645
|
+
"update_properties",
|
|
23646
|
+
"update_content",
|
|
23647
|
+
"replace_content",
|
|
23648
|
+
"insert_content",
|
|
23649
|
+
"apply_template",
|
|
23650
|
+
"update_verification"
|
|
23651
|
+
],
|
|
23652
|
+
description: "The update command to execute"
|
|
23653
|
+
},
|
|
23654
|
+
content: {
|
|
23655
|
+
type: "string",
|
|
23656
|
+
description: "For insert_content: the Notion-flavored Markdown to insert"
|
|
23657
|
+
},
|
|
23658
|
+
content_updates: {
|
|
23659
|
+
type: "array",
|
|
23660
|
+
description: "For update_content: search-and-replace edits. Each old_str must match existing page text.",
|
|
23661
|
+
items: {
|
|
23662
|
+
type: "object",
|
|
23656
23663
|
properties: {
|
|
23657
|
-
type: "
|
|
23658
|
-
|
|
23659
|
-
},
|
|
23660
|
-
new_str: {
|
|
23661
|
-
type: "string",
|
|
23662
|
-
description: "For replace_content/replace_content_range/insert_content_after: the new content string"
|
|
23664
|
+
old_str: { type: "string", description: "Existing text to replace" },
|
|
23665
|
+
new_str: { type: "string", description: "Replacement text" }
|
|
23663
23666
|
},
|
|
23664
|
-
|
|
23665
|
-
|
|
23666
|
-
|
|
23667
|
-
|
|
23668
|
-
|
|
23669
|
-
|
|
23670
|
-
|
|
23671
|
-
|
|
23672
|
-
|
|
23673
|
-
|
|
23667
|
+
required: ["old_str", "new_str"]
|
|
23668
|
+
}
|
|
23669
|
+
},
|
|
23670
|
+
new_str: {
|
|
23671
|
+
type: "string",
|
|
23672
|
+
description: "For replace_content: the new page content in Notion-flavored Markdown"
|
|
23673
|
+
},
|
|
23674
|
+
properties: {
|
|
23675
|
+
type: "object",
|
|
23676
|
+
description: "For update_properties: JSON map of property names to values. Use null to remove a value."
|
|
23677
|
+
},
|
|
23678
|
+
allow_deleting_content: {
|
|
23679
|
+
type: "boolean",
|
|
23680
|
+
description: "For replace_content/update_content: allow deletion of child pages/databases"
|
|
23681
|
+
},
|
|
23682
|
+
template_id: {
|
|
23683
|
+
type: "string",
|
|
23684
|
+
description: "For apply_template: the ID of the template page to apply"
|
|
23685
|
+
},
|
|
23686
|
+
verification_status: {
|
|
23687
|
+
type: "string",
|
|
23688
|
+
enum: ["verified", "unverified"],
|
|
23689
|
+
description: "For update_verification: the new verification status"
|
|
23690
|
+
},
|
|
23691
|
+
verification_expiry_days: {
|
|
23692
|
+
type: "number",
|
|
23693
|
+
description: "For update_verification: days until the verification expires. Only allowed when verification_status is 'verified'"
|
|
23674
23694
|
}
|
|
23675
23695
|
},
|
|
23676
|
-
required: ["
|
|
23696
|
+
required: ["page_id", "command"]
|
|
23677
23697
|
}
|
|
23678
23698
|
}
|
|
23679
23699
|
});
|
|
@@ -23726,30 +23746,27 @@ function notionCreateDatabaseTool(run) {
|
|
|
23726
23746
|
type: "function",
|
|
23727
23747
|
function: {
|
|
23728
23748
|
name: "notion-create-database",
|
|
23729
|
-
description:
|
|
23749
|
+
description: `Create a new Notion database. Define the columns with a SQL DDL string in schema, for example 'CREATE TABLE ("Name" TITLE, "Notes" RICH_TEXT, "Done" CHECKBOX)'.`,
|
|
23730
23750
|
arguments: {
|
|
23731
23751
|
type: "object",
|
|
23732
23752
|
properties: {
|
|
23733
|
-
|
|
23734
|
-
type: "
|
|
23735
|
-
description: "
|
|
23736
|
-
},
|
|
23737
|
-
parent: {
|
|
23738
|
-
type: "object",
|
|
23739
|
-
description: "Parent page: {type:'page_id', page_id:'...'}. Omit for private workspace-level database."
|
|
23753
|
+
schema: {
|
|
23754
|
+
type: "string",
|
|
23755
|
+
description: "SQL DDL CREATE TABLE statement defining the columns, with quoted column names and types such as TITLE, RICH_TEXT, CHECKBOX"
|
|
23740
23756
|
},
|
|
23741
23757
|
title: {
|
|
23742
|
-
type: "
|
|
23743
|
-
description: "Title of the database
|
|
23744
|
-
items: { type: "object" }
|
|
23758
|
+
type: "string",
|
|
23759
|
+
description: "Title of the database"
|
|
23745
23760
|
},
|
|
23746
|
-
|
|
23747
|
-
type: "
|
|
23748
|
-
description: "
|
|
23749
|
-
|
|
23761
|
+
parent: {
|
|
23762
|
+
type: "object",
|
|
23763
|
+
description: "Parent page: {page_id:'...'}. Omit for private workspace-level database.",
|
|
23764
|
+
properties: {
|
|
23765
|
+
page_id: { type: "string", description: "The ID of the parent page" }
|
|
23766
|
+
}
|
|
23750
23767
|
}
|
|
23751
23768
|
},
|
|
23752
|
-
required: ["
|
|
23769
|
+
required: ["schema"]
|
|
23753
23770
|
}
|
|
23754
23771
|
}
|
|
23755
23772
|
});
|
|
@@ -23759,7 +23776,7 @@ function notionUpdateDataSourceTool(run) {
|
|
|
23759
23776
|
type: "function",
|
|
23760
23777
|
function: {
|
|
23761
23778
|
name: "notion-update-data-source",
|
|
23762
|
-
description:
|
|
23779
|
+
description: `Update a Notion data source's columns, title, or other attributes. Change columns with SQL DDL in statements, for example 'ADD COLUMN "Owner" RICH_TEXT' or 'ADD COLUMN "Done" CHECKBOX'.`,
|
|
23763
23780
|
arguments: {
|
|
23764
23781
|
type: "object",
|
|
23765
23782
|
properties: {
|
|
@@ -23767,19 +23784,13 @@ function notionUpdateDataSourceTool(run) {
|
|
|
23767
23784
|
type: "string",
|
|
23768
23785
|
description: "The ID of the data source to update (UUID). Can be a data source ID or database ID."
|
|
23769
23786
|
},
|
|
23770
|
-
|
|
23771
|
-
type: "
|
|
23772
|
-
description: "
|
|
23773
|
-
items: { type: "object" }
|
|
23774
|
-
},
|
|
23775
|
-
description: {
|
|
23776
|
-
type: "array",
|
|
23777
|
-
description: "New description as rich text array (max 100)",
|
|
23778
|
-
items: { type: "object" }
|
|
23787
|
+
statements: {
|
|
23788
|
+
type: "string",
|
|
23789
|
+
description: "SQL DDL statements that change the columns, such as ADD COLUMN"
|
|
23779
23790
|
},
|
|
23780
|
-
|
|
23781
|
-
type: "
|
|
23782
|
-
description: "
|
|
23791
|
+
title: {
|
|
23792
|
+
type: "string",
|
|
23793
|
+
description: "New title of the data source"
|
|
23783
23794
|
},
|
|
23784
23795
|
is_inline: {
|
|
23785
23796
|
type: "boolean",
|
package/dist/tools/index.cjs
CHANGED
|
@@ -2503,49 +2503,69 @@ function notionUpdatePageTool(run) {
|
|
|
2503
2503
|
type: "function",
|
|
2504
2504
|
function: {
|
|
2505
2505
|
name: "notion-update-page",
|
|
2506
|
-
description: "Update a Notion page's properties or content.
|
|
2506
|
+
description: "Update a Notion page's properties or content. Arguments are flat: page_id, command, and the parameter that command needs. 'insert_content' appends Markdown (needs content). 'update_content' does search-and-replace edits (needs content_updates). 'replace_content' replaces all content (needs new_str). 'update_properties' changes properties (needs properties). 'apply_template' applies a template page (needs template_id). 'update_verification' marks the page verified or unverified (needs verification_status, plus optional verification_expiry_days only when verified).",
|
|
2507
2507
|
arguments: {
|
|
2508
2508
|
type: "object",
|
|
2509
2509
|
properties: {
|
|
2510
|
-
|
|
2511
|
-
type: "
|
|
2512
|
-
description: "
|
|
2513
|
-
|
|
2514
|
-
|
|
2515
|
-
|
|
2516
|
-
|
|
2517
|
-
|
|
2518
|
-
|
|
2519
|
-
|
|
2520
|
-
|
|
2521
|
-
|
|
2522
|
-
|
|
2523
|
-
|
|
2524
|
-
|
|
2525
|
-
|
|
2526
|
-
|
|
2527
|
-
|
|
2510
|
+
page_id: {
|
|
2511
|
+
type: "string",
|
|
2512
|
+
description: "The ID of the page to update (with or without dashes)"
|
|
2513
|
+
},
|
|
2514
|
+
command: {
|
|
2515
|
+
type: "string",
|
|
2516
|
+
enum: [
|
|
2517
|
+
"update_properties",
|
|
2518
|
+
"update_content",
|
|
2519
|
+
"replace_content",
|
|
2520
|
+
"insert_content",
|
|
2521
|
+
"apply_template",
|
|
2522
|
+
"update_verification"
|
|
2523
|
+
],
|
|
2524
|
+
description: "The update command to execute"
|
|
2525
|
+
},
|
|
2526
|
+
content: {
|
|
2527
|
+
type: "string",
|
|
2528
|
+
description: "For insert_content: the Notion-flavored Markdown to insert"
|
|
2529
|
+
},
|
|
2530
|
+
content_updates: {
|
|
2531
|
+
type: "array",
|
|
2532
|
+
description: "For update_content: search-and-replace edits. Each old_str must match existing page text.",
|
|
2533
|
+
items: {
|
|
2534
|
+
type: "object",
|
|
2528
2535
|
properties: {
|
|
2529
|
-
type: "
|
|
2530
|
-
|
|
2531
|
-
},
|
|
2532
|
-
new_str: {
|
|
2533
|
-
type: "string",
|
|
2534
|
-
description: "For replace_content/replace_content_range/insert_content_after: the new content string"
|
|
2535
|
-
},
|
|
2536
|
-
selection_with_ellipsis: {
|
|
2537
|
-
type: "string",
|
|
2538
|
-
description: "For replace_content_range/insert_content_after: unique start and end snippet (~10 chars each with ellipsis)"
|
|
2536
|
+
old_str: { type: "string", description: "Existing text to replace" },
|
|
2537
|
+
new_str: { type: "string", description: "Replacement text" }
|
|
2539
2538
|
},
|
|
2540
|
-
|
|
2541
|
-
|
|
2542
|
-
|
|
2543
|
-
|
|
2544
|
-
|
|
2545
|
-
|
|
2539
|
+
required: ["old_str", "new_str"]
|
|
2540
|
+
}
|
|
2541
|
+
},
|
|
2542
|
+
new_str: {
|
|
2543
|
+
type: "string",
|
|
2544
|
+
description: "For replace_content: the new page content in Notion-flavored Markdown"
|
|
2545
|
+
},
|
|
2546
|
+
properties: {
|
|
2547
|
+
type: "object",
|
|
2548
|
+
description: "For update_properties: JSON map of property names to values. Use null to remove a value."
|
|
2549
|
+
},
|
|
2550
|
+
allow_deleting_content: {
|
|
2551
|
+
type: "boolean",
|
|
2552
|
+
description: "For replace_content/update_content: allow deletion of child pages/databases"
|
|
2553
|
+
},
|
|
2554
|
+
template_id: {
|
|
2555
|
+
type: "string",
|
|
2556
|
+
description: "For apply_template: the ID of the template page to apply"
|
|
2557
|
+
},
|
|
2558
|
+
verification_status: {
|
|
2559
|
+
type: "string",
|
|
2560
|
+
enum: ["verified", "unverified"],
|
|
2561
|
+
description: "For update_verification: the new verification status"
|
|
2562
|
+
},
|
|
2563
|
+
verification_expiry_days: {
|
|
2564
|
+
type: "number",
|
|
2565
|
+
description: "For update_verification: days until the verification expires. Only allowed when verification_status is 'verified'"
|
|
2546
2566
|
}
|
|
2547
2567
|
},
|
|
2548
|
-
required: ["
|
|
2568
|
+
required: ["page_id", "command"]
|
|
2549
2569
|
}
|
|
2550
2570
|
}
|
|
2551
2571
|
});
|
|
@@ -2607,30 +2627,27 @@ function notionCreateDatabaseTool(run) {
|
|
|
2607
2627
|
type: "function",
|
|
2608
2628
|
function: {
|
|
2609
2629
|
name: "notion-create-database",
|
|
2610
|
-
description:
|
|
2630
|
+
description: `Create a new Notion database. Define the columns with a SQL DDL string in schema, for example 'CREATE TABLE ("Name" TITLE, "Notes" RICH_TEXT, "Done" CHECKBOX)'.`,
|
|
2611
2631
|
arguments: {
|
|
2612
2632
|
type: "object",
|
|
2613
2633
|
properties: {
|
|
2614
|
-
|
|
2615
|
-
type: "
|
|
2616
|
-
description: "
|
|
2617
|
-
},
|
|
2618
|
-
parent: {
|
|
2619
|
-
type: "object",
|
|
2620
|
-
description: "Parent page: {type:'page_id', page_id:'...'}. Omit for private workspace-level database."
|
|
2634
|
+
schema: {
|
|
2635
|
+
type: "string",
|
|
2636
|
+
description: "SQL DDL CREATE TABLE statement defining the columns, with quoted column names and types such as TITLE, RICH_TEXT, CHECKBOX"
|
|
2621
2637
|
},
|
|
2622
2638
|
title: {
|
|
2623
|
-
type: "
|
|
2624
|
-
description: "Title of the database
|
|
2625
|
-
items: { type: "object" }
|
|
2639
|
+
type: "string",
|
|
2640
|
+
description: "Title of the database"
|
|
2626
2641
|
},
|
|
2627
|
-
|
|
2628
|
-
type: "
|
|
2629
|
-
description: "
|
|
2630
|
-
|
|
2642
|
+
parent: {
|
|
2643
|
+
type: "object",
|
|
2644
|
+
description: "Parent page: {page_id:'...'}. Omit for private workspace-level database.",
|
|
2645
|
+
properties: {
|
|
2646
|
+
page_id: { type: "string", description: "The ID of the parent page" }
|
|
2647
|
+
}
|
|
2631
2648
|
}
|
|
2632
2649
|
},
|
|
2633
|
-
required: ["
|
|
2650
|
+
required: ["schema"]
|
|
2634
2651
|
}
|
|
2635
2652
|
}
|
|
2636
2653
|
});
|
|
@@ -2643,7 +2660,7 @@ function notionUpdateDataSourceTool(run) {
|
|
|
2643
2660
|
type: "function",
|
|
2644
2661
|
function: {
|
|
2645
2662
|
name: "notion-update-data-source",
|
|
2646
|
-
description:
|
|
2663
|
+
description: `Update a Notion data source's columns, title, or other attributes. Change columns with SQL DDL in statements, for example 'ADD COLUMN "Owner" RICH_TEXT' or 'ADD COLUMN "Done" CHECKBOX'.`,
|
|
2647
2664
|
arguments: {
|
|
2648
2665
|
type: "object",
|
|
2649
2666
|
properties: {
|
|
@@ -2651,19 +2668,13 @@ function notionUpdateDataSourceTool(run) {
|
|
|
2651
2668
|
type: "string",
|
|
2652
2669
|
description: "The ID of the data source to update (UUID). Can be a data source ID or database ID."
|
|
2653
2670
|
},
|
|
2654
|
-
|
|
2655
|
-
type: "
|
|
2656
|
-
description: "
|
|
2657
|
-
items: { type: "object" }
|
|
2658
|
-
},
|
|
2659
|
-
description: {
|
|
2660
|
-
type: "array",
|
|
2661
|
-
description: "New description as rich text array (max 100)",
|
|
2662
|
-
items: { type: "object" }
|
|
2671
|
+
statements: {
|
|
2672
|
+
type: "string",
|
|
2673
|
+
description: "SQL DDL statements that change the columns, such as ADD COLUMN"
|
|
2663
2674
|
},
|
|
2664
|
-
|
|
2665
|
-
type: "
|
|
2666
|
-
description: "
|
|
2675
|
+
title: {
|
|
2676
|
+
type: "string",
|
|
2677
|
+
description: "New title of the data source"
|
|
2667
2678
|
},
|
|
2668
2679
|
is_inline: {
|
|
2669
2680
|
type: "boolean",
|
|
@@ -12103,7 +12114,7 @@ function summarizeDeck(deck) {
|
|
|
12103
12114
|
const slideId = typeof child.attrs.id === "string" ? child.attrs.id : `(no-id-${n})`;
|
|
12104
12115
|
const layout = typeof child.attrs.compositionName === "string" ? child.attrs.compositionName : typeof child.attrs.layout === "string" ? child.attrs.layout : "(layout unknown)";
|
|
12105
12116
|
lines.push("");
|
|
12106
|
-
lines.push(`Slide ${n}
|
|
12117
|
+
lines.push(`Slide ${n} \u2014 id: "${slideId}", layout: ${layout}`);
|
|
12107
12118
|
const elementSummaries = [];
|
|
12108
12119
|
const textPreviews = [];
|
|
12109
12120
|
for (const el of child.children) {
|
package/dist/tools/index.d.mts
CHANGED
|
@@ -692,14 +692,19 @@ interface NotionCreatePagesArgs {
|
|
|
692
692
|
parent?: Record<string, unknown>;
|
|
693
693
|
}
|
|
694
694
|
interface NotionUpdatePageArgs {
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
695
|
+
page_id: string;
|
|
696
|
+
command: "update_properties" | "update_content" | "replace_content" | "insert_content" | "apply_template" | "update_verification";
|
|
697
|
+
content?: string;
|
|
698
|
+
content_updates?: Array<{
|
|
699
|
+
old_str: string;
|
|
700
|
+
new_str: string;
|
|
701
|
+
}>;
|
|
702
|
+
new_str?: string;
|
|
703
|
+
properties?: Record<string, unknown>;
|
|
704
|
+
allow_deleting_content?: boolean;
|
|
705
|
+
template_id?: string;
|
|
706
|
+
verification_status?: "verified" | "unverified";
|
|
707
|
+
verification_expiry_days?: number;
|
|
703
708
|
}
|
|
704
709
|
interface NotionMovePagesArgs {
|
|
705
710
|
page_or_database_ids: string[];
|
package/dist/tools/index.d.ts
CHANGED
|
@@ -692,14 +692,19 @@ interface NotionCreatePagesArgs {
|
|
|
692
692
|
parent?: Record<string, unknown>;
|
|
693
693
|
}
|
|
694
694
|
interface NotionUpdatePageArgs {
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
695
|
+
page_id: string;
|
|
696
|
+
command: "update_properties" | "update_content" | "replace_content" | "insert_content" | "apply_template" | "update_verification";
|
|
697
|
+
content?: string;
|
|
698
|
+
content_updates?: Array<{
|
|
699
|
+
old_str: string;
|
|
700
|
+
new_str: string;
|
|
701
|
+
}>;
|
|
702
|
+
new_str?: string;
|
|
703
|
+
properties?: Record<string, unknown>;
|
|
704
|
+
allow_deleting_content?: boolean;
|
|
705
|
+
template_id?: string;
|
|
706
|
+
verification_status?: "verified" | "unverified";
|
|
707
|
+
verification_expiry_days?: number;
|
|
703
708
|
}
|
|
704
709
|
interface NotionMovePagesArgs {
|
|
705
710
|
page_or_database_ids: string[];
|
package/dist/tools/index.mjs
CHANGED
|
@@ -2347,49 +2347,69 @@ function notionUpdatePageTool(run) {
|
|
|
2347
2347
|
type: "function",
|
|
2348
2348
|
function: {
|
|
2349
2349
|
name: "notion-update-page",
|
|
2350
|
-
description: "Update a Notion page's properties or content.
|
|
2350
|
+
description: "Update a Notion page's properties or content. Arguments are flat: page_id, command, and the parameter that command needs. 'insert_content' appends Markdown (needs content). 'update_content' does search-and-replace edits (needs content_updates). 'replace_content' replaces all content (needs new_str). 'update_properties' changes properties (needs properties). 'apply_template' applies a template page (needs template_id). 'update_verification' marks the page verified or unverified (needs verification_status, plus optional verification_expiry_days only when verified).",
|
|
2351
2351
|
arguments: {
|
|
2352
2352
|
type: "object",
|
|
2353
2353
|
properties: {
|
|
2354
|
-
|
|
2355
|
-
type: "
|
|
2356
|
-
description: "
|
|
2357
|
-
|
|
2358
|
-
|
|
2359
|
-
|
|
2360
|
-
|
|
2361
|
-
|
|
2362
|
-
|
|
2363
|
-
|
|
2364
|
-
|
|
2365
|
-
|
|
2366
|
-
|
|
2367
|
-
|
|
2368
|
-
|
|
2369
|
-
|
|
2370
|
-
|
|
2371
|
-
|
|
2354
|
+
page_id: {
|
|
2355
|
+
type: "string",
|
|
2356
|
+
description: "The ID of the page to update (with or without dashes)"
|
|
2357
|
+
},
|
|
2358
|
+
command: {
|
|
2359
|
+
type: "string",
|
|
2360
|
+
enum: [
|
|
2361
|
+
"update_properties",
|
|
2362
|
+
"update_content",
|
|
2363
|
+
"replace_content",
|
|
2364
|
+
"insert_content",
|
|
2365
|
+
"apply_template",
|
|
2366
|
+
"update_verification"
|
|
2367
|
+
],
|
|
2368
|
+
description: "The update command to execute"
|
|
2369
|
+
},
|
|
2370
|
+
content: {
|
|
2371
|
+
type: "string",
|
|
2372
|
+
description: "For insert_content: the Notion-flavored Markdown to insert"
|
|
2373
|
+
},
|
|
2374
|
+
content_updates: {
|
|
2375
|
+
type: "array",
|
|
2376
|
+
description: "For update_content: search-and-replace edits. Each old_str must match existing page text.",
|
|
2377
|
+
items: {
|
|
2378
|
+
type: "object",
|
|
2372
2379
|
properties: {
|
|
2373
|
-
type: "
|
|
2374
|
-
|
|
2375
|
-
},
|
|
2376
|
-
new_str: {
|
|
2377
|
-
type: "string",
|
|
2378
|
-
description: "For replace_content/replace_content_range/insert_content_after: the new content string"
|
|
2379
|
-
},
|
|
2380
|
-
selection_with_ellipsis: {
|
|
2381
|
-
type: "string",
|
|
2382
|
-
description: "For replace_content_range/insert_content_after: unique start and end snippet (~10 chars each with ellipsis)"
|
|
2380
|
+
old_str: { type: "string", description: "Existing text to replace" },
|
|
2381
|
+
new_str: { type: "string", description: "Replacement text" }
|
|
2383
2382
|
},
|
|
2384
|
-
|
|
2385
|
-
|
|
2386
|
-
|
|
2387
|
-
|
|
2388
|
-
|
|
2389
|
-
|
|
2383
|
+
required: ["old_str", "new_str"]
|
|
2384
|
+
}
|
|
2385
|
+
},
|
|
2386
|
+
new_str: {
|
|
2387
|
+
type: "string",
|
|
2388
|
+
description: "For replace_content: the new page content in Notion-flavored Markdown"
|
|
2389
|
+
},
|
|
2390
|
+
properties: {
|
|
2391
|
+
type: "object",
|
|
2392
|
+
description: "For update_properties: JSON map of property names to values. Use null to remove a value."
|
|
2393
|
+
},
|
|
2394
|
+
allow_deleting_content: {
|
|
2395
|
+
type: "boolean",
|
|
2396
|
+
description: "For replace_content/update_content: allow deletion of child pages/databases"
|
|
2397
|
+
},
|
|
2398
|
+
template_id: {
|
|
2399
|
+
type: "string",
|
|
2400
|
+
description: "For apply_template: the ID of the template page to apply"
|
|
2401
|
+
},
|
|
2402
|
+
verification_status: {
|
|
2403
|
+
type: "string",
|
|
2404
|
+
enum: ["verified", "unverified"],
|
|
2405
|
+
description: "For update_verification: the new verification status"
|
|
2406
|
+
},
|
|
2407
|
+
verification_expiry_days: {
|
|
2408
|
+
type: "number",
|
|
2409
|
+
description: "For update_verification: days until the verification expires. Only allowed when verification_status is 'verified'"
|
|
2390
2410
|
}
|
|
2391
2411
|
},
|
|
2392
|
-
required: ["
|
|
2412
|
+
required: ["page_id", "command"]
|
|
2393
2413
|
}
|
|
2394
2414
|
}
|
|
2395
2415
|
});
|
|
@@ -2451,30 +2471,27 @@ function notionCreateDatabaseTool(run) {
|
|
|
2451
2471
|
type: "function",
|
|
2452
2472
|
function: {
|
|
2453
2473
|
name: "notion-create-database",
|
|
2454
|
-
description:
|
|
2474
|
+
description: `Create a new Notion database. Define the columns with a SQL DDL string in schema, for example 'CREATE TABLE ("Name" TITLE, "Notes" RICH_TEXT, "Done" CHECKBOX)'.`,
|
|
2455
2475
|
arguments: {
|
|
2456
2476
|
type: "object",
|
|
2457
2477
|
properties: {
|
|
2458
|
-
|
|
2459
|
-
type: "
|
|
2460
|
-
description: "
|
|
2461
|
-
},
|
|
2462
|
-
parent: {
|
|
2463
|
-
type: "object",
|
|
2464
|
-
description: "Parent page: {type:'page_id', page_id:'...'}. Omit for private workspace-level database."
|
|
2478
|
+
schema: {
|
|
2479
|
+
type: "string",
|
|
2480
|
+
description: "SQL DDL CREATE TABLE statement defining the columns, with quoted column names and types such as TITLE, RICH_TEXT, CHECKBOX"
|
|
2465
2481
|
},
|
|
2466
2482
|
title: {
|
|
2467
|
-
type: "
|
|
2468
|
-
description: "Title of the database
|
|
2469
|
-
items: { type: "object" }
|
|
2483
|
+
type: "string",
|
|
2484
|
+
description: "Title of the database"
|
|
2470
2485
|
},
|
|
2471
|
-
|
|
2472
|
-
type: "
|
|
2473
|
-
description: "
|
|
2474
|
-
|
|
2486
|
+
parent: {
|
|
2487
|
+
type: "object",
|
|
2488
|
+
description: "Parent page: {page_id:'...'}. Omit for private workspace-level database.",
|
|
2489
|
+
properties: {
|
|
2490
|
+
page_id: { type: "string", description: "The ID of the parent page" }
|
|
2491
|
+
}
|
|
2475
2492
|
}
|
|
2476
2493
|
},
|
|
2477
|
-
required: ["
|
|
2494
|
+
required: ["schema"]
|
|
2478
2495
|
}
|
|
2479
2496
|
}
|
|
2480
2497
|
});
|
|
@@ -2487,7 +2504,7 @@ function notionUpdateDataSourceTool(run) {
|
|
|
2487
2504
|
type: "function",
|
|
2488
2505
|
function: {
|
|
2489
2506
|
name: "notion-update-data-source",
|
|
2490
|
-
description:
|
|
2507
|
+
description: `Update a Notion data source's columns, title, or other attributes. Change columns with SQL DDL in statements, for example 'ADD COLUMN "Owner" RICH_TEXT' or 'ADD COLUMN "Done" CHECKBOX'.`,
|
|
2491
2508
|
arguments: {
|
|
2492
2509
|
type: "object",
|
|
2493
2510
|
properties: {
|
|
@@ -2495,19 +2512,13 @@ function notionUpdateDataSourceTool(run) {
|
|
|
2495
2512
|
type: "string",
|
|
2496
2513
|
description: "The ID of the data source to update (UUID). Can be a data source ID or database ID."
|
|
2497
2514
|
},
|
|
2498
|
-
|
|
2499
|
-
type: "
|
|
2500
|
-
description: "
|
|
2501
|
-
items: { type: "object" }
|
|
2502
|
-
},
|
|
2503
|
-
description: {
|
|
2504
|
-
type: "array",
|
|
2505
|
-
description: "New description as rich text array (max 100)",
|
|
2506
|
-
items: { type: "object" }
|
|
2515
|
+
statements: {
|
|
2516
|
+
type: "string",
|
|
2517
|
+
description: "SQL DDL statements that change the columns, such as ADD COLUMN"
|
|
2507
2518
|
},
|
|
2508
|
-
|
|
2509
|
-
type: "
|
|
2510
|
-
description: "
|
|
2519
|
+
title: {
|
|
2520
|
+
type: "string",
|
|
2521
|
+
description: "New title of the data source"
|
|
2511
2522
|
},
|
|
2512
2523
|
is_inline: {
|
|
2513
2524
|
type: "boolean",
|
|
@@ -11947,7 +11958,7 @@ function summarizeDeck(deck) {
|
|
|
11947
11958
|
const slideId = typeof child.attrs.id === "string" ? child.attrs.id : `(no-id-${n})`;
|
|
11948
11959
|
const layout = typeof child.attrs.compositionName === "string" ? child.attrs.compositionName : typeof child.attrs.layout === "string" ? child.attrs.layout : "(layout unknown)";
|
|
11949
11960
|
lines.push("");
|
|
11950
|
-
lines.push(`Slide ${n}
|
|
11961
|
+
lines.push(`Slide ${n} \u2014 id: "${slideId}", layout: ${layout}`);
|
|
11951
11962
|
const elementSummaries = [];
|
|
11952
11963
|
const textPreviews = [];
|
|
11953
11964
|
for (const el of child.children) {
|