Skip to main content
Glama

workflowy_update_node

Modify an existing WorkFlowy node by updating its name, note content, layout style, or completion status to keep your outlines current.

Instructions

Update an existing WorkFlowy node

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
node_idYes
nameNo
noteNo
layout_modeNo
_completedNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
chNoChild nodes
cpNoCompletion status (for tests)
idYesUnique identifier for the node
dataNoNode data including layoutMode
nameNoText content of the node
noteNoNote content attached to the node
parentIdNoParent node ID
priorityNoSort order
createdAtNoCreation timestamp (Unix timestamp)
modifiedAtNoLast modification timestamp
completedAtNoCompletion timestamp (null if not completed)

Implementation Reference

  • The primary handler function for the 'workflowy_update_node' MCP tool. It validates inputs via type hints and NodeUpdateRequest model, manages rate limiting, delegates to WorkFlowyClient.update_node, and returns the updated WorkFlowyNode.
    @mcp.tool(name="workflowy_update_node", description="Update an existing WorkFlowy node")
    async def update_node(
        node_id: str,
        name: str | None = None,
        note: str | None = None,
        layout_mode: Literal["bullets", "todo", "h1", "h2", "h3"] | None = None,
        _completed: bool | None = None,
    ) -> WorkFlowyNode:
        """Update an existing WorkFlowy node.
    
        Args:
            node_id: The ID of the node to update
            name: New text content for the node (optional)
            note: New note/description (optional)
            layout_mode: New layout mode for the node (bullets, todo, h1, h2, h3) (optional)
            _completed: New completion status (not used - use complete_node/uncomplete_node)
    
        Returns:
            The updated WorkFlowy node
        """
        client = get_client()
    
        request = NodeUpdateRequest(  # type: ignore[call-arg]
            name=name,
            note=note,
            layoutMode=layout_mode,
        )
    
        if _rate_limiter:
            await _rate_limiter.acquire()
    
        try:
            node = await client.update_node(node_id, request)
            if _rate_limiter:
                _rate_limiter.on_success()
            return node
        except Exception as e:
            if _rate_limiter and hasattr(e, "__class__") and e.__class__.__name__ == "RateLimitError":
                _rate_limiter.on_rate_limit(getattr(e, "retry_after", None))
            raise
  • Pydantic BaseModel defining the input schema (optional name, note, layoutMode) used in the tool handler for node updates.
    class NodeUpdateRequest(BaseModel):
        """Request payload for updating an existing node."""
    
        name: str | None = Field(None, description="New text content")
        note: str | None = Field(None, description="New note content")
        layoutMode: Literal["bullets", "todo", "h1", "h2", "h3"] | None = Field(
            None, description="New display mode (bullets, todo, h1, h2, h3)"
        )
    
        def has_updates(self) -> bool:
            """Check if at least one field is provided for update."""
            return any(getattr(self, field) is not None for field in self.model_fields)
  • Core API client method that executes the HTTP POST request to update the node via the WorkFlowy API endpoint /nodes/{node_id}, parses response into WorkFlowyNode, and handles errors including rate limits.
    async def update_node(self, node_id: str, request: NodeUpdateRequest) -> WorkFlowyNode:
        """Update an existing node."""
        try:
            response = await self.client.post(
                f"/nodes/{node_id}", json=request.model_dump(exclude_none=True)
            )
            data = await self._handle_response(response)
            # API returns the full node object
            return WorkFlowyNode(**data)
        except httpx.TimeoutException as err:
            raise TimeoutError("update_node") from err
        except httpx.NetworkError as e:
            raise NetworkError(f"Network error: {str(e)}") from e
  • The @mcp.tool decorator registers the update_node function as the MCP tool with the specified name and description.
    @mcp.tool(name="workflowy_update_node", description="Update an existing WorkFlowy node")
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. While 'Update' implies a mutation operation, the description doesn't specify whether this requires authentication, what happens when only some fields are provided (partial updates), whether changes are reversible, or what the response looks like. For a mutation tool with 5 parameters and no annotation coverage, this is a significant gap in behavioral context.

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

Conciseness5/5

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

The description is extremely concise at just 5 words, with zero wasted language. It's front-loaded with the essential action and resource. While it's arguably too brief given the tool's complexity, it achieves maximum efficiency within its limited scope.

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?

Given the tool has 5 parameters with 0% schema coverage, no annotations, and involves mutation operations, the description is severely incomplete. While an output schema exists (which helps with return values), the description doesn't address key contextual aspects like authentication requirements, error conditions, partial update behavior, or relationships with sibling tools. For a node update operation in a hierarchy system, this leaves too many unknowns.

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?

The schema description coverage is 0%, meaning none of the 5 parameters have descriptions in the schema. The tool description mentions no parameters at all, failing to compensate for this complete lack of schema documentation. Users must guess what 'node_id', 'name', 'note', 'layout_mode', and '_completed' mean based solely on their names, which is insufficient for proper tool invocation.

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

Purpose4/5

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

The description clearly states the verb ('Update') and resource ('an existing WorkFlowy node'), making the purpose unambiguous. It distinguishes this from sibling tools like 'create_node' and 'delete_node' by specifying it's for existing nodes. However, it doesn't specify what aspects can be updated (name, note, layout_mode, completion status), which prevents a perfect score.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention when to choose 'update_node' over 'complete_node' or 'uncomplete_node' for completion status changes, or how it relates to 'get_node' for retrieving node data before updating. There's no context about prerequisites or typical use cases.

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/vladzima/workflowy-mcp'

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