search_pages
Search Notion pages using a query string to find specific content across your workspace.
Instructions
Search Notion pages by query string
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes |
Implementation Reference
- src/apis/notion/notion.ts:118-123 (handler)Handler function that validates NOTION_TOKEN, extracts the query parameter, and delegates to the NotionClient's search method.async search_pages(args: Record<string, unknown>) { if (!cfg.notionToken) throw new Error("NOTION_TOKEN is not configured"); const query = String(args.query || ""); if (!query) throw new Error("query is required"); return client.search(query); },
- src/apis/notion/notion.ts:87-97 (registration)Tool registration entry including name, description, and input schema for the search_pages tool.{ name: "search_pages", description: "Search Notion pages by query string", inputSchema: { type: "object", properties: { query: { type: "string" }, }, required: ["query"], }, },
- src/apis/notion/notion.ts:90-96 (schema)Input schema defining the required 'query' string parameter.inputSchema: { type: "object", properties: { query: { type: "string" }, }, required: ["query"], },
- src/apis/notion/notion.ts:37-42 (helper)NotionClient helper method that performs the actual API search request to Notion's /v1/search endpoint.search(query: string) { return this.request(`/v1/search`, { method: "POST", body: { query }, }); }