@atikk-co-jp/notion-mcp-server 0.11.0 → 0.13.0
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.ja.md +114 -7
- package/README.md +114 -7
- package/dist/src/schemas/descriptions/fields.d.ts +5 -1
- package/dist/src/schemas/descriptions/fields.d.ts.map +1 -1
- package/dist/src/schemas/descriptions/fields.js +4 -1
- package/dist/src/tools/clear-page-content.d.ts +4 -0
- package/dist/src/tools/clear-page-content.d.ts.map +1 -0
- package/dist/src/tools/clear-page-content.js +63 -0
- package/dist/src/tools/create-page-simple.d.ts.map +1 -1
- package/dist/src/tools/create-page-simple.js +34 -17
- package/dist/src/tools/create-page.d.ts.map +1 -1
- package/dist/src/tools/create-page.js +17 -5
- package/dist/src/tools/delete-blocks-batch.d.ts +4 -0
- package/dist/src/tools/delete-blocks-batch.d.ts.map +1 -0
- package/dist/src/tools/delete-blocks-batch.js +46 -0
- package/dist/src/tools/get-block-children.d.ts.map +1 -1
- package/dist/src/tools/get-block-children.js +19 -2
- package/dist/src/tools/index.d.ts +3 -1
- package/dist/src/tools/index.d.ts.map +1 -1
- package/dist/src/tools/index.js +5 -1
- package/package.json +1 -1
package/README.ja.md
CHANGED
|
@@ -120,7 +120,9 @@ Notionのタスクデータベースから、特定の条件でタスクを取
|
|
|
120
120
|
| | [Update block](https://developers.notion.com/reference/update-a-block) | `update-block` 📤 | JSON | `{id}` |
|
|
121
121
|
| | | `update-block-simple` ⭐📤 | Markdown | `{id}` |
|
|
122
122
|
| | [Delete block](https://developers.notion.com/reference/delete-a-block) | `delete-block` 📤 | JSON | `{id}` |
|
|
123
|
-
| |
|
|
123
|
+
| | | `delete-blocks-batch` 📤 | JSON | `{deleted_count, failed_count}` |
|
|
124
|
+
| | | `clear-page-content` 📤 | JSON | `{deleted_count, failed_count}` |
|
|
125
|
+
| | [Retrieve block children](https://developers.notion.com/reference/get-block-children) | `get-block-children` | JSON | **markdown**/simple/json |
|
|
124
126
|
| | [Append block children](https://developers.notion.com/reference/patch-block-children) | `append-block-children` 📤 | JSON | `{block_ids}` |
|
|
125
127
|
| | | `append-blocks-simple` ⭐📤 | Markdown | `{block_ids}` |
|
|
126
128
|
| **ページコンテンツ** | | | | |
|
|
@@ -160,11 +162,26 @@ Notionのタスクデータベースから、特定の条件でタスクを取
|
|
|
160
162
|
|
|
161
163
|
### create-page
|
|
162
164
|
|
|
163
|
-
|
|
165
|
+
新しいページを作成します。2種類の親タイプをサポート:
|
|
166
|
+
- **子ページ**: `parent.page_id` を使用して既存ページの下に作成
|
|
167
|
+
- **データベースエントリ**: `parent.data_source_id` を使用してデータベースに作成
|
|
164
168
|
|
|
169
|
+
**子ページを作成:**
|
|
165
170
|
```json
|
|
166
171
|
{
|
|
167
|
-
"
|
|
172
|
+
"parent": { "page_id": "親ページのUUID" },
|
|
173
|
+
"properties": {
|
|
174
|
+
"title": {
|
|
175
|
+
"title": [{ "text": { "content": "子ページタイトル" } }]
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
```
|
|
180
|
+
|
|
181
|
+
**データベースエントリを作成:**
|
|
182
|
+
```json
|
|
183
|
+
{
|
|
184
|
+
"parent": { "data_source_id": "データソースのUUID" },
|
|
168
185
|
"properties": {
|
|
169
186
|
"Name": {
|
|
170
187
|
"title": [{ "text": { "content": "新しいページタイトル" } }]
|
|
@@ -178,10 +195,14 @@ Notionのタスクデータベースから、特定の条件でタスクを取
|
|
|
178
195
|
|
|
179
196
|
### create-page-simple ⭐
|
|
180
197
|
|
|
181
|
-
Markdownを使ってページを作成します。`create-page
|
|
198
|
+
Markdownを使ってページを作成します。`create-page`と比較して**入力トークン約80%削減**。
|
|
199
|
+
|
|
200
|
+
2種類の親タイプをサポート:
|
|
201
|
+
- **子ページ**: `parent.page_id` を使用して既存ページの下に作成
|
|
202
|
+
- **データベースエントリ**: `parent.data_source_id` を使用してデータベースに作成
|
|
182
203
|
|
|
183
204
|
**パラメータ:**
|
|
184
|
-
- `
|
|
205
|
+
- `parent` (必須): `{ page_id }` または `{ data_source_id }`
|
|
185
206
|
- `title` (必須): ページタイトル(文字列)
|
|
186
207
|
- `content` (任意): ページ本文(Markdown形式)
|
|
187
208
|
- `properties` (任意): 追加のNotionプロパティ
|
|
@@ -208,9 +229,19 @@ Markdownを使ってページを作成します。`create-page`と比較して**
|
|
|
208
229
|
- カラム: `:::columns` / `:::column` / `:::`
|
|
209
230
|
- メディア: `@[embed](url)`, `@[video](url)`, `@[audio](url)`, `@[file](url)`, `@[pdf](url)`
|
|
210
231
|
|
|
232
|
+
**子ページを作成:**
|
|
211
233
|
```json
|
|
212
234
|
{
|
|
213
|
-
"
|
|
235
|
+
"parent": { "page_id": "親ページのUUID" },
|
|
236
|
+
"title": "ミーティングノート",
|
|
237
|
+
"content": "## アジェンダ\n\n1. 進捗確認\n2. 次のアクション"
|
|
238
|
+
}
|
|
239
|
+
```
|
|
240
|
+
|
|
241
|
+
**データベースエントリを作成:**
|
|
242
|
+
```json
|
|
243
|
+
{
|
|
244
|
+
"parent": { "data_source_id": "データソースのUUID" },
|
|
214
245
|
"title": "バグレポート",
|
|
215
246
|
"content": "## 再現手順\n\n1. ログイン\n2. 設定を開く\n\n## 期待動作\n\n正常に表示される",
|
|
216
247
|
"properties": {
|
|
@@ -380,8 +411,9 @@ Markdownを使ってページを作成します。`create-page`と比較して**
|
|
|
380
411
|
- `block_id` (必須): 子ブロックを取得するブロックまたはページのID
|
|
381
412
|
- `start_cursor` (任意): ページネーション用カーソル
|
|
382
413
|
- `page_size` (任意): 返す結果の数 (1-100)
|
|
383
|
-
- `format` (任意): 出力形式 - `"markdown"` (デフォルト)
|
|
414
|
+
- `format` (任意): 出力形式 - `"markdown"` (デフォルト)、`"simple"`、または `"json"`
|
|
384
415
|
- `markdown`: トークン使用量を大幅に削減(約96%削減)した人間が読みやすいマークダウン形式
|
|
416
|
+
- `simple`: ID + タイプ + Markdownコンテンツ(軽量、削除対象選定用)
|
|
385
417
|
- `json`: Notion APIのレスポンスをそのまま返す
|
|
386
418
|
- `fetch_nested` (任意): `format="markdown"`の時、ネストされた子ブロックを再帰的に取得する(デフォルト: false)
|
|
387
419
|
|
|
@@ -393,6 +425,25 @@ Markdownを使ってページを作成します。`create-page`と比較して**
|
|
|
393
425
|
}
|
|
394
426
|
```
|
|
395
427
|
|
|
428
|
+
**削除対象のブロックIDを取得:**
|
|
429
|
+
```json
|
|
430
|
+
{
|
|
431
|
+
"block_id": "ページまたはブロックのUUID",
|
|
432
|
+
"format": "simple"
|
|
433
|
+
}
|
|
434
|
+
```
|
|
435
|
+
|
|
436
|
+
レスポンス:
|
|
437
|
+
```json
|
|
438
|
+
{
|
|
439
|
+
"blocks": [
|
|
440
|
+
{ "id": "abc123", "type": "heading_1", "content": "# タイトル" },
|
|
441
|
+
{ "id": "def456", "type": "paragraph", "content": "本文テキスト" }
|
|
442
|
+
],
|
|
443
|
+
"has_more": false
|
|
444
|
+
}
|
|
445
|
+
```
|
|
446
|
+
|
|
396
447
|
### append-block-children
|
|
397
448
|
|
|
398
449
|
ページまたはブロックに新しいブロックを追加します。
|
|
@@ -500,6 +551,62 @@ Markdownを使ってブロックを追加します。`append-block-children`と
|
|
|
500
551
|
|
|
501
552
|
**対象ブロックタイプ:** paragraph, heading_1/2/3, bulleted_list_item, numbered_list_item, to_do, quote, callout, toggle
|
|
502
553
|
|
|
554
|
+
### delete-blocks-batch
|
|
555
|
+
|
|
556
|
+
複数のブロックをIDで一括削除します。APIレート制限(3 req/s)を尊重して順次削除します。
|
|
557
|
+
|
|
558
|
+
**パラメータ:**
|
|
559
|
+
- `block_ids` (必須): 削除するブロックIDの配列(最大100件)
|
|
560
|
+
|
|
561
|
+
**使い分け:** 特定のブロックを選んで削除したい場合。事前に `get-block-children` で `format="simple"` を使ってブロックIDを取得してください。
|
|
562
|
+
|
|
563
|
+
```json
|
|
564
|
+
{
|
|
565
|
+
"block_ids": ["block-uuid-1", "block-uuid-2", "block-uuid-3"]
|
|
566
|
+
}
|
|
567
|
+
```
|
|
568
|
+
|
|
569
|
+
レスポンス:
|
|
570
|
+
```json
|
|
571
|
+
{
|
|
572
|
+
"deleted_count": 3,
|
|
573
|
+
"failed_count": 0,
|
|
574
|
+
"deleted": ["block-uuid-1", "block-uuid-2", "block-uuid-3"]
|
|
575
|
+
}
|
|
576
|
+
```
|
|
577
|
+
|
|
578
|
+
### clear-page-content
|
|
579
|
+
|
|
580
|
+
ページの全コンテンツを削除します。デフォルトで `child_database` と `child_page` ブロックは保護されます。
|
|
581
|
+
|
|
582
|
+
**パラメータ:**
|
|
583
|
+
- `page_id` (必須): 削除するページのID
|
|
584
|
+
- `preserve_types` (任意): 保護するブロックタイプ(デフォルト: `["child_database", "child_page"]`)。`[]`を指定するとすべて削除。
|
|
585
|
+
|
|
586
|
+
**使い分け:** 個々のブロックを選択せずにページ全体のコンテンツを削除したい場合。
|
|
587
|
+
|
|
588
|
+
```json
|
|
589
|
+
{
|
|
590
|
+
"page_id": "ページのUUID"
|
|
591
|
+
}
|
|
592
|
+
```
|
|
593
|
+
|
|
594
|
+
**すべて削除(子データベース/ページも含む):**
|
|
595
|
+
```json
|
|
596
|
+
{
|
|
597
|
+
"page_id": "ページのUUID",
|
|
598
|
+
"preserve_types": []
|
|
599
|
+
}
|
|
600
|
+
```
|
|
601
|
+
|
|
602
|
+
レスポンス:
|
|
603
|
+
```json
|
|
604
|
+
{
|
|
605
|
+
"deleted_count": 15,
|
|
606
|
+
"failed_count": 0
|
|
607
|
+
}
|
|
608
|
+
```
|
|
609
|
+
|
|
503
610
|
### create-comment
|
|
504
611
|
|
|
505
612
|
ページにコメントを追加します。
|
package/README.md
CHANGED
|
@@ -120,7 +120,9 @@ That's it! Restart your AI client and start using Notion.
|
|
|
120
120
|
| | [Update block](https://developers.notion.com/reference/update-a-block) | `update-block` 📤 | JSON | `{id}` |
|
|
121
121
|
| | | `update-block-simple` ⭐📤 | Markdown | `{id}` |
|
|
122
122
|
| | [Delete block](https://developers.notion.com/reference/delete-a-block) | `delete-block` 📤 | JSON | `{id}` |
|
|
123
|
-
| |
|
|
123
|
+
| | | `delete-blocks-batch` 📤 | JSON | `{deleted_count, failed_count}` |
|
|
124
|
+
| | | `clear-page-content` 📤 | JSON | `{deleted_count, failed_count}` |
|
|
125
|
+
| | [Retrieve block children](https://developers.notion.com/reference/get-block-children) | `get-block-children` | JSON | **markdown**/simple/json |
|
|
124
126
|
| | [Append block children](https://developers.notion.com/reference/patch-block-children) | `append-block-children` 📤 | JSON | `{block_ids}` |
|
|
125
127
|
| | | `append-blocks-simple` ⭐📤 | Markdown | `{block_ids}` |
|
|
126
128
|
| | | `replace-page-content` ⭐📤 | Markdown | `{deleted_count, created_count}` |
|
|
@@ -159,11 +161,26 @@ Retrieve a Notion page by its ID.
|
|
|
159
161
|
|
|
160
162
|
### create-page
|
|
161
163
|
|
|
162
|
-
Create a new page
|
|
164
|
+
Create a new page. Supports two parent types:
|
|
165
|
+
- **Child page**: Use `parent.page_id` to create a page under an existing page
|
|
166
|
+
- **Database entry**: Use `parent.data_source_id` to create a page in a database
|
|
163
167
|
|
|
168
|
+
**Create a child page:**
|
|
164
169
|
```json
|
|
165
170
|
{
|
|
166
|
-
"
|
|
171
|
+
"parent": { "page_id": "parent-page-uuid-here" },
|
|
172
|
+
"properties": {
|
|
173
|
+
"title": {
|
|
174
|
+
"title": [{ "text": { "content": "Child Page Title" } }]
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
```
|
|
179
|
+
|
|
180
|
+
**Create a database entry:**
|
|
181
|
+
```json
|
|
182
|
+
{
|
|
183
|
+
"parent": { "data_source_id": "data-source-uuid-here" },
|
|
167
184
|
"properties": {
|
|
168
185
|
"Name": {
|
|
169
186
|
"title": [{ "text": { "content": "New Page Title" } }]
|
|
@@ -177,10 +194,14 @@ Create a new page in a data source.
|
|
|
177
194
|
|
|
178
195
|
### create-page-simple ⭐
|
|
179
196
|
|
|
180
|
-
Create a new page using Markdown. **~80% fewer
|
|
197
|
+
Create a new page using Markdown. **~80% fewer input tokens** compared to `create-page`.
|
|
198
|
+
|
|
199
|
+
Supports two parent types:
|
|
200
|
+
- **Child page**: Use `parent.page_id` to create a page under an existing page
|
|
201
|
+
- **Database entry**: Use `parent.data_source_id` to create a page in a database
|
|
181
202
|
|
|
182
203
|
**Parameters:**
|
|
183
|
-
- `
|
|
204
|
+
- `parent` (required): Either `{ page_id }` or `{ data_source_id }`
|
|
184
205
|
- `title` (required): Page title as a simple string
|
|
185
206
|
- `content` (optional): Page content in Markdown
|
|
186
207
|
- `properties` (optional): Additional Notion properties
|
|
@@ -207,9 +228,19 @@ Create a new page using Markdown. **~80% fewer output tokens** compared to `crea
|
|
|
207
228
|
- Columns: `:::columns` / `:::column` / `:::`
|
|
208
229
|
- Media: `@[embed](url)`, `@[video](url)`, `@[audio](url)`, `@[file](url)`, `@[pdf](url)`
|
|
209
230
|
|
|
231
|
+
**Create a child page:**
|
|
210
232
|
```json
|
|
211
233
|
{
|
|
212
|
-
"
|
|
234
|
+
"parent": { "page_id": "parent-page-uuid-here" },
|
|
235
|
+
"title": "Meeting Notes",
|
|
236
|
+
"content": "## Agenda\n\n1. Review progress\n2. Next steps"
|
|
237
|
+
}
|
|
238
|
+
```
|
|
239
|
+
|
|
240
|
+
**Create a database entry:**
|
|
241
|
+
```json
|
|
242
|
+
{
|
|
243
|
+
"parent": { "data_source_id": "data-source-uuid-here" },
|
|
213
244
|
"title": "Bug Report",
|
|
214
245
|
"content": "## Steps to Reproduce\n\n1. Login\n2. Open settings\n\n## Expected Behavior\n\nShould display correctly",
|
|
215
246
|
"properties": {
|
|
@@ -379,8 +410,9 @@ Get the child blocks of a page or block.
|
|
|
379
410
|
- `block_id` (required): The ID of the block or page to get children from
|
|
380
411
|
- `start_cursor` (optional): Cursor for pagination
|
|
381
412
|
- `page_size` (optional): Number of results to return (1-100)
|
|
382
|
-
- `format` (optional): Output format - `"markdown"` (default) or `"json"`
|
|
413
|
+
- `format` (optional): Output format - `"markdown"` (default), `"simple"`, or `"json"`
|
|
383
414
|
- `markdown`: Returns human-readable markdown with significantly reduced token usage (~96% reduction)
|
|
415
|
+
- `simple`: Returns ID + type + markdown content (lightweight, for deletion target selection)
|
|
384
416
|
- `json`: Returns raw Notion API response
|
|
385
417
|
- `fetch_nested` (optional): When `format="markdown"`, fetch nested children blocks recursively (default: false)
|
|
386
418
|
|
|
@@ -392,6 +424,25 @@ Get the child blocks of a page or block.
|
|
|
392
424
|
}
|
|
393
425
|
```
|
|
394
426
|
|
|
427
|
+
**Get block IDs for deletion:**
|
|
428
|
+
```json
|
|
429
|
+
{
|
|
430
|
+
"block_id": "page-or-block-uuid-here",
|
|
431
|
+
"format": "simple"
|
|
432
|
+
}
|
|
433
|
+
```
|
|
434
|
+
|
|
435
|
+
Returns:
|
|
436
|
+
```json
|
|
437
|
+
{
|
|
438
|
+
"blocks": [
|
|
439
|
+
{ "id": "abc123", "type": "heading_1", "content": "# Title" },
|
|
440
|
+
{ "id": "def456", "type": "paragraph", "content": "Some text" }
|
|
441
|
+
],
|
|
442
|
+
"has_more": false
|
|
443
|
+
}
|
|
444
|
+
```
|
|
445
|
+
|
|
395
446
|
### append-block-children
|
|
396
447
|
|
|
397
448
|
Append new blocks to a page or block.
|
|
@@ -495,6 +546,62 @@ Find text in a page and replace it with new content. Supports regex patterns for
|
|
|
495
546
|
}
|
|
496
547
|
```
|
|
497
548
|
|
|
549
|
+
### delete-blocks-batch
|
|
550
|
+
|
|
551
|
+
Delete multiple blocks by their IDs. Blocks are deleted sequentially to respect API rate limits (3 req/s).
|
|
552
|
+
|
|
553
|
+
**Parameters:**
|
|
554
|
+
- `block_ids` (required): Array of block IDs to delete (max 100)
|
|
555
|
+
|
|
556
|
+
**Use when:** You want to delete specific blocks. Use `get-block-children` with `format="simple"` to get block IDs first.
|
|
557
|
+
|
|
558
|
+
```json
|
|
559
|
+
{
|
|
560
|
+
"block_ids": ["block-uuid-1", "block-uuid-2", "block-uuid-3"]
|
|
561
|
+
}
|
|
562
|
+
```
|
|
563
|
+
|
|
564
|
+
Returns:
|
|
565
|
+
```json
|
|
566
|
+
{
|
|
567
|
+
"deleted_count": 3,
|
|
568
|
+
"failed_count": 0,
|
|
569
|
+
"deleted": ["block-uuid-1", "block-uuid-2", "block-uuid-3"]
|
|
570
|
+
}
|
|
571
|
+
```
|
|
572
|
+
|
|
573
|
+
### clear-page-content
|
|
574
|
+
|
|
575
|
+
Delete all content from a page. By default, preserves `child_database` and `child_page` blocks.
|
|
576
|
+
|
|
577
|
+
**Parameters:**
|
|
578
|
+
- `page_id` (required): The page ID to clear
|
|
579
|
+
- `preserve_types` (optional): Block types to preserve (default: `["child_database", "child_page"]`). Set to `[]` to delete all.
|
|
580
|
+
|
|
581
|
+
**Use when:** You want to delete all content from a page without selecting individual blocks.
|
|
582
|
+
|
|
583
|
+
```json
|
|
584
|
+
{
|
|
585
|
+
"page_id": "page-uuid-here"
|
|
586
|
+
}
|
|
587
|
+
```
|
|
588
|
+
|
|
589
|
+
**Delete everything (including child databases/pages):**
|
|
590
|
+
```json
|
|
591
|
+
{
|
|
592
|
+
"page_id": "page-uuid-here",
|
|
593
|
+
"preserve_types": []
|
|
594
|
+
}
|
|
595
|
+
```
|
|
596
|
+
|
|
597
|
+
Returns:
|
|
598
|
+
```json
|
|
599
|
+
{
|
|
600
|
+
"deleted_count": 15,
|
|
601
|
+
"failed_count": 0
|
|
602
|
+
}
|
|
603
|
+
```
|
|
604
|
+
|
|
498
605
|
### create-comment
|
|
499
606
|
|
|
500
607
|
Add a comment to a page.
|
|
@@ -54,7 +54,10 @@ export declare const Fields: {
|
|
|
54
54
|
readonly desc: "Number of results (1-100)";
|
|
55
55
|
};
|
|
56
56
|
readonly format: {
|
|
57
|
-
readonly desc:
|
|
57
|
+
readonly desc: {
|
|
58
|
+
readonly default: "Output format: 'simple' or 'json'";
|
|
59
|
+
readonly block_children: "Output format: 'markdown' (default, human-readable), 'simple' (ID + type + content, for deletion), 'json' (full API response)";
|
|
60
|
+
};
|
|
58
61
|
};
|
|
59
62
|
readonly properties: {
|
|
60
63
|
readonly desc: {
|
|
@@ -149,6 +152,7 @@ export declare const F: { [K in keyof typeof Fields]: string; } & {
|
|
|
149
152
|
data_source_id_target: string;
|
|
150
153
|
properties_schema: string;
|
|
151
154
|
properties_update: string;
|
|
155
|
+
format_block_children: string;
|
|
152
156
|
filter_search: string;
|
|
153
157
|
icon_emoji: string;
|
|
154
158
|
markdown_syntax_short: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fields.d.ts","sourceRoot":"","sources":["../../../../src/schemas/descriptions/fields.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;GAGG;AACH,MAAM,WAAW,SAAS;IACxB,IAAI,EAAE,MAAM,GAAG;QAAE,OAAO,EAAE,MAAM,CAAC;QAAC,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAAA;KAAE,CAAA;CAC9D;AAED;;;GAGG;AACH,eAAO,MAAM,MAAM
|
|
1
|
+
{"version":3,"file":"fields.d.ts","sourceRoot":"","sources":["../../../../src/schemas/descriptions/fields.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;GAGG;AACH,MAAM,WAAW,SAAS;IACxB,IAAI,EAAE,MAAM,GAAG;QAAE,OAAO,EAAE,MAAM,CAAC;QAAC,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAAA;KAAE,CAAA;CAC9D;AAED;;;GAGG;AACH,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAyL2B,CAAA;AAE9C;;;;;;;GAOG;AACH,eAAO,MAAM,CAAC,EAgBN,GAAG,CAAC,IAAI,MAAM,OAAO,MAAM,GAAG,MAAM,GAAE,GAAG;IAE/C,cAAc,EAAE,MAAM,CAAA;IACtB,qBAAqB,EAAE,MAAM,CAAA;IAC7B,iBAAiB,EAAE,MAAM,CAAA;IACzB,iBAAiB,EAAE,MAAM,CAAA;IACzB,qBAAqB,EAAE,MAAM,CAAA;IAC7B,aAAa,EAAE,MAAM,CAAA;IACrB,UAAU,EAAE,MAAM,CAAA;IAClB,qBAAqB,EAAE,MAAM,CAAA;CAC9B,CAAA"}
|
|
@@ -53,7 +53,10 @@ export const Fields = {
|
|
|
53
53
|
// Format
|
|
54
54
|
// ============================================
|
|
55
55
|
format: {
|
|
56
|
-
desc:
|
|
56
|
+
desc: {
|
|
57
|
+
default: "Output format: 'simple' or 'json'",
|
|
58
|
+
block_children: "Output format: 'markdown' (default, human-readable), 'simple' (ID + type + content, for deletion), 'json' (full API response)",
|
|
59
|
+
},
|
|
57
60
|
},
|
|
58
61
|
// ============================================
|
|
59
62
|
// Properties
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
|
|
2
|
+
import { type NotionClient } from '../notion-client.js';
|
|
3
|
+
export declare function registerClearPageContent(server: McpServer, notion: NotionClient): void;
|
|
4
|
+
//# sourceMappingURL=clear-page-content.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"clear-page-content.d.ts","sourceRoot":"","sources":["../../../src/tools/clear-page-content.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAA;AAExE,OAAO,EAAe,KAAK,YAAY,EAAE,MAAM,qBAAqB,CAAA;AAcpE,wBAAgB,wBAAwB,CAAC,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,YAAY,GAAG,IAAI,CAmEtF"}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { isFullBlock } from '../notion-client.js';
|
|
3
|
+
import { F } from '../schemas/descriptions/index.js';
|
|
4
|
+
import { formatSimpleResponse, handleError } from '../utils/index.js';
|
|
5
|
+
const inputSchema = {
|
|
6
|
+
page_id: z.string().describe(F.page_id),
|
|
7
|
+
preserve_types: z
|
|
8
|
+
.array(z.string())
|
|
9
|
+
.optional()
|
|
10
|
+
.describe('Block types to preserve (default: ["child_database", "child_page"]). Set to empty array [] to delete all.'),
|
|
11
|
+
};
|
|
12
|
+
export function registerClearPageContent(server, notion) {
|
|
13
|
+
server.registerTool('clear-page-content', {
|
|
14
|
+
description: 'Delete all content from a page. By default, preserves child_database and child_page blocks. ' +
|
|
15
|
+
'Use preserve_types=[] to delete everything. ' +
|
|
16
|
+
'For deleting specific blocks, use delete-blocks-batch instead. ' +
|
|
17
|
+
'Blocks are deleted sequentially to respect API rate limits (3 req/s). ' +
|
|
18
|
+
'Returns count of deleted blocks.',
|
|
19
|
+
inputSchema,
|
|
20
|
+
}, async ({ page_id, preserve_types = ['child_database', 'child_page'], }) => {
|
|
21
|
+
try {
|
|
22
|
+
// Collect all blocks to delete (handle pagination)
|
|
23
|
+
const blocksToDelete = [];
|
|
24
|
+
let cursor;
|
|
25
|
+
do {
|
|
26
|
+
const response = await notion.blocks.children.list({
|
|
27
|
+
block_id: page_id,
|
|
28
|
+
start_cursor: cursor,
|
|
29
|
+
});
|
|
30
|
+
const blocks = response.results.filter(isFullBlock);
|
|
31
|
+
for (const block of blocks) {
|
|
32
|
+
if (!preserve_types.includes(block.type)) {
|
|
33
|
+
blocksToDelete.push(block.id);
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
cursor = response.has_more ? (response.next_cursor ?? undefined) : undefined;
|
|
37
|
+
} while (cursor);
|
|
38
|
+
// Delete blocks
|
|
39
|
+
let deleted = 0;
|
|
40
|
+
const failed = [];
|
|
41
|
+
for (const id of blocksToDelete) {
|
|
42
|
+
try {
|
|
43
|
+
await notion.blocks.delete({ block_id: id });
|
|
44
|
+
deleted++;
|
|
45
|
+
}
|
|
46
|
+
catch (e) {
|
|
47
|
+
failed.push({
|
|
48
|
+
id,
|
|
49
|
+
error: e instanceof Error ? e.message : String(e),
|
|
50
|
+
});
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
return formatSimpleResponse({
|
|
54
|
+
deleted_count: deleted,
|
|
55
|
+
failed_count: failed.length,
|
|
56
|
+
failed: failed.length > 0 ? failed : undefined,
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
catch (error) {
|
|
60
|
+
return handleError(error);
|
|
61
|
+
}
|
|
62
|
+
});
|
|
63
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-page-simple.d.ts","sourceRoot":"","sources":["../../../src/tools/create-page-simple.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAA;AAIxE,OAAO,EAAoB,KAAK,YAAY,EAAE,MAAM,qBAAqB,CAAA;
|
|
1
|
+
{"version":3,"file":"create-page-simple.d.ts","sourceRoot":"","sources":["../../../src/tools/create-page-simple.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAA;AAIxE,OAAO,EAAoB,KAAK,YAAY,EAAE,MAAM,qBAAqB,CAAA;AAyBzE,wBAAgB,wBAAwB,CAAC,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,YAAY,GAAG,IAAI,CA2FtF"}
|
|
@@ -5,7 +5,15 @@ import { F } from '../schemas/descriptions/index.js';
|
|
|
5
5
|
import { formatSimpleResponse, handleErrorWithContext } from '../utils/index.js';
|
|
6
6
|
// Minimal schema for MCP
|
|
7
7
|
const inputSchema = {
|
|
8
|
-
|
|
8
|
+
parent: z
|
|
9
|
+
.object({
|
|
10
|
+
page_id: z.string().optional().describe(F.page_id_target),
|
|
11
|
+
data_source_id: z.string().optional().describe(F.data_source_id),
|
|
12
|
+
})
|
|
13
|
+
.refine((obj) => obj.page_id || obj.data_source_id, {
|
|
14
|
+
message: 'Either page_id or data_source_id must be provided',
|
|
15
|
+
})
|
|
16
|
+
.describe(F.parent),
|
|
9
17
|
title: z.string().describe(F.title),
|
|
10
18
|
content: z.string().optional().describe(F.content),
|
|
11
19
|
properties: z.record(z.string(), z.any()).optional().describe(F.properties),
|
|
@@ -13,25 +21,34 @@ const inputSchema = {
|
|
|
13
21
|
};
|
|
14
22
|
export function registerCreatePageSimple(server, notion) {
|
|
15
23
|
server.registerTool('create-page-simple', {
|
|
16
|
-
description: 'Create a page with Markdown.
|
|
24
|
+
description: 'Create a page with Markdown. Specify parent as either page_id (child page) or data_source_id (database entry). ' +
|
|
25
|
+
'Title is auto-mapped to the title property. ' +
|
|
17
26
|
F.markdown_syntax_short,
|
|
18
27
|
inputSchema,
|
|
19
|
-
}, async ({
|
|
28
|
+
}, async ({ parent, title, content, properties, icon }) => {
|
|
20
29
|
try {
|
|
21
|
-
//
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
+
// Build parent parameter based on which ID was provided
|
|
31
|
+
const parentParam = parent.page_id
|
|
32
|
+
? { type: 'page_id', page_id: parent.page_id }
|
|
33
|
+
: { type: 'data_source_id', data_source_id: parent.data_source_id };
|
|
34
|
+
// Determine title property name
|
|
35
|
+
let titlePropertyName = 'title'; // Default for page parent
|
|
36
|
+
// For data_source parent, try to fetch schema to find the title property name
|
|
37
|
+
if (parent.data_source_id) {
|
|
38
|
+
titlePropertyName = 'Name'; // Default fallback for database
|
|
39
|
+
try {
|
|
40
|
+
const schema = await notion.dataSources.retrieve({ data_source_id: parent.data_source_id });
|
|
41
|
+
if (isFullDataSource(schema)) {
|
|
42
|
+
// Find the title property name from schema
|
|
43
|
+
const foundTitleProp = Object.entries(schema.properties).find(([, prop]) => prop.type === 'title');
|
|
44
|
+
if (foundTitleProp) {
|
|
45
|
+
titlePropertyName = foundTitleProp[0];
|
|
46
|
+
}
|
|
30
47
|
}
|
|
31
48
|
}
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
49
|
+
catch {
|
|
50
|
+
// If schema fetch fails, fall back to 'Name'
|
|
51
|
+
}
|
|
35
52
|
}
|
|
36
53
|
// Build properties with title
|
|
37
54
|
const pageProperties = {
|
|
@@ -51,7 +68,7 @@ export function registerCreatePageSimple(server, notion) {
|
|
|
51
68
|
? markdownToBlocks(content)
|
|
52
69
|
: undefined;
|
|
53
70
|
const response = await notion.pages.create({
|
|
54
|
-
parent:
|
|
71
|
+
parent: parentParam,
|
|
55
72
|
properties: pageProperties,
|
|
56
73
|
...(children && { children }),
|
|
57
74
|
...(icon && { icon: { type: 'emoji', emoji: icon } }),
|
|
@@ -64,7 +81,7 @@ export function registerCreatePageSimple(server, notion) {
|
|
|
64
81
|
}
|
|
65
82
|
catch (error) {
|
|
66
83
|
return handleErrorWithContext(error, notion, {
|
|
67
|
-
dataSourceId: data_source_id,
|
|
84
|
+
dataSourceId: parent.data_source_id,
|
|
68
85
|
exampleType: 'page',
|
|
69
86
|
hint: 'Hint: The "title" parameter automatically sets the title property. ' +
|
|
70
87
|
'Use "properties" for other fields like select or multi_select.',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-page.d.ts","sourceRoot":"","sources":["../../../src/tools/create-page.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAA;
|
|
1
|
+
{"version":3,"file":"create-page.d.ts","sourceRoot":"","sources":["../../../src/tools/create-page.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAA;AAGxE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAA;AA4BvD,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,YAAY,GAAG,IAAI,CA6DhF"}
|
|
@@ -3,7 +3,15 @@ import { F } from '../schemas/descriptions/index.js';
|
|
|
3
3
|
import { formatSimpleResponse, handleErrorWithContext } from '../utils/index.js';
|
|
4
4
|
// Minimal schema for MCP (full validation by Notion API)
|
|
5
5
|
const inputSchema = {
|
|
6
|
-
|
|
6
|
+
parent: z
|
|
7
|
+
.object({
|
|
8
|
+
page_id: z.string().optional().describe(F.page_id_target),
|
|
9
|
+
data_source_id: z.string().optional().describe(F.data_source_id),
|
|
10
|
+
})
|
|
11
|
+
.refine((obj) => obj.page_id || obj.data_source_id, {
|
|
12
|
+
message: 'Either page_id or data_source_id must be provided',
|
|
13
|
+
})
|
|
14
|
+
.describe(F.parent),
|
|
7
15
|
properties: z.record(z.string(), z.any()).describe(F.properties),
|
|
8
16
|
children: z.array(z.any()).optional().describe(F.children),
|
|
9
17
|
icon: z.any().optional().describe(F.icon),
|
|
@@ -11,14 +19,18 @@ const inputSchema = {
|
|
|
11
19
|
};
|
|
12
20
|
export function registerCreatePage(server, notion) {
|
|
13
21
|
server.registerTool('create-page', {
|
|
14
|
-
description: 'Create a new page in
|
|
22
|
+
description: 'Create a new page in Notion. Specify parent as either page_id (to create a child page) or data_source_id (to create a database entry). ' +
|
|
15
23
|
'Optionally include initial content blocks, icon, and cover image. ' +
|
|
16
24
|
'Returns the created page ID and URL. (API version 2025-09-03)',
|
|
17
25
|
inputSchema,
|
|
18
|
-
}, async ({
|
|
26
|
+
}, async ({ parent, properties, children, icon, cover }) => {
|
|
19
27
|
try {
|
|
28
|
+
// Build parent parameter based on which ID was provided
|
|
29
|
+
const parentParam = parent.page_id
|
|
30
|
+
? { type: 'page_id', page_id: parent.page_id }
|
|
31
|
+
: { type: 'data_source_id', data_source_id: parent.data_source_id };
|
|
20
32
|
const params = {
|
|
21
|
-
parent:
|
|
33
|
+
parent: parentParam,
|
|
22
34
|
properties: properties,
|
|
23
35
|
};
|
|
24
36
|
if (children) {
|
|
@@ -39,7 +51,7 @@ export function registerCreatePage(server, notion) {
|
|
|
39
51
|
}
|
|
40
52
|
catch (error) {
|
|
41
53
|
return handleErrorWithContext(error, notion, {
|
|
42
|
-
dataSourceId: data_source_id,
|
|
54
|
+
dataSourceId: parent.data_source_id,
|
|
43
55
|
exampleType: 'page',
|
|
44
56
|
});
|
|
45
57
|
}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
|
|
2
|
+
import type { NotionClient } from '../notion-client.js';
|
|
3
|
+
export declare function registerDeleteBlocksBatch(server: McpServer, notion: NotionClient): void;
|
|
4
|
+
//# sourceMappingURL=delete-blocks-batch.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"delete-blocks-batch.d.ts","sourceRoot":"","sources":["../../../src/tools/delete-blocks-batch.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAA;AAExE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAA;AAWvD,wBAAgB,yBAAyB,CAAC,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,YAAY,GAAG,IAAI,CAyCvF"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { formatSimpleResponse, handleError } from '../utils/index.js';
|
|
3
|
+
const inputSchema = {
|
|
4
|
+
block_ids: z
|
|
5
|
+
.array(z.string())
|
|
6
|
+
.min(1)
|
|
7
|
+
.max(100)
|
|
8
|
+
.describe('Block IDs to delete (max 100). Use get-block-children with format="simple" to get IDs.'),
|
|
9
|
+
};
|
|
10
|
+
export function registerDeleteBlocksBatch(server, notion) {
|
|
11
|
+
server.registerTool('delete-blocks-batch', {
|
|
12
|
+
description: 'Delete multiple blocks by their IDs. Use this when you want to delete specific blocks. ' +
|
|
13
|
+
'For deleting all content from a page, use clear-page-content instead. ' +
|
|
14
|
+
'Blocks are deleted sequentially to respect API rate limits (3 req/s). ' +
|
|
15
|
+
'Returns summary of deleted and failed blocks.',
|
|
16
|
+
inputSchema,
|
|
17
|
+
}, async ({ block_ids }) => {
|
|
18
|
+
try {
|
|
19
|
+
const results = {
|
|
20
|
+
deleted: [],
|
|
21
|
+
failed: [],
|
|
22
|
+
};
|
|
23
|
+
for (const id of block_ids) {
|
|
24
|
+
try {
|
|
25
|
+
await notion.blocks.delete({ block_id: id });
|
|
26
|
+
results.deleted.push(id);
|
|
27
|
+
}
|
|
28
|
+
catch (e) {
|
|
29
|
+
results.failed.push({
|
|
30
|
+
id,
|
|
31
|
+
error: e instanceof Error ? e.message : String(e),
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
return formatSimpleResponse({
|
|
36
|
+
deleted_count: results.deleted.length,
|
|
37
|
+
failed_count: results.failed.length,
|
|
38
|
+
deleted: results.deleted,
|
|
39
|
+
failed: results.failed.length > 0 ? results.failed : undefined,
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
catch (error) {
|
|
43
|
+
return handleError(error);
|
|
44
|
+
}
|
|
45
|
+
});
|
|
46
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-block-children.d.ts","sourceRoot":"","sources":["../../../src/tools/get-block-children.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAA;AAGxE,OAAO,EAAyC,KAAK,YAAY,EAAE,MAAM,qBAAqB,CAAA;
|
|
1
|
+
{"version":3,"file":"get-block-children.d.ts","sourceRoot":"","sources":["../../../src/tools/get-block-children.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAA;AAGxE,OAAO,EAAyC,KAAK,YAAY,EAAE,MAAM,qBAAqB,CAAA;AAqB9F,wBAAgB,wBAAwB,CAAC,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,YAAY,GAAG,IAAI,CA6DtF"}
|
|
@@ -2,12 +2,16 @@ import { z } from 'zod';
|
|
|
2
2
|
import { blocksToMarkdown } from '../converters/index.js';
|
|
3
3
|
import { isFullBlock } from '../notion-client.js';
|
|
4
4
|
import { F } from '../schemas/descriptions/index.js';
|
|
5
|
-
import { formatMarkdownResponse, formatPaginatedResponse, handleError } from '../utils/index.js';
|
|
5
|
+
import { formatMarkdownResponse, formatPaginatedResponse, formatSimpleResponse, handleError, } from '../utils/index.js';
|
|
6
6
|
const inputSchema = {
|
|
7
7
|
block_id: z.string().describe(F.block_id),
|
|
8
8
|
start_cursor: z.string().optional().describe(F.start_cursor),
|
|
9
9
|
page_size: z.number().min(1).max(100).optional().describe(F.page_size),
|
|
10
|
-
format: z
|
|
10
|
+
format: z
|
|
11
|
+
.enum(['json', 'markdown', 'simple'])
|
|
12
|
+
.optional()
|
|
13
|
+
.default('markdown')
|
|
14
|
+
.describe(F.format_block_children),
|
|
11
15
|
fetch_nested: z.boolean().optional().default(false).describe(F.fetch_nested),
|
|
12
16
|
};
|
|
13
17
|
export function registerGetBlockChildren(server, notion) {
|
|
@@ -39,6 +43,19 @@ export function registerGetBlockChildren(server, notion) {
|
|
|
39
43
|
}
|
|
40
44
|
return formatMarkdownResponse(markdown, response.has_more, response.next_cursor);
|
|
41
45
|
}
|
|
46
|
+
if (format === 'simple') {
|
|
47
|
+
// Simple format: ID + type + markdown content (lightweight, for deletion target selection)
|
|
48
|
+
const simpleBlocks = await Promise.all(blocks.map(async (block) => ({
|
|
49
|
+
id: block.id,
|
|
50
|
+
type: block.type,
|
|
51
|
+
content: await blocksToMarkdown([block]),
|
|
52
|
+
})));
|
|
53
|
+
return formatSimpleResponse({
|
|
54
|
+
blocks: simpleBlocks,
|
|
55
|
+
has_more: response.has_more,
|
|
56
|
+
next_cursor: response.next_cursor,
|
|
57
|
+
});
|
|
58
|
+
}
|
|
42
59
|
// JSON形式
|
|
43
60
|
return formatPaginatedResponse(response.results, response.has_more, response.next_cursor);
|
|
44
61
|
}
|
|
@@ -4,12 +4,14 @@ import { registerAppendBlockChildren } from './append-block-children.js';
|
|
|
4
4
|
import { registerAppendBlocksSimple } from './append-blocks-simple.js';
|
|
5
5
|
import { registerArchiveDatabase } from './archive-database.js';
|
|
6
6
|
import { registerArchivePage } from './archive-page.js';
|
|
7
|
+
import { registerClearPageContent } from './clear-page-content.js';
|
|
7
8
|
import { registerCreateComment } from './create-comment.js';
|
|
8
9
|
import { registerCreateCommentSimple } from './create-comment-simple.js';
|
|
9
10
|
import { registerCreateDatabase } from './create-database.js';
|
|
10
11
|
import { registerCreatePage } from './create-page.js';
|
|
11
12
|
import { registerCreatePageSimple } from './create-page-simple.js';
|
|
12
13
|
import { registerDeleteBlock } from './delete-block.js';
|
|
14
|
+
import { registerDeleteBlocksBatch } from './delete-blocks-batch.js';
|
|
13
15
|
import { registerFindAndReplaceInPage } from './find-and-replace-in-page.js';
|
|
14
16
|
import { registerGetBlockChildren } from './get-block-children.js';
|
|
15
17
|
import { registerListComments } from './list-comments.js';
|
|
@@ -31,5 +33,5 @@ import { registerUpdateDataSource } from './update-data-source.js';
|
|
|
31
33
|
import { registerUpdateDatabase } from './update-database.js';
|
|
32
34
|
import { registerUpdatePage } from './update-page.js';
|
|
33
35
|
export declare function registerAllTools(server: McpServer, notion: NotionClient): void;
|
|
34
|
-
export { registerRetrievePage, registerCreatePage, registerCreatePageSimple, registerUpdatePage, registerArchivePage, registerRetrievePageProperty, registerMovePage, registerCreateDatabase, registerUpdateDatabase, registerArchiveDatabase, registerRetrieveDatabase, registerRetrieveDataSource, registerQueryDataSource, registerUpdateDataSource, registerSearch, registerGetBlockChildren, registerAppendBlockChildren, registerAppendBlocksSimple, registerRetrieveBlock, registerUpdateBlock, registerUpdateBlockSimple, registerDeleteBlock, registerReplacePageContent, registerFindAndReplaceInPage, registerCreateComment, registerCreateCommentSimple, registerListComments, registerListUsers, registerRetrieveUser, registerRetrieveBotUser, };
|
|
36
|
+
export { registerRetrievePage, registerCreatePage, registerCreatePageSimple, registerUpdatePage, registerArchivePage, registerRetrievePageProperty, registerMovePage, registerCreateDatabase, registerUpdateDatabase, registerArchiveDatabase, registerRetrieveDatabase, registerRetrieveDataSource, registerQueryDataSource, registerUpdateDataSource, registerSearch, registerGetBlockChildren, registerAppendBlockChildren, registerAppendBlocksSimple, registerRetrieveBlock, registerUpdateBlock, registerUpdateBlockSimple, registerDeleteBlock, registerDeleteBlocksBatch, registerClearPageContent, registerReplacePageContent, registerFindAndReplaceInPage, registerCreateComment, registerCreateCommentSimple, registerListComments, registerListUsers, registerRetrieveUser, registerRetrieveBotUser, };
|
|
35
37
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/tools/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAA;AACxE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAA;AACvD,OAAO,EAAE,2BAA2B,EAAE,MAAM,4BAA4B,CAAA;AACxE,OAAO,EAAE,0BAA0B,EAAE,MAAM,2BAA2B,CAAA;AACtE,OAAO,EAAE,uBAAuB,EAAE,MAAM,uBAAuB,CAAA;AAC/D,OAAO,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAA;AACvD,OAAO,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAA;AAC3D,OAAO,EAAE,2BAA2B,EAAE,MAAM,4BAA4B,CAAA;AACxE,OAAO,EAAE,sBAAsB,EAAE,MAAM,sBAAsB,CAAA;AAC7D,OAAO,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAA;AACrD,OAAO,EAAE,wBAAwB,EAAE,MAAM,yBAAyB,CAAA;AAClE,OAAO,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAA;AACvD,OAAO,EAAE,4BAA4B,EAAE,MAAM,+BAA+B,CAAA;AAC5E,OAAO,EAAE,wBAAwB,EAAE,MAAM,yBAAyB,CAAA;AAClE,OAAO,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAA;AACzD,OAAO,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAA;AACnD,OAAO,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAA;AACjD,OAAO,EAAE,uBAAuB,EAAE,MAAM,wBAAwB,CAAA;AAChE,OAAO,EAAE,0BAA0B,EAAE,MAAM,2BAA2B,CAAA;AACtE,OAAO,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAA;AAC3D,OAAO,EAAE,uBAAuB,EAAE,MAAM,wBAAwB,CAAA;AAChE,OAAO,EAAE,0BAA0B,EAAE,MAAM,2BAA2B,CAAA;AACtE,OAAO,EAAE,wBAAwB,EAAE,MAAM,wBAAwB,CAAA;AACjE,OAAO,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAA;AACzD,OAAO,EAAE,4BAA4B,EAAE,MAAM,6BAA6B,CAAA;AAC1E,OAAO,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAA;AACzD,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAA;AAC5C,OAAO,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAA;AACvD,OAAO,EAAE,yBAAyB,EAAE,MAAM,0BAA0B,CAAA;AACpE,OAAO,EAAE,wBAAwB,EAAE,MAAM,yBAAyB,CAAA;AAClE,OAAO,EAAE,sBAAsB,EAAE,MAAM,sBAAsB,CAAA;AAC7D,OAAO,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAA;AAErD,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,YAAY,GAAG,IAAI,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/tools/index.ts"],"names":[],"mappings":"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"}
|
package/dist/src/tools/index.js
CHANGED
|
@@ -2,12 +2,14 @@ import { registerAppendBlockChildren } from './append-block-children.js';
|
|
|
2
2
|
import { registerAppendBlocksSimple } from './append-blocks-simple.js';
|
|
3
3
|
import { registerArchiveDatabase } from './archive-database.js';
|
|
4
4
|
import { registerArchivePage } from './archive-page.js';
|
|
5
|
+
import { registerClearPageContent } from './clear-page-content.js';
|
|
5
6
|
import { registerCreateComment } from './create-comment.js';
|
|
6
7
|
import { registerCreateCommentSimple } from './create-comment-simple.js';
|
|
7
8
|
import { registerCreateDatabase } from './create-database.js';
|
|
8
9
|
import { registerCreatePage } from './create-page.js';
|
|
9
10
|
import { registerCreatePageSimple } from './create-page-simple.js';
|
|
10
11
|
import { registerDeleteBlock } from './delete-block.js';
|
|
12
|
+
import { registerDeleteBlocksBatch } from './delete-blocks-batch.js';
|
|
11
13
|
import { registerFindAndReplaceInPage } from './find-and-replace-in-page.js';
|
|
12
14
|
import { registerGetBlockChildren } from './get-block-children.js';
|
|
13
15
|
import { registerListComments } from './list-comments.js';
|
|
@@ -56,6 +58,8 @@ export function registerAllTools(server, notion) {
|
|
|
56
58
|
registerUpdateBlock(server, notion);
|
|
57
59
|
registerUpdateBlockSimple(server, notion);
|
|
58
60
|
registerDeleteBlock(server, notion);
|
|
61
|
+
registerDeleteBlocksBatch(server, notion);
|
|
62
|
+
registerClearPageContent(server, notion);
|
|
59
63
|
registerReplacePageContent(server, notion);
|
|
60
64
|
registerFindAndReplaceInPage(server, notion);
|
|
61
65
|
// Comment operations
|
|
@@ -67,4 +71,4 @@ export function registerAllTools(server, notion) {
|
|
|
67
71
|
registerRetrieveUser(server, notion);
|
|
68
72
|
registerRetrieveBotUser(server, notion);
|
|
69
73
|
}
|
|
70
|
-
export { registerRetrievePage, registerCreatePage, registerCreatePageSimple, registerUpdatePage, registerArchivePage, registerRetrievePageProperty, registerMovePage, registerCreateDatabase, registerUpdateDatabase, registerArchiveDatabase, registerRetrieveDatabase, registerRetrieveDataSource, registerQueryDataSource, registerUpdateDataSource, registerSearch, registerGetBlockChildren, registerAppendBlockChildren, registerAppendBlocksSimple, registerRetrieveBlock, registerUpdateBlock, registerUpdateBlockSimple, registerDeleteBlock, registerReplacePageContent, registerFindAndReplaceInPage, registerCreateComment, registerCreateCommentSimple, registerListComments, registerListUsers, registerRetrieveUser, registerRetrieveBotUser, };
|
|
74
|
+
export { registerRetrievePage, registerCreatePage, registerCreatePageSimple, registerUpdatePage, registerArchivePage, registerRetrievePageProperty, registerMovePage, registerCreateDatabase, registerUpdateDatabase, registerArchiveDatabase, registerRetrieveDatabase, registerRetrieveDataSource, registerQueryDataSource, registerUpdateDataSource, registerSearch, registerGetBlockChildren, registerAppendBlockChildren, registerAppendBlocksSimple, registerRetrieveBlock, registerUpdateBlock, registerUpdateBlockSimple, registerDeleteBlock, registerDeleteBlocksBatch, registerClearPageContent, registerReplacePageContent, registerFindAndReplaceInPage, registerCreateComment, registerCreateCommentSimple, registerListComments, registerListUsers, registerRetrieveUser, registerRetrieveBotUser, };
|