Skip to main content
Glama

create_node

Add a new node to your Workflowy outline. This tool creates a new item in your hierarchical list, enabling structured organization of tasks and ideas.

Instructions

Create a new node

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The tool definition and handler for 'create_node'. Defines the input schema (parentId, name, description), and the handler that calls workflowyClient.createNode() and returns the result.
    create_node: {
      description: "Create a new node",
      inputSchema: {
        parentId: z.string().optional().describe("ID of the parent node. If omitted, creates at root level."),
        name: z.string().describe("Name/title for the new node"),
        description: z.string().optional().describe("Description/note for the new node")
      },
      annotations: {
          title: "Create a new node in Workflowy",
          readOnlyHint: false,
          destructiveHint: false,
          idempotentHint: false,
          openWorldHint: false
      },
      handler: async ({ parentId, name, description, username, password }:
          { parentId: string | undefined, name: string, description?: string, username?: string, password?: string },
          client: typeof workflowyClient) => {
        try {
          const newNodeId = await workflowyClient.createNode(parentId, name, description, username, password);
          return {
            content: [{
              type: "text",
              text: JSON.stringify({ success: true, nodeId: newNodeId, name, parentId: parentId || "root" })
            }]
          };
        } catch (error: any) {
          return {
            content: [{
              type: "text",
              text: `Error creating node: ${error.message}`
            }]
          };
        }
      }
    },
  • Input schema for create_node: parentId (optional string), name (required string), description (optional string).
    inputSchema: {
      parentId: z.string().optional().describe("ID of the parent node. If omitted, creates at root level."),
      name: z.string().describe("Name/title for the new node"),
      description: z.string().optional().describe("Description/note for the new node")
    },
  • The central tool registry (toolRegistry) includes workflowyTools. The registerTools() function iterates over the registry and registers each tool (including create_node) with the FastMCP server.
    export const toolRegistry: Record<string, any> = {
      ...workflowyTools,
      // Add more tool categories here
    };
    
    // Helper to register tools with MCP server
    export function registerTools(server: FastMCP): void {
      Object.entries(toolRegistry).forEach(([name, tool]) => {
        server.addTool({
          name,
          description: tool.description,
          parameters: z.object(tool.inputSchema),
          annotations: tool.annotations,
          execute: tool.handler
          });
      });
    }
  • The WorkflowyClient.createNode() method. Authenticates, gets the document, finds the parent node (or uses root), creates a child item, sets its name and optional note, saves, and returns the new node ID.
    /**
     * Create a new node at a specific location
     */
    async createNode(parentId: string | undefined, name: string, description?: string, username?: string, password?: string) {
        const { wf } = await this.createAuthenticatedClient(username, password);
        const doc = await wf.getDocument();
    
        let parent;
        if (parentId) {
            parent = this.findNodeById(doc.root, parentId);
            if (!parent) {
                throw new Error(`Parent node with ID ${parentId} not found.`);
            }
        } else {
            parent = doc.root;
        }
    
        const newNode = await parent.createItem();
        newNode.setName(name);
        if (description) {
            newNode.setNote(description);
        }
        // Always save - isDirty() may not detect all changes
        await doc.save();
        return newNode.id;
    }
Behavior3/5

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

Annotations already indicate this is a non-read-only, non-destructive operation. The description adds no extra behavioral context beyond the verb 'create', which is consistent but minimal.

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 a single, concise sentence. It wastes no words, though it may be slightly too terse for a creation tool without additional context.

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 no output schema and no parameters, the description fails to explain what kind of node is created, its default properties, or how the result is communicated. This is insufficient for a mutation tool.

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

Parameters4/5

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

With zero parameters, schema coverage is 100%. The description adds no parameter details, but the baseline for zero parameters is 4 as per guidelines.

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 'Create a new node' clearly states the action and resource, distinguishing it from siblings like list_nodes or search_nodes. However, it lacks context such as where the node is created (e.g., current document).

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?

No guidance on when to use this tool instead of siblings like update_node or toggle_complete. The description does not mention prerequisites or alternatives.

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

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