Skip to main content
Glama

update-status

Update the progress status of research sections like projectInfo or technicalFundamentals to planned, in_progress, or completed.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sectionYesSection name to update (e.g., 'projectInfo', 'technicalFundamentals')
statusYesNew status for the section

Implementation Reference

  • Registration of the 'update-status' tool, including input schema and inline handler function that updates the status of a research plan section in storage.
    server.tool(
      "update-status",
      {
        section: z
          .string()
          .describe(
            "Section name to update (e.g., 'projectInfo', 'technicalFundamentals')"
          ),
        status: z
          .enum(["planned", "in_progress", "completed"])
          .describe("New status for the section"),
      },
      async ({
        section,
        status,
      }: {
        section: string;
        status: "planned" | "in_progress" | "completed";
      }) => {
        try {
          const researchPlan = storage.getSection("researchPlan");
          if (!researchPlan || !researchPlan[section]) {
            return {
              isError: true,
              content: [
                {
                  type: "text",
                  text: `Section '${section}' not found in research plan`,
                },
              ],
            };
          }
    
          const updatedSection = {
            ...researchPlan[section],
            status,
          };
    
          const updatedPlan = {
            ...researchPlan,
            [section]: updatedSection,
          };
    
          storage.updateSection("researchPlan", updatedPlan);
          storage.addLogEntry(`Updated status of ${section} to ${status}`);
    
          return {
            content: [
              {
                type: "text",
                text: `Updated status of '${section}' to '${status}'`,
              },
            ],
          };
        } catch (error) {
          return {
            isError: true,
            content: [
              {
                type: "text",
                text: `Error updating status: ${error}`,
              },
            ],
          };
        }
      }
    );
  • The handler function for 'update-status' tool. It retrieves the research plan from storage, updates the specified section's status, saves the updated plan back to storage, logs the change, and returns a success message or error.
    async ({
      section,
      status,
    }: {
      section: string;
      status: "planned" | "in_progress" | "completed";
    }) => {
      try {
        const researchPlan = storage.getSection("researchPlan");
        if (!researchPlan || !researchPlan[section]) {
          return {
            isError: true,
            content: [
              {
                type: "text",
                text: `Section '${section}' not found in research plan`,
              },
            ],
          };
        }
    
        const updatedSection = {
          ...researchPlan[section],
          status,
        };
    
        const updatedPlan = {
          ...researchPlan,
          [section]: updatedSection,
        };
    
        storage.updateSection("researchPlan", updatedPlan);
        storage.addLogEntry(`Updated status of ${section} to ${status}`);
    
        return {
          content: [
            {
              type: "text",
              text: `Updated status of '${section}' to '${status}'`,
            },
          ],
        };
      } catch (error) {
        return {
          isError: true,
          content: [
            {
              type: "text",
              text: `Error updating status: ${error}`,
            },
          ],
        };
      }
    }
  • Zod schema defining the input parameters for the 'update-status' tool: 'section' (string) and 'status' (enum: planned, in_progress, completed).
    {
      section: z
        .string()
        .describe(
          "Section name to update (e.g., 'projectInfo', 'technicalFundamentals')"
        ),
      status: z
        .enum(["planned", "in_progress", "completed"])
        .describe("New status for the section"),
    },
  • Intermediate registration function that calls registerResearchTools, which includes the 'update-status' tool registration.
    export function registerAllTools(
      server: McpServer,
      storage: ResearchStorage
    ): void {
      registerResearchTools(server, storage);
    }
  • src/server.ts:187-187 (registration)
    Final call to register all tools, including 'update-status', on the MCP server instance.
    registerAllTools(server, storage);

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/aaronjmars/web3-research-mcp'

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