Skip to main content
Glama

update_todo

Modify the title of an existing todo item by specifying its unique identifier and the new title text.

Instructions

Update the title of an existing todo item.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
todo_idYesUUID of the todo item
titleYesNew title for the todo item

Implementation Reference

  • The update_todo tool is registered and implemented directly in src/index.ts, taking todo_id and title as arguments and calling the backend via makeRequest.
    mcp.tool(
      "update_todo",
      "Update the title of an existing todo item.",
      {
        todo_id: z.string().describe("UUID of the todo item"),
        title: z.string().describe("New title for the todo item"),
      },
      async ({ todo_id, title }) => {
        try {
          const todo = await makeRequest<Todo>(
            "PUT",
            `/api/todos/${todo_id}`,
            { title }
          );
          return {
            content: [{ type: "text", text: `Updated todo: ${formatTodo(todo)}` }],
          };
        } catch (e: unknown) {
          if ((e as NodeJS.ErrnoException).code === "404")
            return { content: [{ type: "text", text: "Todo not found." }] };
          throw e;
        }
      }
    );

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/bba432288-beep/mcp-server-todo'

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