Skip to main content
Glama
mstfe

Google Tasks MCP Server

by mstfe

create_task

Add new tasks to Google Tasks with titles and optional notes to organize your to-do list.

Instructions

Create a new task in Google Tasks

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
titleYesTitle of the task
notesNoNotes for the task

Implementation Reference

  • Handler for the 'create_task' tool in the CallToolRequestSchema. Validates input with isValidCreateTaskArgs and inserts a new task into Google Tasks using the API.
    if (request.params.name === "create_task") {
      if (!isValidCreateTaskArgs(request.params.arguments)) {
        throw new McpError(
          ErrorCode.InvalidParams,
          "Invalid arguments for creating a task. 'title' must be a string, and 'notes' must be a string or undefined."
        );
      }
      const args = request.params.arguments;
    
      try {
        const response = await tasks.tasks.insert({
          tasklist: "@default",
          requestBody: {
            title: args.title,
            notes: args.notes,
          },
        });
    
        return {
          content: [
            {
              type: "text",
              text: JSON.stringify(response.data, null, 2),
            },
          ],
        };
      } catch (error) {
        throw new McpError(
          ErrorCode.InternalError,
          `Tasks API error: ${error}`
        );
      }
    }
  • src/index.ts:142-153 (registration)
    Registration of the 'create_task' tool within the ListToolsRequestSchema handler, including name, description, and JSON input schema.
    {
      name: "create_task",
      description: "Create a new task in Google Tasks",
      inputSchema: {
        type: "object",
        properties: {
          title: { type: "string", description: "Title of the task" },
          notes: { type: "string", description: "Notes for the task" },
        },
        required: ["title"],
      },
    },
  • TypeScript interface defining the structure of CreateTaskArgs for type safety.
    interface CreateTaskArgs {
      title: string;
      notes?: string;
      taskId?: string;
      status?: string;
    }
  • Type guard helper function to validate if arguments match CreateTaskArgs interface, used in the handler.
    export function isValidCreateTaskArgs(args: any): args is CreateTaskArgs {
      return (
        typeof args === "object" &&
        args !== null &&
        (args.title === undefined || typeof args.title === "string") &&
        (args.notes === undefined || typeof args.notes === "string") &&
        (args.taskId === undefined || typeof args.taskId === "string") &&
        (args.status === undefined || typeof args.status === "string")
      );
    }
Behavior2/5

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

With no annotations provided, the description carries full burden for behavioral disclosure. While 'Create' implies a write/mutation operation, the description doesn't address permission requirements, whether the operation is idempotent, what happens on failure, or any rate limits. It provides minimal behavioral context beyond the basic action.

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 that states the core purpose without any wasted words. It's appropriately sized for a simple creation tool and gets straight to the point.

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

Completeness3/5

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

For a creation tool with no annotations and no output schema, the description provides basic purpose but lacks important context about behavioral traits, error handling, and relationship to sibling tools. It's minimally adequate but has clear gaps in completeness given the mutation nature of the operation.

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%, with both parameters ('title' and 'notes') fully documented in the schema. The description adds no additional parameter information beyond what the schema already provides, so the baseline score of 3 is appropriate when 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 a new task') and the target resource ('in Google Tasks'), providing a specific verb+resource combination. However, it doesn't explicitly differentiate from sibling tools like 'complete_task' or 'delete_task' beyond the obvious action difference.

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?

No guidance is provided about when to use this tool versus alternatives. The description doesn't mention prerequisites, when not to use it, or how it relates to sibling tools like 'list_tasks' for viewing existing tasks before creating new ones.

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

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