Skip to main content
Glama

workflowy_complete_node

Mark a WorkFlowy node as completed to track task progress and maintain organized outlines through the WorkFlowy MCP Server.

Instructions

Mark a WorkFlowy node as completed

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
node_idYes

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

  • MCP tool registration and handler for workflowy_complete_node. Thin wrapper around WorkFlowyClient.complete_node with global rate limiting.
    @mcp.tool(name="workflowy_complete_node", description="Mark a WorkFlowy node as completed")
    async def complete_node(node_id: str) -> WorkFlowyNode:
        """Mark a WorkFlowy node as completed.
    
        Args:
            node_id: The ID of the node to complete
    
        Returns:
            The updated WorkFlowy node
        """
        client = get_client()
    
        if _rate_limiter:
            await _rate_limiter.acquire()
    
        try:
            node = await client.complete_node(node_id)
            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
  • Core implementation of complete_node in the API client. Performs POST to /nodes/{node_id}/complete, fetches updated node via GET, handles retries for rate limits, network errors, and timeouts.
    async def complete_node(self, node_id: str, max_retries: int = 10) -> WorkFlowyNode:
        """Mark a node as completed with exponential backoff retry."""
        import asyncio
    
        logger = _ClientLogger()
        retry_count = 0
        base_delay = 1.0
    
        while retry_count < max_retries:
            # Force delay at START of each iteration (rate limit protection)
            await asyncio.sleep(API_RATE_LIMIT_DELAY)
    
            try:
                response = await self.client.post(f"/nodes/{node_id}/complete")
                data = await self._handle_response(response)
                # API returns {"status": "ok"} - fetch updated node
                if isinstance(data, dict) and data.get('status') == 'ok':
                    get_response = await self.client.get(f"/nodes/{node_id}")
                    node_data = await self._handle_response(get_response)
                    return WorkFlowyNode(**node_data["node"])
                else:
                    # Fallback for unexpected format
                    return WorkFlowyNode(**data)
    
            except RateLimitError as e:
                retry_count += 1
                retry_after = getattr(e, 'retry_after', None) or (base_delay * (2 ** retry_count))
                logger.warning(
                    f"Rate limited on complete_node. Retry after {retry_after}s. "
                    f"Attempt {retry_count}/{max_retries}"
                )
                if retry_count < max_retries:
                    await asyncio.sleep(retry_after)
                else:
                    raise
    
            except NetworkError as e:
                retry_count += 1
                logger.warning(
                    f"Network error on complete_node: {e}. Retry {retry_count}/{max_retries}"
                )
                if retry_count < max_retries:
                    await asyncio.sleep(base_delay * (2 ** retry_count))
                else:
                    raise
    
            except httpx.TimeoutException as err:
                retry_count += 1
                
                logger.warning(
                    f"Timeout error: {err}. Retry {retry_count}/{max_retries}"
                )
                
                if retry_count < max_retries:
                    await asyncio.sleep(base_delay * (2 ** retry_count))
                else:
                    raise TimeoutError("complete_node") from err
    
        raise NetworkError("complete_node failed after maximum retries")
Behavior2/5

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

With no annotations provided, the description carries full burden for behavioral disclosure. While 'Mark as completed' implies a mutation operation, it doesn't specify whether this is reversible, what permissions are required, how completion affects node visibility/behavior, or what happens if applied to already completed nodes. The description lacks crucial behavioral context for a mutation tool.

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, front-loading the core action and resource with zero wasted words. Every element earns its place, making it easy to parse quickly.

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

Completeness3/5

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

Given this is a mutation tool with no annotations, 0% schema description coverage, but with an output schema present, the description is minimally adequate. The output schema likely handles return values, but the description should do more to explain the mutation's effects, prerequisites, and relationship to sibling tools for a complete understanding.

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

Parameters3/5

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

The description mentions no parameters at all. With 0% schema description coverage and 1 required parameter ('node_id'), the description fails to explain what 'node_id' represents, how to obtain it, or its format. However, the baseline is 3 since there's only one parameter, though the description adds no semantic value beyond the schema.

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 action ('Mark as completed') and resource ('a WorkFlowy node'), making the purpose immediately understandable. However, it doesn't distinguish this tool from its sibling 'workflowy_uncomplete_node' which performs the opposite operation, nor does it mention what 'completed' means in the WorkFlowy context.

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 prerequisites (e.g., needing an existing node), when not to use it (e.g., on already completed nodes), or direct alternatives like 'workflowy_uncomplete_node' for reversing this action.

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

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