Skip to main content
Glama

update_survey_summary_property

Modify survey summary properties in Notion to update survey data, using property definitions from get_property_definition for accurate configuration.

Instructions

Update survey summary property
To know definition of properties, use `get_property_definition` tool in advance.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
page_idYes
updatesYes

Implementation Reference

  • The handler function that implements the core logic for updating properties on a Notion survey summary page.
    def update_survey_summary_property(page_id: str, updates: list[SetPageProperty], ctx: Context):
        """
        Update survey summary property
        To know definition of properties, use `get_property_definition` tool in advance.
        """
        parent = notion.pages.retrieve(page_id)
        properties = parent["properties"]
        for update in updates:
            update.assert_type_and_value()
            if update.property_name not in properties:
                ctx.warning(f"Property {update.property_name} not found, skipping")
                continue
            prop = properties[update.property_name]
            if prop["type"] != update.type:
                ctx.warning(f"Property {update.property_name} is not of type {update.type}")
                continue
            type_ = prop["type"]
            if type_ == "number":
                prop[update.type] = float(update.number_value)
            elif type_ == "date":
                prop[update.type] = {"start": update.date_value}
            elif type_ == "rich_text":
                prop[update.type] = [{"type": "text", "text": {"content": update.rich_text_value}}]
            elif type_ == "select":
                prop[update.type] = {"id": update.selection_value}
            elif type_ == "multi_select":
                prop[update.type] = [{"id": v} for v in update.multi_select_values]
            elif type_ == "status":
                prop[update.type] = {"id": update.status_value}
            else:
                ctx.warning(f"Property {update.property_name} is of type {type_}, which is not supported yet.")
                continue
        return notion.pages.update(page_id, properties=properties)
  • Pydantic model used for validating and structuring each property update in the tool's 'updates' parameter. Includes a validation method called by the handler.
    class SetPageProperty(BaseModel):
        property_name: str = Field(..., title="Property Name")
        type: str = Field(..., title="Type")
        rich_text_value: Optional[str] = Field(None, title="Rich text value. It must be a plain text. Only for rich_text.")
        number_value: Optional[float] = Field(None, title="Number property value, Only for number.")
        selection_value: Optional[str] = Field(None, title="Selection property value. It must be an option id. Only for select.")
        multi_select_values: Optional[list[str]] = Field(None, title="Multi select property Value. they must be option ids. Only for multi_select.")
        status_value: Optional[str] = Field(None, title="Status property value. It must be an option id. Only for status.")
        date_value: Optional[str] = Field(None, title="Date Value, Only for date.")
    
        def assert_type_and_value(self):
            if self.type == "rich_text" and self.rich_text_value is None:
                raise ValueError("Rich text value is required for rich_text type")
            if self.type == "number" and self.number_value is None:
                raise ValueError("Number value is required for number type")
            if self.type == "select" and self.selection_value is None:
                raise ValueError("Selection value is required for select type")
            if self.type == "multi_select" and self.multi_select_values is None:
                raise ValueError("Multi select values are required for multi_select type")
            if self.type == "status" and self.status_value is None:
                raise ValueError("Status value is required for status type")
            if self.type == "date" and self.date_value is None:
                raise ValueError("Date value is required for date type")
  • server.py:92-92 (registration)
    The @mcp.tool() decorator that registers the update_survey_summary_property function as an MCP tool.
    @mcp.tool()
  • Supporting tool to retrieve the property definitions/schema from the Notion database, recommended for use before updating properties.
    @mcp.tool()
    def get_property_definition():
        """Get property definition for survey summary"""
        return notion.databases.retrieve(root_database_id)["properties"]
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries full burden. It states this is an 'update' operation, implying mutation, but doesn't disclose any behavioral traits: no information about permissions needed, whether changes are reversible, rate limits, error conditions, or what happens on success. The description adds minimal behavioral context beyond the obvious implication of mutation.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is brief with two sentences that each serve a purpose: stating the operation and providing a prerequisite. There's no unnecessary verbiage. However, it could be more front-loaded with clearer purpose before the prerequisite note.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

This is a mutation tool with 2 parameters, 0% schema coverage, no annotations, and no output schema. The description doesn't explain what a 'survey summary property' is, what resource is being updated, what the parameters mean, what happens after execution, or how this differs from sibling tools. For a tool with this complexity and lack of structured documentation, the description is insufficient.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must compensate. It mentions 'properties' but doesn't explain what 'page_id' refers to or what the 'updates' array contains. The reference to 'get_property_definition' hints at property semantics but doesn't clarify parameter meanings. The description adds some context but doesn't adequately explain the two required parameters.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose2/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states 'Update survey summary property' which is a tautology that merely restates the tool name. While it indicates a mutation operation (update), it doesn't specify what 'survey summary property' means or what resource is being modified. It lacks the specificity needed to distinguish this tool from its sibling 'update_survey_summary_block'.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides one explicit guideline: 'To know definition of properties, use `get_property_definition` tool in advance.' This gives a prerequisite action but doesn't explain when to use this tool versus alternatives like 'update_survey_summary_block' or 'create_new_survey_summary'. The guidance is helpful but incomplete regarding sibling tool differentiation.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/h-yanagawa/research-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server