Skip to main content
Glama

toggle_complete

Mark or unmark a node as complete by toggling its status in the mcp-workflowy system. Specify the node ID and the desired completion state.

Instructions

Toggle completion status of a node

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
completedYesWhether the node should be marked as complete (true) or incomplete (false)
nodeIdYesID of the node to toggle completion status

Implementation Reference

  • The MCP tool handler for 'toggle_complete' that calls the Workflowy client to toggle the completion status of a node.
    handler: async ({ nodeId, completed, username, password }: { nodeId: string, completed: boolean, username?: string, password?: string }, client: typeof workflowyClient) => { try { await workflowyClient.toggleComplete(nodeId, completed, username, password); return { content: [{ type: "text", text: `Successfully ${completed ? "completed" : "uncompleted"} node ${nodeId}` }] }; } catch (error: any) { return { content: [{ type: "text", text: `Error toggling completion status: ${error.message}` }] }; } }
  • Zod schema defining the input parameters for the toggle_complete tool: nodeId (string) and completed (boolean).
    inputSchema: { nodeId: z.string().describe("ID of the node to toggle completion status"), completed: z.boolean().describe("Whether the node should be marked as complete (true) or incomplete (false)") },
  • Function that registers all tools from toolRegistry (including toggle_complete) to the FastMCP 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 }); }); }
  • src/tools/index.ts:6-9 (registration)
    Central tool registry that includes toggle_complete from workflowyTools via spread operator.
    export const toolRegistry: Record<string, any> = { ...workflowyTools, // Add more tool categories here };
  • src/index.ts:14-14 (registration)
    Invocation of registerTools to add toggle_complete tool to the MCP server.
    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