ldraney-notion-mcp 0.1.2__py3-none-any.whl → 0.1.4__py3-none-any.whl

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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: ldraney-notion-mcp
3
- Version: 0.1.2
3
+ Version: 0.1.4
4
4
  Summary: MCP server wrapping the Notion Python SDK (v2025-09-03)
5
5
  License: MIT
6
6
  Requires-Python: >=3.10
@@ -0,0 +1,15 @@
1
+ notion_mcp/__init__.py,sha256=Wy2Os0Ww79mbGvySlmb9IVPW9t-oUPO246-8PppLqUI,105
2
+ notion_mcp/__main__.py,sha256=8iuAFwnkWnvYNFN7qLyPeNa-qlKbzQMO6b7li5yrRFU,83
3
+ notion_mcp/server.py,sha256=eJPqXMqo1AGVTozjWkON8ys1oe5wraiB1dmHz1wqU6M,2324
4
+ notion_mcp/tools/__init__.py,sha256=Dak6lGr2H_aG5SYNAfi_1lACTqwAPDAAjIyVmGja8as,496
5
+ notion_mcp/tools/blocks.py,sha256=4IcojENzkB4I6Z8Jku7Bc4dHq5vOHjzDWwpSWcfjw6M,3845
6
+ notion_mcp/tools/comments.py,sha256=HJ-mKbDlsY4Tz42xSO4Yt7yYqSy49YdrRW3Wd5lhXf0,2511
7
+ notion_mcp/tools/databases.py,sha256=9M7wXrnj94rq6MXbIbHqFDxZ1al8l0YXMH5BHpd_1P8,10483
8
+ notion_mcp/tools/pages.py,sha256=5UdwTCDCEVfQT91OA9-_aI2F3HWWYjZ-vJxqYJduZbE,5488
9
+ notion_mcp/tools/search.py,sha256=kgjGlHZNsQ9hrI4x-CRjvMw06CyUzVraCWyyrtFxw-g,1770
10
+ notion_mcp/tools/users.py,sha256=psYUJm0PT--xVfSSQA1XzBCzNewgDbmCjkF1_XTcsoE,1117
11
+ ldraney_notion_mcp-0.1.4.dist-info/METADATA,sha256=Tnq--EbABcEwWXFeJp999ULiizy5wpf30RRdneCMa88,4542
12
+ ldraney_notion_mcp-0.1.4.dist-info/WHEEL,sha256=wUyA8OaulRlbfwMtmQsvNngGrxQHAvkKcvRmdizlJi0,92
13
+ ldraney_notion_mcp-0.1.4.dist-info/entry_points.txt,sha256=rv-l84lsnJ83vSLGoJlfoQsc-IQHRevhU1_NiIZyI3M,62
14
+ ldraney_notion_mcp-0.1.4.dist-info/top_level.txt,sha256=lFXGlrgRGHEtgwNKPCohd0H0PxUReLzGdpd6YzborzM,11
15
+ ldraney_notion_mcp-0.1.4.dist-info/RECORD,,
@@ -3,13 +3,17 @@
3
3
  from __future__ import annotations
4
4
 
5
5
  import json
6
- from typing import Any
6
+ from typing import Annotated, Any
7
+
8
+ from pydantic import Field
7
9
 
8
10
  from ..server import mcp, get_client, _parse_json, _error_response
9
11
 
10
12
 
11
13
  @mcp.tool()
12
- def get_block(block_id: str) -> str:
14
+ def get_block(
15
+ block_id: Annotated[str, Field(description="The UUID of the block to retrieve")],
16
+ ) -> str:
13
17
  """Retrieve a Notion block by its ID.
14
18
 
15
19
  Args:
@@ -24,9 +28,9 @@ def get_block(block_id: str) -> str:
24
28
 
25
29
  @mcp.tool()
26
30
  def get_block_children(
27
- block_id: str,
28
- start_cursor: str | None = None,
29
- page_size: int | None = None,
31
+ block_id: Annotated[str, Field(description="The UUID of the parent block")],
32
+ start_cursor: Annotated[str | None, Field(description="Cursor for pagination")] = None,
33
+ page_size: Annotated[int | None, Field(description="Number of results per page")] = None,
30
34
  ) -> str:
31
35
  """List child blocks of a Notion block.
