Agent skill
notion-query
Search and retrieve content from a Notion workspace
Install this agent skill to your Project
npx add-skill https://github.com/sofer/.agents/tree/main/skills/notion-query
SKILL.md
Notion query
Purpose
Search for and retrieve content from the user's Notion workspace. This skill provides read-only access to Notion via two operations: searching by query and fetching a specific page by ID. It wraps the Notion MCP server tools to give other skills a consistent interface for accessing business documentation.
Prerequisites
This skill requires the Notion MCP server to be available. The following MCP tools must be accessible:
mcp__claude_ai_Notion__notion-searchmcp__claude_ai_Notion__notion-fetch
If either tool is unavailable, stop and report: "The Notion MCP server is unavailable. Ensure the Notion MCP integration is configured and running."
Instructions
Determine which operation to perform based on the input:
If a page ID or URL is provided (fetch mode)
- Call
mcp__claude_ai_Notion__notion-fetchwith the page ID or URL as theidparameter.- Accepts full Notion URLs (e.g.
https://notion.so/workspace/Page-Title-abc123), Notion Sites URLs (e.g.https://myspace.notion.site/Page-Title-abc123), raw UUIDs (with or without dashes), and data source URLs (e.g.collection://...).
- Accepts full Notion URLs (e.g.
- Return the full page content as received from the tool. This will be in Notion-flavoured Markdown for pages, or schema and data source information for databases.
If a search query is provided (search mode)
- Call
mcp__claude_ai_Notion__notion-searchwith the following parameters:query: the search query string (required)query_type: set to"internal"for content search (this is the default and most common use)page_url: if a scope was provided and it is a page URL or ID, pass it here to restrict search to that page and its childrendata_source_url: if a scope was provided and it is a data source URL (starts withcollection://), pass it here to restrict search to that data sourcefilters: if date range or creator filters were provided, pass them as an object withcreated_date_range(containingstart_dateand/orend_datein ISO 8601 format) and/orcreated_by_user_ids(list of user ID strings)
- Return the search results as received from the tool.
- If the caller needs the full content of a specific result, they should invoke this skill again with that page's ID or URL.
If both a page ID and a query are provided
Page ID takes precedence. Follow the fetch mode instructions above and ignore the query.
Error handling
- If neither a query nor a page ID is provided, stop and report: "No query or page ID provided. Provide either a search query or a Notion page ID/URL."
- If the MCP tools are unavailable, stop and report: "The Notion MCP server is unavailable. Ensure the Notion MCP integration is configured and running."
- If a search returns no results, report that no results were found for the given query. Suggest trying broader or different search terms.
- If a page fetch fails (page not found or inaccessible), report the error and include the ID/URL that was tried.
Output format
Search results
The output from a search is a list of matching pages as returned by the Notion MCP server. Each result typically includes:
- Page title
- Page URL
- Content snippet showing the match
Present the results clearly so the calling skill can identify which page(s) are relevant.
Page content
The output from a fetch is the full page content in Notion-flavoured Markdown. This includes headings, text, lists, tables, and any other content blocks on the page. For databases, the output includes the schema and data source information.
Return the content as-is. Do not summarise or truncate. The consuming skill decides what to extract.
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
meeting-context
Determine why a meeting is happening and what should be discussed
reconcile
Analyse and resolve divergences between SDLC manifest and actual development state (git commits, branches, uncommitted files). Use when manifest and reality have drifted apart, or before picking next story to ensure clean state.
readme-review
Review the project README to understand what it does and suggest a recommended next step. Use when starting work on an unfamiliar project.
init-override
Create a symlink from AGENTS.md to CLAUDE.md in the current project directory. Use when the user wants to initialise a project to use AGENTS.md as the memory file instead of CLAUDE.md.
commit
Git workflow operations with Conventional Commits. Supports subcommands - branch (create feature branch), commit (stage and commit changes), pr (create pull request), merge (merge PR). Automatically available when the current directory is a git repository. Use when user needs git operations during development workflow.
contact-research
Research a person given their name and email, returning a brief profile with role, company, LinkedIn summary, and previous interactions
Didn't find tool you were looking for?