Skip to content

Commit 280523a

Browse files
drnclaude
andcommitted
Notion skill: add Keystone MCP fallback and large page handling
When mcp__notion__notion-fetch isn't available (e.g., Thanx/Keystone environments), the skill now documents fallback tools for reading pages, searching, and querying databases. Also adds guidance for handling large page responses that exceed token limits. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent d804158 commit 280523a

File tree

1 file changed

+23
-1
lines changed

1 file changed

+23
-1
lines changed

agents/skills/notion/SKILL.md

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,20 @@ Read Notion pages and databases via MCP tools. This skill covers reading operati
1414
| `mcp__notion__notion-fetch` | Read page content as Notion-flavored markdown |
1515
| `ReadMcpResourceTool` with `notion://docs/enhanced-markdown-spec` | Get the full markdown spec (useful for understanding page structure) |
1616

17+
### Fallback: Keystone MCP Tools
18+
19+
If `mcp__notion__notion-fetch` is not available (e.g., in environments using Keystone), use these tools instead:
20+
21+
| Tool | Use For |
22+
|------|---------|
23+
| `mcp__plugin_thanx_keystone__notion_get_page` | Read page metadata (title, properties, dates) |
24+
| `mcp__plugin_thanx_keystone__notion_get_page_content` | Read page blocks (raw Notion API JSON) |
25+
| `mcp__plugin_thanx_keystone__notion_search` | Search for pages by title |
26+
| `mcp__plugin_thanx_keystone__notion_query_database` | Query a database with filters |
27+
| `mcp__plugin_thanx_keystone__notion_get_database` | Get database schema and metadata |
28+
29+
The blocks API returns raw JSON. To extract readable text, parse each block's `rich_text[].plain_text` fields. Use ToolSearch to discover and load these tools before calling them.
30+
1731
## Instructions
1832

1933
You are helping read Notion data. Use the MCP tools above for all operations.
@@ -53,7 +67,15 @@ These indicate sections that were absorbed into code blocks during a bad edit.
5367
- **Page reading**: Full page content as structured markdown
5468
- **Database browsing**: View database schemas and entries
5569

70+
### Large Page Handling
71+
72+
Notion pages can return very large responses (100K+ characters) that exceed token limits. When this happens:
73+
- The content may be saved to a temp file automatically
74+
- Use `python3 -c` or `jq` to extract block text rather than reading raw JSON directly
75+
- For Keystone blocks JSON, extract text with: `jq -r '.. | .rich_text? // empty | .[].plain_text' < temp_file.json`
76+
- Consider requesting specific sections rather than the full page when possible
77+
5678
## Limitations
5779

5880
- **Read-only** — Cannot create, update, or delete pages
59-
- Page content is returned as Notion-flavored markdown, not raw JSON
81+
- Page content is returned as Notion-flavored markdown, not raw JSON (except Keystone fallback which returns raw blocks)

0 commit comments

Comments
 (0)