Skip to main content
Glama

update_node

Modify node details like name and description in mcp-workflowy by specifying the node ID for accurate and efficient updates.

Instructions

Update an existing node

Input Schema

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

Implementation Reference

  • The handler function that implements the core logic of the 'update_node' tool. It calls `workflowyClient.updateNode` with the provided nodeId, name, description, username, and password, and returns a success or error message in MCP content format.
    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}` }] }; } }
  • Zod-based input schema defining the parameters for the 'update_node' tool: required nodeId, optional name and description.
    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") },
  • Registers all tools from toolRegistry, including 'update_node', with the FastMCP server using server.addTool.
    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 }); }); }
  • src/tools/index.ts:6-9 (registration)
    Central tool registry that spreads in workflowyTools (containing 'update_node') for use in registration.
    export const toolRegistry: Record<string, any> = { ...workflowyTools, // Add more tool categories here };
  • src/index.ts:14-14 (registration)
    Invokes tool registration upon server initialization, thereby registering 'update_node'.
    registerTools(server);

Other Tools

Related 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