Skip to main content
Glama

update_node

DestructiveIdempotent

Update an existing Workflowy node by specifying its ID to modify its title or description.

Instructions

Update an existing node

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nodeIdYesID of the node to update
nameNoNew name/title for the node
descriptionNoNew description/note for the node

Implementation Reference

  • The tool handler definition for 'update_node'. It defines the inputSchema (nodeId required, name and description optional), annotations, and the handler function that calls workflowyClient.updateNode().
    update_node: {
      description: "Update an existing node",
      inputSchema: {
        nodeId: z.string().describe("ID of the node to update"),
        name: z.string().optional().describe("New name/title for the node"),
        description: z.string().optional().describe("New description/note for the node")
      },
      annotations: {
          title: "Search nodes in Workflowy",
          readOnlyHint: false,
          destructiveHint: true,
          idempotentHint: true,
          openWorldHint: false
      },
      handler: async ({ nodeId, name, description, username, password }:
          { nodeId: string, name?: string, description?: string, username?: string, password?: string },
          client: typeof workflowyClient) => {
        try {
          await workflowyClient.updateNode(nodeId, name, description, username, password);
          return {
            content: [{
              type: "text",
              text: `Successfully updated node ${nodeId}`
            }]
          };
        } catch (error: any) {
          return {
            content: [{
              type: "text",
              text: `Error updating node: ${error.message}`
            }]
          };
        }
      }
    },
  • Input schema for update_node: requires nodeId (string), optional name (string), optional description (string).
    inputSchema: {
      nodeId: z.string().describe("ID of the node to update"),
      name: z.string().optional().describe("New name/title for the node"),
      description: z.string().optional().describe("New description/note for the node")
    },
  • The WorkflowyClient.updateNode() method implementation. Finds the node by ID using findNodeById, sets name/description if provided, and saves the document if dirty.
    async updateNode(nodeId: string, name?: string, description?: string, username?: string, password?: string) {
        const { wf } = await this.createAuthenticatedClient(username, password);
        const doc = await wf.getDocument();
        const node = this.findNodeById(doc.root, nodeId);
        if (!node) {
            throw new Error(`Node with ID ${nodeId} not found.`);
        }
    
        if (name !== undefined) {
            node.setName(name);
        }
        if (description !== undefined) {
            node.setNote(description);
        }
        if (doc.isDirty()) {
            // Saves the changes if there are any
            await doc.save();
        }
    }
  • src/tools/index.ts:6-9 (registration)
    The toolRegistry object that spreads workflowyTools (including update_node) to register all tools.
    export const toolRegistry: Record<string, any> = {
      ...workflowyTools,
      // Add more tool categories here
    };
  • The registerTools function that iterates over the registry and calls server.addTool() for each tool (including update_node).
    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
          });
      });
    }
Behavior3/5

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

Annotations indicate mutation (destructiveHint=true) and idempotency (idempotentHint=true). Description does not add beyond this, missing details like partial update behavior or response structure.

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?

One sentence, direct, no fluff. Could be slightly enriched without losing conciseness.

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?

Adequate for a simple update tool, but lacks mention of return value or side effects (e.g., what happens if node not found). No output schema to fill the gap.

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?

Schema description coverage is 100%, so description adds no value beyond what schema already provides. Baseline score 3.

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

Purpose5/5

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

Clearly states 'Update an existing node' – verb+resource, distinct from siblings (create, list, search, toggle).

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 vs alternatives (e.g., create_node for new nodes, toggle_complete for status). Lacks context for selection.

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