32
36
 
@@ -47,9 +51,14 @@ def get_block_children(
47
51
 
48
52
 
49
53
  @mcp.tool()
50
- def append_block_children(block_id: str, children: str) -> str:
54
+ def append_block_children(
55
+ block_id: Annotated[str, Field(description="The UUID of the parent block to append children to")],
56
+ children: Annotated[str, Field(description="JSON string for a list of block objects to append, e.g. '[{\"object\": \"block\", \"type\": \"paragraph\", \"paragraph\": {\"rich_text\": [{\"type\": \"text\", \"text\": {\"content\": \"Hello\"}}]}}]'")],
57
+ ) -> str:
51
58
  """Append child blocks to a Notion block.
52
59
 
60
+ IMPORTANT: The children parameter must be passed as a JSON-encoded string, NOT as an object.
61
+
53
62
  Args:
54
63
  block_id: The UUID of the parent block to append children to.
55
64
  children: JSON string for a list of block objects to append.
@@ -66,15 +75,17 @@ def append_block_children(block_id: str, children: str) -> str:
66
75
 
67
76
  @mcp.tool()
68
77
  def update_block(
69
- block_id: str,
70
- content: str | None = None,
78
+ block_id: Annotated[str, Field(description="The UUID of the block to update")],
79
+ content: Annotated[str | None, Field(description="JSON string of block properties to update. The keys depend on the block type, e.g. '{\"paragraph\": {\"rich_text\": [{\"type\": \"text\", \"text\": {\"content\": \"Updated text\"}}]}}'")] = None,
71
80
  ) -> str:
72
81
  """Update a Notion block.
73
82
 
83
+ IMPORTANT: The content parameter must be passed as a JSON-encoded string, NOT as an object.
84
+
74
85
  Args:
75
86
  block_id: The UUID of the block to update.
76
87
  content: JSON string of block properties to update. The keys depend
77
- on the block type (e.g. {"paragraph": {"rich_text": [...]}}).
88
+ on the block type (e.g. '{"paragraph": {"rich_text": [...]}}').
78
89
  """
79
90
  try:
80
91
  kwargs: dict[str, Any] = {}
@@ -87,7 +98,9 @@ def update_block(
87
98
 
88
99
 
89
100
  @mcp.tool()
90
- def delete_block(block_id: str) -> str:
101
+ def delete_block(
102
+ block_id: Annotated[str, Field(description="The UUID of the block to delete")],
103
+ ) -> str:
91
104
  """Delete (archive) a Notion block.
92
105
 
93
106
  Args:
@@ -3,23 +3,28 @@
3
3
  from __future__ import annotations
4
4
 
5
5
  import json
6
+ from typing import Annotated
7
+
8
+ from pydantic import Field
6
9
 
7
10
  from ..server import mcp, get_client, _parse_json, _error_response
8
11
 
9
12
 
10
13
  @mcp.tool()
11
14
  def create_comment(
12
- parent: str,
13
- rich_text: str,
14
- discussion_id: str | None = None,
15
+ parent: Annotated[str, Field(description="JSON string for the parent object, e.g. '{\"page_id\": \"...\"}'")],
16
+ rich_text: Annotated[str, Field(description="JSON string for the rich-text content array, e.g. '[{\"type\": \"text\", \"text\": {\"content\": \"Hello!\"}}]'")],
17
+ discussion_id: Annotated[str | None, Field(description="UUID of an existing discussion thread to reply to. Omit to start a new top-level comment.")] = None,
15
18
  ) -> str:
16
19
  """Create a comment on a Notion page or block.
17
20
 
21
+ IMPORTANT: parent and rich_text must be passed as JSON-encoded strings, NOT as objects.
22
+
18
23
  Args:
19
24
  parent: JSON string for the parent object,
20
- e.g. {"page_id": "..."}.
25
+ e.g. '{"page_id": "..."}'.
21
26
  rich_text: JSON string for the rich-text content array,
22
- e.g. [{"type": "text", "text": {"content": "Hello!"}}].
27
+ e.g. '[{"type": "text", "text": {"content": "Hello!"}}]'.
23
28
  discussion_id: Optional UUID of an existing discussion thread
24
29
  to reply to. Omit to start a new top-level comment.
25
30
  """
@@ -39,9 +44,9 @@ def create_comment(
39
44
 
40
45
  @mcp.tool()
41
46
  def get_comments(
42
- block_id: str,
43
- start_cursor: str | None = None,
44
- page_size: int | None = None,
47
+ block_id: Annotated[str, Field(description="The UUID of the block or page to list comments for")],
48
+ start_cursor: Annotated[str | None, Field(description="Cursor for pagination")] = None,
49
+ page_size: Annotated[int | None, Field(description="Number of results per page")] = None,
45
50
  ) -> str:
46
51
  """List comments on a Notion block or page.
47
52
 
@@ -3,7 +3,9 @@
3
3
  from __future__ import annotations
4
4
 
5
5
  import json
6
- from typing import Any
6
+ from typing import Annotated, Any
7
+
8
+ from pydantic import Field
7
9
 
8
10
  from ..server import mcp, get_client, _parse_json, _error_response
9
11
 
@@ -15,19 +17,21 @@ from ..server import mcp, get_client, _parse_json, _error_response
15
17
 
16
18
  @mcp.tool()
17
19
  def create_database(
18
- parent: str,
19
- title: str,
20
- initial_data_source: str | None = None,
20
+ parent: Annotated[str, Field(description="JSON string for the parent object, e.g. '{\"type\": \"page_id\", \"page_id\": \"...\"}'")],
21
+ title: Annotated[str, Field(description="JSON string for the title rich-text array, e.g. '[{\"type\": \"text\", \"text\": {\"content\": \"My DB\"}}]'")],
22
+ initial_data_source: Annotated[str | None, Field(description="JSON string for the initial data source configuration including properties")] = None,
21
23
  ) -> str:
22
24
  """Create a new Notion database.
23
25
 
24
26
  In Notion API v2025-09-03, database properties live on data sources.
25
27
  Pass properties inside initial_data_source.properties.
26
28
 
29
+ IMPORTANT: All structured parameters must be passed as JSON-encoded strings, NOT as objects.
30
+
27
31
  Args:
28
- parent: JSON string for the parent object, e.g. {"type": "page_id", "page_id": "..."}.
32
+ parent: JSON string for the parent object, e.g. '{"type": "page_id", "page_id": "..."}'.
29
33
  title: JSON string for the title rich-text array,
30
- e.g. [{"type": "text", "text": {"content": "My DB"}}].
34
+ e.g. '[{"type": "text", "text": {"content": "My DB"}}]'.
31
35
  initial_data_source: Optional JSON string for the initial data source
32
36
  configuration including properties.
33
37
  """
@@ -43,7 +47,9 @@ def create_database(
43
47
 
44
48
 
45
49
  @mcp.tool()
46
- def get_database(database_id: str) -> str:
50
+ def get_database(
51
+ database_id: Annotated[str, Field(description="The UUID of the database to retrieve")],
52
+ ) -> str:
47
53
  """Retrieve a Notion database by its ID.
48
54
 
49
55
  Note: In v2025-09-03 the response contains data_sources but NOT
@@ -61,14 +67,16 @@ def get_database(database_id: str) -> str:
61
67
 
62
68
  @mcp.tool()
63
69
  def update_database(
64
- database_id: str,
65
- title: str | None = None,
66
- description: str | None = None,
67
- icon: str | None = None,
68
- cover: str | None = None,
70
+ database_id: Annotated[str, Field(description="The UUID of the database to update")],
71
+ title: Annotated[str | None, Field(description="JSON string for the new title rich-text array, e.g. '[{\"type\": \"text\", \"text\": {\"content\": \"New Title\"}}]'")] = None,
72
+ description: Annotated[str | None, Field(description="JSON string for the description rich-text array, e.g. '[{\"type\": \"text\", \"text\": {\"content\": \"A description\"}}]'")] = None,
73
+ icon: Annotated[str | None, Field(description="JSON string for the database icon, e.g. '{\"type\": \"emoji\", \"emoji\": \"📊\"}'")] = None,
74
+ cover: Annotated[str | None, Field(description="JSON string for the database cover, e.g. '{\"type\": \"external\", \"external\": {\"url\": \"https://...\"}}'")] = None,
69
75
  ) -> str:
70
76
  """Update a Notion database.
71
77
 
78
+ IMPORTANT: All structured parameters must be passed as JSON-encoded strings, NOT as objects.
79
+
72
80
  Args:
73
81
  database_id: The UUID of the database to update.
74
82
  title: Optional JSON string for the new title rich-text array.
@@ -93,7 +101,9 @@ def update_database(
93
101
 
94
102
 
95
103
  @mcp.tool()
96
- def archive_database(database_id: str) -> str:
104
+ def archive_database(
105
+ database_id: Annotated[str, Field(description="The UUID of the database to archive")],
106
+ ) -> str:
97
107
  """Archive a Notion database.
98
108
 
99
109
  Args:
@@ -108,17 +118,19 @@ def archive_database(database_id: str) -> str:
108
118
 
109
119
  @mcp.tool()
110
120
  def query_database(
111
- database_id: str,
112
- filter: str | None = None,
113
- sorts: str | None = None,
114
- start_cursor: str | None = None,
115
- page_size: int | None = None,
121
+ database_id: Annotated[str, Field(description="The UUID of the database to query")],
122
+ filter: Annotated[str | None, Field(description="JSON string for a filter object, e.g. '{\"property\": \"Status\", \"select\": {\"equals\": \"Done\"}}'")] = None,
123
+ sorts: Annotated[str | None, Field(description="JSON string for a list of sort objects, e.g. '[{\"property\": \"Created\", \"direction\": \"descending\"}]'")] = None,
124
+ start_cursor: Annotated[str | None, Field(description="Cursor for pagination")] = None,
125
+ page_size: Annotated[int | None, Field(description="Number of results per page")] = None,
116
126
  ) -> str:
117
127
  """Query a Notion database for pages/rows.
118
128
 
119
129
  Automatically resolves the first data source and queries it.
120
130
  If you already know the data source ID, use query_data_source instead.
121
131
 
132
+ IMPORTANT: filter and sorts must be passed as JSON-encoded strings, NOT as objects.
133
+
122
134
  Args:
123
135
  database_id: The UUID of the database to query.
124
136
  filter: Optional JSON string for a filter object.
@@ -145,7 +157,9 @@ def query_database(
145
157
 
146
158
 
147
159
  @mcp.tool()
148
- def get_data_source(data_source_id: str) -> str:
160
+ def get_data_source(
161
+ data_source_id: Annotated[str, Field(description="The UUID of the data source to retrieve")],
162
+ ) -> str:
149
163
  """Retrieve a Notion data source (includes properties).
150
164
 
151
165
  Args:
@@ -160,11 +174,13 @@ def get_data_source(data_source_id: str) -> str:
160
174
 
161
175
  @mcp.tool()
162
176
  def update_data_source(
163
- data_source_id: str,
164
- properties: str | None = None,
177
+ data_source_id: Annotated[str, Field(description="The UUID of the data source to update")],
178
+ properties: Annotated[str | None, Field(description="JSON string for properties to update, e.g. '{\"Name\": {\"title\": {}}, \"Tags\": {\"multi_select\": {}}}'")] = None,
165
179
  ) -> str:
166
180
  """Update a Notion data source.
167
181
 
182
+ IMPORTANT: The properties parameter must be passed as a JSON-encoded string, NOT as an object.
183
+
168
184
  Args:
169
185
  data_source_id: The UUID of the data source to update.
170
186
  properties: Optional JSON string for properties to update.
@@ -181,14 +197,16 @@ def update_data_source(
181
197
 
182
198
  @mcp.tool()
183
199
  def query_data_source(
184
- data_source_id: str,
185
- filter: str | None = None,
186
- sorts: str | None = None,
187
- start_cursor: str | None = None,
188
- page_size: int | None = None,
200
+ data_source_id: Annotated[str, Field(description="The UUID of the data source to query")],
201
+ filter: Annotated[str | None, Field(description="JSON string for a filter object, e.g. '{\"property\": \"Status\", \"select\": {\"equals\": \"Done\"}}'")] = None,
202
+ sorts: Annotated[str | None, Field(description="JSON string for a list of sort objects, e.g. '[{\"property\": \"Created\", \"direction\": \"descending\"}]'")] = None,
203
+ start_cursor: Annotated[str | None, Field(description="Cursor for pagination")] = None,
204
+ page_size: Annotated[int | None, Field(description="Number of results per page")] = None,
189
205
  ) -> str:
190
206
  """Query rows in a Notion data source.
191
207
 
208
+ IMPORTANT: filter and sorts must be passed as JSON-encoded strings, NOT as objects.
209
+
192
210
  Args:
193
211
  data_source_id: The UUID of the data source to query.
194
212
  filter: Optional JSON string for a filter object.
@@ -211,10 +229,10 @@ def query_data_source(
211
229
 
212
230
  @mcp.tool()
213
231
  def list_data_source_templates(
214
- data_source_id: str,
215
- name: str | None = None,
216
- start_cursor: str | None = None,
217
- page_size: int | None = None,
232
+ data_source_id: Annotated[str, Field(description="The UUID of the data source")],
233
+ name: Annotated[str | None, Field(description="Name filter for templates")] = None,
234
+ start_cursor: Annotated[str | None, Field(description="Cursor for pagination")] = None,
235
+ page_size: Annotated[int | None, Field(description="Number of results per page")] = None,
218
236
  ) -> str:
219
237
  """List templates for a Notion data source.
220
238
 
notion_mcp/tools/pages.py CHANGED
@@ -3,28 +3,32 @@
3
3
  from __future__ import annotations
4
4
 
5
5
  import json
6
- from typing import Any
6
+ from typing import Annotated, Any
7
+
8
+ from pydantic import Field
7
9
 
8
10
  from ..server import mcp, get_client, _parse_json, _error_response
9
11
 
10
12
 
11
13
  @mcp.tool()
12
14
  def create_page(
13
- parent: str,
14
- properties: str,
15
- children: str | None = None,
16
- template: str | None = None,
15
+ parent: Annotated[str, Field(description="JSON string for the parent object, e.g. '{\"type\": \"page_id\", \"page_id\": \"...\"}'")],
16
+ properties: Annotated[str, Field(description="JSON string for the page properties mapping, e.g. '{\"title\": [{\"text\": {\"content\": \"My Page\"}}]}'")],
17
+ children: Annotated[str | None, Field(description="JSON string for a list of block children to append. Cannot be used together with template.")] = None,
18
+ template: Annotated[str | None, Field(description="JSON string for a data-source template, e.g. '{\"type\": \"none\"}', '{\"type\": \"default\"}', or '{\"type\": \"template_id\", \"template_id\": \"<uuid>\"}'")] = None,
17
19
  ) -> str:
18
20
  """Create a new Notion page.
19
21
 
22
+ IMPORTANT: All structured parameters must be passed as JSON-encoded strings, NOT as objects.
23
+
20
24
  Args:
21
- parent: JSON string for the parent object, e.g. {"type": "page_id", "page_id": "..."}.
25
+ parent: JSON string for the parent object, e.g. '{"type": "page_id", "page_id": "..."}'.
22
26
  properties: JSON string for the page properties mapping.
23
27
  children: Optional JSON string for a list of block children to append.
24
28
  Cannot be used together with template.
25
29
  template: Optional JSON string for a data-source template, e.g.
26
- {"type": "none"}, {"type": "default"}, or
27
- {"type": "template_id", "template_id": "<uuid>"}.
30
+ '{"type": "none"}', '{"type": "default"}', or
31
+ '{"type": "template_id", "template_id": "<uuid>"}'.
28
32
  """
29
33
  try:
30
34
  result = get_client().create_page(
@@ -39,7 +43,9 @@ def create_page(
39
43
 
40
44
 
41
45
  @mcp.tool()
42
- def get_page(page_id: str) -> str:
46
+ def get_page(
47
+ page_id: Annotated[str, Field(description="The UUID of the page to retrieve")],
48
+ ) -> str:
43
49
  """Retrieve a Notion page by its ID.
44
50
 
45
51
  Args:
@@ -54,14 +60,16 @@ def get_page(page_id: str) -> str:
54
60
 
55
61
  @mcp.tool()
56
62
  def update_page(
57
- page_id: str,
58
- properties: str | None = None,
59
- erase_content: bool | None = None,
60
- icon: str | None = None,
61
- cover: str | None = None,
63
+ page_id: Annotated[str, Field(description="The UUID of the page to update")],
64
+ properties: Annotated[str | None, Field(description="JSON string of properties to update, e.g. '{\"Name\": {\"title\": [{\"text\": {\"content\": \"New Title\"}}]}}'")] = None,
65
+ erase_content: Annotated[bool | None, Field(description="If true, clears ALL block content from the page. WARNING: This is destructive and irreversible.")] = None,
66
+ icon: Annotated[str | None, Field(description="JSON string for the page icon, e.g. '{\"type\": \"emoji\", \"emoji\": \"🎉\"}'")] = None,
67
+ cover: Annotated[str | None, Field(description="JSON string for the page cover, e.g. '{\"type\": \"external\", \"external\": {\"url\": \"https://...\"}}'")] = None,
62
68
  ) -> str:
63
69
  """Update a Notion page's properties, icon, or cover.
64
70
 
71
+ IMPORTANT: All structured parameters must be passed as JSON-encoded strings, NOT as objects.
72
+
65
73
  Args:
66
74
  page_id: The UUID of the page to update.
67
75
  properties: Optional JSON string of properties to update.
@@ -89,7 +97,9 @@ def update_page(
89
97
 
90
98
 
91
99
  @mcp.tool()
92
- def archive_page(page_id: str) -> str:
100
+ def archive_page(
101
+ page_id: Annotated[str, Field(description="The UUID of the page to archive")],
102
+ ) -> str:
93
103
  """Archive (soft-delete) a Notion page.
94
104
 
95
105
  Args:
@@ -103,13 +113,18 @@ def archive_page(page_id: str) -> str:
103
113
 
104
114
 
105
115
  @mcp.tool()
106
- def move_page(page_id: str, parent: str) -> str:
116
+ def move_page(
117
+ page_id: Annotated[str, Field(description="The UUID of the page to move")],
118
+ parent: Annotated[str, Field(description="JSON string for the new parent object, e.g. '{\"type\": \"page_id\", \"page_id\": \"...\"}'")],
119
+ ) -> str:
107
120
  """Move a Notion page to a new parent.
108
121
 
122
+ IMPORTANT: The parent parameter must be passed as a JSON-encoded string, NOT as an object.
123
+
109
124
  Args:
110
125
  page_id: The UUID of the page to move.
111
126
  parent: JSON string for the new parent object,
112
- e.g. {"type": "page_id", "page_id": "..."}.
127
+ e.g. '{"type": "page_id", "page_id": "..."}'.
113
128
  """
114
129
  try:
115
130
  result = get_client().move_page(
@@ -3,26 +3,31 @@
3
3
  from __future__ import annotations
4
4
 
5
5
  import json
6
+ from typing import Annotated
7
+
8
+ from pydantic import Field
6
9
 
7
10
  from ..server import mcp, get_client, _parse_json, _error_response
8
11
 
9
12
 
10
13
  @mcp.tool()
11
14
  def search(
12
- query: str | None = None,
13
- filter: str | None = None,
14
- sort: str | None = None,
15
- start_cursor: str | None = None,
16
- page_size: int | None = None,
15
+ query: Annotated[str | None, Field(description="Text query to search for")] = None,
16
+ filter: Annotated[str | None, Field(description="JSON string for a filter object, e.g. '{\"value\": \"page\", \"property\": \"object\"}'")] = None,
17
+ sort: Annotated[str | None, Field(description="JSON string for a sort object, e.g. '{\"direction\": \"ascending\", \"timestamp\": \"last_edited_time\"}'")] = None,
18
+ start_cursor: Annotated[str | None, Field(description="Cursor for pagination")] = None,
19
+ page_size: Annotated[int | None, Field(description="Number of results per page")] = None,
17
20
  ) -> str:
18
21
  """Search Notion pages and databases.
19
22
 
23
+ IMPORTANT: filter and sort must be passed as JSON-encoded strings, NOT as objects.
24
+
20
25
  Args:
21
26
  query: Optional text query to search for.
22
27
  filter: Optional JSON string for a filter object,
23
- e.g. {"value": "page", "property": "object"}.
28
+ e.g. '{"value": "page", "property": "object"}'.
24
29
  sort: Optional JSON string for a sort object,
25
- e.g. {"direction": "ascending", "timestamp": "last_edited_time"}.
30
+ e.g. '{"direction": "ascending", "timestamp": "last_edited_time"}'.
26
31
  start_cursor: Optional cursor for pagination.
27
32
  page_size: Optional number of results per page.
28
33
  """
notion_mcp/tools/users.py CHANGED
@@ -3,14 +3,17 @@
3
3
  from __future__ import annotations
4
4
 
5
5
  import json
6
+ from typing import Annotated
7
+
8
+ from pydantic import Field
6
9
 
7
10
  from ..server import mcp, get_client, _error_response
8
11
 
9
12
 
10
13
  @mcp.tool()
11
14
  def get_users(
12
- start_cursor: str | None = None,
13
- page_size: int | None = None,
15
+ start_cursor: Annotated[str | None, Field(description="Cursor for pagination")] = None,
16
+ page_size: Annotated[int | None, Field(description="Number of results per page")] = None,
14
17
  ) -> str:
15
18
  """List all users in the Notion workspace.
16
19
 
@@ -1,15 +0,0 @@
1
- notion_mcp/__init__.py,sha256=Wy2Os0Ww79mbGvySlmb9IVPW9t-oUPO246-8PppLqUI,105
2
- notion_mcp/__main__.py,sha256=8iuAFwnkWnvYNFN7qLyPeNa-qlKbzQMO6b7li5yrRFU,83
3
- notion_mcp/server.py,sha256=eJPqXMqo1AGVTozjWkON8ys1oe5wraiB1dmHz1wqU6M,2324
4
- notion_mcp/tools/__init__.py,sha256=Dak6lGr2H_aG5SYNAfi_1lACTqwAPDAAjIyVmGja8as,496
5
- notion_mcp/tools/blocks.py,sha256=9OTGJS6XhRzZe0sZk1ArgN-gyGmfcuTMek7HnhNk-ew,2674
6
- notion_mcp/tools/comments.py,sha256=eLPQZSIDd6wae9hVcnp5v_TpMu9a01k7wUJpjNBnq4E,1792
7
- notion_mcp/tools/databases.py,sha256=7L_M7Y-AX82S24TuZY88sJ6SoEECnZkq3muKYTExjqk,7360
8
- notion_mcp/tools/pages.py,sha256=8FuUCJwASwt17IfpqO3dJWoz-FwXarKJC8VlHz53oX4,3638
9
- notion_mcp/tools/search.py,sha256=FwaiR-4vQ7SwGcCNKvVeMBk9TLTWrtlAi_Baf9HYyw8,1188
10
- notion_mcp/tools/users.py,sha256=C0ytVNk7lDpQfcw4Wir39QII97LUtINf62j7fKpD-IQ,945
11
- ldraney_notion_mcp-0.1.2.dist-info/METADATA,sha256=XDqwhjvSPgTPBDHXy9lx--1wXRxtf78YfWiyYWWB9JQ,4542
12
- ldraney_notion_mcp-0.1.2.dist-info/WHEEL,sha256=wUyA8OaulRlbfwMtmQsvNngGrxQHAvkKcvRmdizlJi0,92
13
- ldraney_notion_mcp-0.1.2.dist-info/entry_points.txt,sha256=rv-l84lsnJ83vSLGoJlfoQsc-IQHRevhU1_NiIZyI3M,62
14
- ldraney_notion_mcp-0.1.2.dist-info/top_level.txt,sha256=lFXGlrgRGHEtgwNKPCohd0H0PxUReLzGdpd6YzborzM,11
15
- ldraney_notion_mcp-0.1.2.dist-info/RECORD,,