get_survey_summary
Extract survey summaries from Notion pages to review collected data and analyze responses for research purposes.
Instructions
Get survey summary
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| page_id | Yes |
Implementation Reference
- server.py:72-83 (handler)The handler function for the 'get_survey_summary' tool, registered via @mcp.tool(). It fetches the Notion page details, including properties and the plain text from the first code block, and returns them as a JSON string.@mcp.tool() def get_survey_summary(page_id: str): """Get survey summary""" page = notion.pages.retrieve(page_id) parent = notion.blocks.retrieve(page_id) children = notion.blocks.children.list(page_id) body = "" for child in children["results"]: if child["type"] == "code": body = child["code"]["rich_text"][0]["plain_text"] break return json.dumps({"parent": parent, "properties": page["properties"], "body": body}, ensure_ascii=False)