Skip to main content
Glama

google_tasks_set_default_list

Set a specific task list as the default for operations in Google MCP, streamlining task management and ensuring consistent execution across workflows.

Instructions

Set the default task list ID for operations

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
taskListIdYesThe ID of the task list to set as default

Implementation Reference

  • The handler function that validates the input arguments and invokes the GoogleTasks.setDefaultTaskList method to set the default task list ID, returning a formatted response.
    export async function handleTasksSetDefaultList( args: any, googleTasksInstance: GoogleTasks ) { if (!isSetDefaultTaskListArgs(args)) { throw new Error("Invalid arguments for google_tasks_set_default_list"); } const { taskListId } = args; const result = googleTasksInstance.setDefaultTaskList(taskListId); return { content: [{ type: "text", text: result }], isError: false, }; }
  • The Tool schema definition specifying the name, description, and input schema for the google_tasks_set_default_list tool.
    import { type Tool } from "@modelcontextprotocol/sdk/types.js"; export const SET_DEFAULT_TASKLIST_TOOL: Tool = { name: "google_tasks_set_default_list", description: "Set the default task list ID for operations", inputSchema: { type: "object", properties: { taskListId: { type: "string", description: "The ID of the task list to set as default", }, }, required: ["taskListId"], }, };
  • The switch case in the main tool request handler that registers and routes calls to the specific tasks handler.
    case "google_tasks_set_default_list": return await tasksHandlers.handleTasksSetDefaultList( args, googleTasksInstance );
  • The core utility method in the GoogleTasks class that updates the default task list ID and returns a confirmation message.
    setDefaultTaskList(taskListId: string) { this.defaultTaskList = taskListId; return `Default task list ID set to: ${taskListId}`; }
  • Type guard helper function that validates the input arguments match the expected shape for the tool.
    export function isSetDefaultTaskListArgs(args: any): args is { taskListId: string; } { return args && typeof args.taskListId === "string"; }

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