Add properties param to notion_create_page/notion_update_page for real DB column support - #25
Merged
Merged
Conversation
…l DB property support Previously these tools only ever set the title property -- everything else (entity_id/status/relations) got shoved into text marker blocks in the page body instead of actual Notion database columns (select/rich_text/url/etc). This adds an optional `properties` param (raw Notion property-value object) to notion_create_page, notion_create_pages_batch, notion_update_page, and notion_update_pages_batch so callers can set real database column values directly, merged alongside the existing title/marker handling.
…support The per-param `properties` descriptions were already accurate, but the top-level tool summaries for notion_create_page, notion_create_pages_batch, and notion_update_pages_batch didn't mention the new capability at all -- easy to miss when just skimming available tools. notion_update_page's top-level text already said "title or properties" (now actually true), tightened slightly for clarity.
The handler already correctly remaps type: "owner" to "all" when falling back to the /orgs/:org/repos endpoint (that endpoint has no "owner" value), but the param's description didn't mention this, so a caller filtering by type: "owner" against an org would silently get all repos back with no indication why.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
notion_create_page/notion_update_page(and their batch variants) only ever set the page title property. Everything else —entity_id,status,relations— got written as plain-text marker paragraphs in the page body instead of real Notion database columns (select/rich_text/url/etc).Concretely: creating/updating rows in a database like a Job Leads tracker (with
Status,Category,Comp / Rate,Payment Method,Apply Linkcolumns) left every one of those columns empty — the actual info only existed as text in the page body.Fix
Added an optional
propertiesparam (raw Notion property-value object) to:doCreatePage/notion_create_page/notion_create_pages_batchdoUpdatePage/notion_update_page/notion_update_pages_batchCallers can now pass e.g.:
{ "Status": { "select": { "name": "open" } }, "Comp / Rate": { "rich_text": [{ "text": { "content": "$10-60/hr" } }] } }and it's merged with the existing title-only properties object before the request to Notion. On create, it's merged alongside the
Nametitle property for database parents (ignored for page parents, which have no custom properties). On update, it's merged with any title change into the same PATCH, and correctly deferred to the final PATCH whenarchived: trueis also set (mirrors the existing title-deferral logic, since Notion rejects block edits — but not property/archive PATCHes — on an already-archived page).No changes needed in
client.js—notionRequestalready passes through arbitrary JSON bodies.Testing
Manually verified against a real Notion database (Job Leads tracker) — properties like
Status(select),Comp / Rate(rich_text), andApply Link(url) now populate correctly instead of staying empty.