Skip to main content
Glama

workflowy_list_nodes

Retrieve hierarchical nodes and tasks from WorkFlowy outlines. Specify a parent ID to list children or omit it for root-level items.

Instructions

List WorkFlowy nodes (omit parent_id for root)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
parent_idNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • MCP tool handler function for 'workflowy_list_nodes'. Accepts optional parent_id, creates NodeListRequest, handles rate limiting, calls WorkFlowyClient.list_nodes(), and returns formatted dict with nodes (serialized) and total count.
    @mcp.tool(name="workflowy_list_nodes", description="List WorkFlowy nodes (omit parent_id for root)")
    async def list_nodes(
        parent_id: str | None = None,
    ) -> dict:
        """List WorkFlowy nodes.
    
        Args:
            parent_id: ID of parent node to list children for
                       (omit or pass None to list root nodes - parameter won't be sent to API)
    
        Returns:
            Dictionary with 'nodes' list and 'total' count
        """
        client = get_client()
    
        request = NodeListRequest(  # type: ignore[call-arg]
            parentId=parent_id,
        )
    
        if _rate_limiter:
            await _rate_limiter.acquire()
    
        try:
            nodes, total = await client.list_nodes(request)
            if _rate_limiter:
                _rate_limiter.on_success()
            return {
                "nodes": [node.model_dump() for node in nodes],
                "total": total,
            }
        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 input schema model NodeListRequest used by the tool handler, defining the optional parentId parameter.
    class NodeListRequest(BaseModel):
        """Request parameters for listing nodes."""
    
        parentId: str | None = Field(None, description="Parent node ID to list children for")
  • Supporting method in WorkFlowyClient that executes the HTTP GET request to the WorkFlowy API /nodes endpoint, parses the response into WorkFlowyNode objects, and computes total count.
    async def list_nodes(self, request: NodeListRequest) -> tuple[list[WorkFlowyNode], int]:
        """List nodes with optional filtering."""
        try:
            # exclude_none=True ensures parent_id is omitted entirely for root nodes
            # (API requires absence of parameter, not null value)
            params = request.model_dump(exclude_none=True)
            response = await self.client.get("/nodes", params=params)
            response_data: list[Any] | dict[str, Any] = await self._handle_response(response)
    
            # Assuming API returns an array of nodes directly
            # (Need to verify actual response structure)
            nodes: list[WorkFlowyNode] = []
            if isinstance(response_data, dict):
                if "nodes" in response_data:
                    nodes = [WorkFlowyNode(**node_data) for node_data in response_data["nodes"]]
            elif isinstance(response_data, list):
                nodes = [WorkFlowyNode(**node_data) for node_data in response_data]
    
            total = len(nodes)  # API doesn't provide a total count
            return nodes, total
        except httpx.TimeoutException as err:
            raise TimeoutError("list_nodes") from err
        except httpx.NetworkError as e:
            raise NetworkError(f"Network error: {str(e)}") from e
Behavior2/5

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

No annotations are provided, so the description carries the full burden. It discloses that listing can be done with or without a parent_id, but fails to describe key behavioral traits: whether it returns all nodes or is paginated, what the output format is (though output schema exists), or any rate limits or permissions required. This leaves significant gaps for a tool with no annotation coverage.

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 a single, efficient sentence that front-loads the core action ('List WorkFlowy nodes') and adds necessary clarification ('omit parent_id for root'). There is zero waste, and every word earns its place, making it highly concise and well-structured.

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 the tool's low complexity (1 parameter) and the presence of an output schema (which handles return values), the description is minimally adequate. However, with no annotations and incomplete parameter guidance, it lacks details on usage context, behavioral traits, and sibling differentiation. It meets basic needs but has clear gaps in completeness.

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 input schema has 1 parameter with 0% description coverage, so the description must compensate. It adds meaning by explaining that omitting parent_id lists root nodes, which clarifies the parameter's role. However, it doesn't specify the format or constraints of parent_id (e.g., string type, valid IDs), leaving some ambiguity. Baseline is 3 as it partially compensates for low schema coverage.

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 'List' and the resource 'WorkFlowy nodes', making the purpose unambiguous. It distinguishes from siblings by focusing on listing rather than creating, updating, deleting, or managing completion states. However, it doesn't explicitly differentiate from 'workflowy_get_node' which might retrieve a single node, leaving slight ambiguity.

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 minimal guidance: it mentions omitting parent_id for root nodes, which implies usage for listing root or child nodes. However, it lacks explicit when-to-use advice, such as when to choose this over 'workflowy_get_node' for single nodes or how it relates to other list-like operations. No alternatives or exclusions are mentioned.

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