Skip to main content
Glama

google_tasks_create_task

Create and manage tasks within Google Tasks by specifying a title, notes, due date, and task list. Integrates with Google MCP for AI-driven task management workflows.

Instructions

Create a new task

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
dueNoDue date in RFC 3339 format (e.g., '2025-04-02T10:00:00.000Z')
notesNoNotes or description for the task
taskListIdNoID of the task list to create the task in (uses default if not specified)
titleYesTitle of the task

Implementation Reference

  • Handler function that validates input arguments and delegates to GoogleTasks.createTask to create a new task.
    export async function handleTasksCreateTask(
      args: any,
      googleTasksInstance: GoogleTasks
    ) {
      if (!isCreateTaskArgs(args)) {
        throw new Error("Invalid arguments for google_tasks_create_task");
      }
      const { title, notes, due, taskListId } = args;
      const result = await googleTasksInstance.createTask(
        title,
        notes,
        due,
        taskListId
      );
      return {
        content: [{ type: "text", text: result }],
        isError: false,
      };
    }
  • Implements the task creation using Google Tasks API v1, inserting a new task into the specified tasklist.
    async createTask(
      title: string,
      notes?: string,
      due?: string,
      taskListId?: string
    ) {
      try {
        const targetTaskList = taskListId || this.defaultTaskList;
    
        // Prepare task data
        const taskData: any = {
          title: title,
        };
    
        if (notes) taskData.notes = notes;
        if (due) taskData.due = due;
    
        const response = await this.tasks.tasks.insert({
          tasklist: targetTaskList,
          requestBody: taskData,
        });
    
        return `Task created: "${response.data.title}" with ID: ${response.data.id}`;
      } catch (error) {
        throw new Error(
          `Failed to create task: ${
            error instanceof Error ? error.message : String(error)
          }`
        );
      }
    }
  • MCP Tool definition including name, description, and input schema for creating a task.
    export const CREATE_TASK_TOOL: Tool = {
      name: "google_tasks_create_task",
      description: "Create a new task",
      inputSchema: {
        type: "object",
        properties: {
          title: {
            type: "string",
            description: "Title of the task",
          },
          notes: {
            type: "string",
            description: "Notes or description for the task",
          },
          due: {
            type: "string",
            description:
              "Due date in RFC 3339 format (e.g., '2025-04-02T10:00:00.000Z')",
          },
          taskListId: {
            type: "string",
            description:
              "ID of the task list to create the task in (uses default if not specified)",
          },
        },
        required: ["title"],
      },
    };
  • Dispatches tool calls named 'google_tasks_create_task' to the corresponding handler function.
    case "google_tasks_create_task":
      return await tasksHandlers.handleTasksCreateTask(
        args,
        googleTasksInstance
      );
  • Type guard function used in the handler to validate input arguments against the expected schema.
    export function isCreateTaskArgs(args: any): args is {
      title: string;
      notes?: string;
      due?: string;
      taskListId?: string;
    } {
      return (
        args &&
        typeof args.title === "string" &&
        (args.notes === undefined || typeof args.notes === "string") &&
        (args.due === undefined || typeof args.due === "string") &&
        (args.taskListId === undefined || typeof args.taskListId === "string")
      );
    }
Behavior1/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. 'Create a new task' implies a write operation but doesn't disclose any behavioral traits: it doesn't mention authentication requirements, rate limits, what happens if the task list doesn't exist, whether the creation is idempotent, or what the response looks like. For a mutation tool with zero annotation coverage, this is a significant gap.

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 extremely concise at just three words, with zero wasted language. It's front-loaded with the core action ('Create'), though this brevity comes at the cost of completeness. Every word earns its place by stating the basic operation, but it's arguably too minimal.

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 the complexity of a mutation tool with no annotations and no output schema, the description is incomplete. It doesn't explain what a 'task' is in Google Tasks context, doesn't mention required parameters (title is required per schema), and provides no information about return values or error conditions. For a tool that creates resources, more context is needed.

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 input schema already documents all four parameters (due, notes, taskListId, title) with clear descriptions. The description adds no additional meaning beyond what the schema provides, such as explaining parameter interactions or constraints. With high schema coverage, the baseline score of 3 is appropriate.

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

Purpose2/5

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

The description 'Create a new task' is a tautology that merely restates the tool name without adding specificity. It doesn't distinguish this tool from sibling tools like 'google_tasks_create_tasklist' or clarify what resource it creates (a task in Google Tasks). While the verb 'create' is clear, the description lacks any detail about what a 'task' entails in this context.

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

Usage Guidelines1/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. It doesn't mention sibling tools like 'google_tasks_update_task' for modifications, 'google_tasks_complete_task' for marking tasks as done, or 'google_tasks_create_tasklist' for creating task lists instead of tasks. There's no context about prerequisites, such as needing a task list ID or default list setup.

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

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/vakharwalad23/google-mcp'

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