Skip to main content
Glama
arpitbatra123

Google Tasks MCP Server

create-task

Add a new task to Google Tasks with title, notes, and due date through Claude's interface.

Instructions

Create a new task in a task list

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
tasklistYesTask list ID
titleYesTitle of the task
notesNoNotes for the task
dueNoDue date in RFC 3339 format (e.g., 2025-03-19T12:00:00Z)

Implementation Reference

  • The asynchronous handler function that implements the 'create-task' tool logic. It checks authentication, constructs the task request body, inserts the task via the Google Tasks API, and handles success/error responses.
    async ({ tasklist, title, notes, due }) => {
      if (!isAuthenticated()) {
        return {
          isError: true,
          content: [
            {
              type: "text",
              text: "Not authenticated. Please use the 'authenticate' tool first.",
            },
          ],
        };
      }
    
      try {
        const requestBody: any = {
          title,
          status: "needsAction",
        };
    
        if (notes) requestBody.notes = notes;
        if (due) requestBody.due = due;
    
        const response = await tasks.tasks.insert({
          tasklist,
          requestBody,
        });
    
        return {
          content: [
            {
              type: "text",
              text: `Task created successfully:\n\n${JSON.stringify(
                response.data,
                null,
                2
              )}`,
            },
          ],
        };
      } catch (error) {
        console.error("Error creating task:", error);
        return {
          isError: true,
          content: [
            {
              type: "text",
              text: `Error creating task: ${error}`,
            },
          ],
        };
      }
    }
  • Zod schema defining the input parameters for the 'create-task' tool: tasklist (required string), title (required string), notes (optional string), due (optional string in RFC 3339 format).
    {
      tasklist: z.string().describe("Task list ID"),
      title: z.string().describe("Title of the task"),
      notes: z.string().optional().describe("Notes for the task"),
      due: z
        .string()
        .optional()
        .describe("Due date in RFC 3339 format (e.g., 2025-03-19T12:00:00Z)"),
    },
  • src/index.ts:592-656 (registration)
    The server.tool() call that registers the 'create-task' tool with its name, description, input schema, and handler function.
    server.tool(
      "create-task",
      "Create a new task in a task list",
      {
        tasklist: z.string().describe("Task list ID"),
        title: z.string().describe("Title of the task"),
        notes: z.string().optional().describe("Notes for the task"),
        due: z
          .string()
          .optional()
          .describe("Due date in RFC 3339 format (e.g., 2025-03-19T12:00:00Z)"),
      },
      async ({ tasklist, title, notes, due }) => {
        if (!isAuthenticated()) {
          return {
            isError: true,
            content: [
              {
                type: "text",
                text: "Not authenticated. Please use the 'authenticate' tool first.",
              },
            ],
          };
        }
    
        try {
          const requestBody: any = {
            title,
            status: "needsAction",
          };
    
          if (notes) requestBody.notes = notes;
          if (due) requestBody.due = due;
    
          const response = await tasks.tasks.insert({
            tasklist,
            requestBody,
          });
    
          return {
            content: [
              {
                type: "text",
                text: `Task created successfully:\n\n${JSON.stringify(
                  response.data,
                  null,
                  2
                )}`,
              },
            ],
          };
        } catch (error) {
          console.error("Error creating task:", error);
          return {
            isError: true,
            content: [
              {
                type: "text",
                text: `Error creating task: ${error}`,
              },
            ],
          };
        }
      }
    );
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries full burden. It states it creates a task but doesn't disclose behavioral traits like required permissions, whether it's idempotent, error handling, or what happens on success (e.g., returns a task ID). This leaves significant gaps for a mutation tool.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence with no wasted words. It's appropriately sized and front-loaded, clearly stating the tool's purpose without unnecessary elaboration.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given this is a mutation tool with no annotations and no output schema, the description is incomplete. It doesn't cover behavioral aspects like permissions, side effects, or return values, which are crucial for safe and effective use in a task management context.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema fully documents all 4 parameters. The description adds no additional meaning beyond the schema, such as explaining parameter interactions or constraints, but the baseline is 3 since the schema does the heavy lifting.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('Create') and resource ('new task in a task list'), which is specific and unambiguous. However, it doesn't differentiate from siblings like 'update-task' or 'complete-task' in terms of when to choose creation over modification, keeping it from a perfect score.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives like 'update-task' or 'complete-task', nor does it mention prerequisites such as authentication or task list existence. It lacks any context for selection among sibling tools.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other 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/arpitbatra123/mcp-googletasks'

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