Skip to main content
Glama

complete_node

Mark a node as completed in Resurgo-MCP to track progress and manage knowledge capture workflows.

Instructions

Mark a node as done

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
stateYes

Implementation Reference

  • src/nodes.ts:169-199 (registration)
    Registers the MCP tool 'complete_node' including input schema (nodeId: uuid), description, and handler function that calls apiClient.completeNode and formats the response.
    server.tool(
      'complete_node',
      'Mark a node as done',
      {
        state: z.object({
          nodeId: z
            .string()
            .uuid()
            .describe('The ID of the node to mark as done'),
        }),
      },
      async ({ state }) => {
        const result = await apiClient.completeNode(state);
    
        if (result.error) {
          return {
            content: [{ type: 'text', text: result.error }],
            isError: true,
          };
        }
    
        return {
          content: [
            {
              type: 'text',
              text: JSON.stringify(result.data, null, 2),
            },
          ],
        };
      },
    );
  • Handler function for 'complete_node' tool: invokes apiClient.completeNode with state, handles error or success by returning text content.
    async ({ state }) => {
      const result = await apiClient.completeNode(state);
    
      if (result.error) {
        return {
          content: [{ type: 'text', text: result.error }],
          isError: true,
        };
      }
    
      return {
        content: [
          {
            type: 'text',
            text: JSON.stringify(result.data, null, 2),
          },
        ],
      };
    },
  • Zod input schema for the tool: requires nodeId as UUID string.
    state: z.object({
      nodeId: z
        .string()
        .uuid()
        .describe('The ID of the node to mark as done'),
    }),
  • API client helper method: sends POST request to backend /mcp/complete-node endpoint with nodeId.
    async completeNode(params: {
      nodeId: string;
    }): Promise<ApiResponse<any>> {
      return this.request('/mcp/complete-node', {
        method: 'POST',
        body: JSON.stringify(params),
      });
    }

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/code-atlantic/Resurgo-MCP'

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