google_tasks_create_tasklist
Create a new task list in Google Tasks by specifying a title. Ideal for organizing and managing tasks within Google MCP’s integrated workflow tools.
Instructions
Create a new task list
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| title | Yes | Title of the new task list |
Input Schema (JSON Schema)
{
"properties": {
"title": {
"description": "Title of the new task list",
"type": "string"
}
},
"required": [
"title"
],
"type": "object"
}
Implementation Reference
- handlers/tasks.ts:143-156 (handler)The main handler function that validates the input arguments using isCreateTaskListArgs and calls googleTasksInstance.createTaskList(title) to create the task list, then returns the result.export async function handleTasksCreateTasklist( args: any, googleTasksInstance: GoogleTasks ) { if (!isCreateTaskListArgs(args)) { throw new Error("Invalid arguments for google_tasks_create_tasklist"); } const { title } = args; const result = await googleTasksInstance.createTaskList(title); return { content: [{ type: "text", text: result }], isError: false, }; }
- tools/tasks/index.ts:171-184 (schema)Defines the MCP tool schema including name, description, and input schema requiring a 'title' string.export const CREATE_TASKLIST_TOOL: Tool = { name: "google_tasks_create_tasklist", description: "Create a new task list", inputSchema: { type: "object", properties: { title: { type: "string", description: "Title of the new task list", }, }, required: ["title"], }, };
- server-setup.ts:253-257 (registration)Registers the tool in the MCP server's CallToolRequestSchema handler by dispatching to the specific handler function.case "google_tasks_create_tasklist": return await tasksHandlers.handleTasksCreateTasklist( args, googleTasksInstance );
- utils/helper.ts:406-410 (schema)Runtime type guard function used by the handler to validate input arguments match the expected { title: string } shape.export function isCreateTaskListArgs(args: any): args is { title: string; } { return args && typeof args.title === "string"; }