Skip to main content
Glama
robertn702

Sunsama MCP Server

update-task-notes

Modify task notes content in Sunsama to update descriptions, add details, or revise information for better task management and clarity.

Instructions

Update the notes content for a task

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The core handler implementation for the 'update-task-notes' tool. Handles input validation (via schema), constructs notes content from HTML or Markdown, calls the Sunsama client API to update notes, and returns a formatted JSON response.
    export const updateTaskNotesTool = withTransportClient({
      name: "update-task-notes",
      description: "Update the notes content for a task",
      parameters: updateTaskNotesSchema,
      execute: async (
        { taskId, html, markdown, limitResponsePayload }: UpdateTaskNotesInput,
        context: ToolContext,
      ) => {
        const content = html
          ? { type: "html" as const, value: html }
          : { type: "markdown" as const, value: markdown! };
    
        const options: { limitResponsePayload?: boolean } = {};
        if (limitResponsePayload !== undefined) {
          options.limitResponsePayload = limitResponsePayload;
        }
    
        const apiContent = content.type === "html"
          ? { html: content.value }
          : { markdown: content.value };
        const result = await context.client.updateTaskNotes(
          taskId,
          apiContent,
          options,
        );
    
        return formatJsonResponse({
          success: result.success,
          taskId,
          notesUpdated: true,
          updatedFields: result.updatedFields,
        });
      },
    });
  • Zod schema for input validation of the update-task-notes tool, ensuring taskId is provided and exactly one of html or markdown is specified.
    export const updateTaskNotesSchema = z.object({
      taskId: z.string().min(1, "Task ID is required").describe(
        "The ID of the task to update notes for",
      ),
      html: z.string().optional().describe(
        "HTML content for the task notes (mutually exclusive with markdown)",
      ),
      markdown: z.string().optional().describe(
        "Markdown content for the task notes (mutually exclusive with html)",
      ),
      limitResponsePayload: z.boolean().optional().describe(
        "Whether to limit the response payload size (defaults to true)",
      ),
    }).refine(
      (data) => {
        // Exactly one of html or markdown must be provided
        const hasHtml = data.html !== undefined;
        const hasMarkdown = data.markdown !== undefined;
        return hasHtml !== hasMarkdown; // XOR: exactly one must be true
      },
      {
        message: "Exactly one of 'html' or 'markdown' must be provided",
        path: [], // This will show the error at the root level
      },
    );
  • src/tools/index.ts:1-9 (registration)
    Top-level registration exporting allTools array which spreads taskTools containing the update-task-notes tool.
    import { userTools } from "./user-tools.js";
    import { taskTools } from "./task-tools.js";
    import { streamTools } from "./stream-tools.js";
    
    export const allTools = [
      ...userTools,
      ...taskTools,
      ...streamTools,
    ];
  • Registration of updateTaskNotesTool within the taskTools array exported from task-tools.ts.
    export const taskTools = [
      // Query tools
      getTasksBacklogTool,
      getTasksByDayTool,
      getArchivedTasksTool,
      getTaskByIdTool,
    
      // Lifecycle tools
      createTaskTool,
      deleteTaskTool,
    
      // Update tools
      updateTaskCompleteTool,
      updateTaskSnoozeDateTool,
      updateTaskBacklogTool,
      updateTaskPlannedTimeTool,
      updateTaskNotesTool,
      updateTaskDueDateTool,
      updateTaskTextTool,
      updateTaskStreamTool,
    ];
Behavior2/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. It states 'Update' which implies a mutation, but it does not disclose behavioral traits like required permissions, whether changes are reversible, rate limits, or what the response looks like. This is a significant gap for a mutation tool with zero annotation coverage.

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 is 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 that this is a mutation tool with no annotations and no output schema, the description is incomplete. It does not explain what 'notes content' entails, how the update is performed, or what the result is, leaving gaps in understanding for an AI agent.

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

Parameters4/5

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

The input schema has 0 parameters with 100% coverage, so no parameters are documented. The description adds no parameter information, but since there are no parameters, the baseline is 4 as it does not need to compensate for missing schema details.

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 verb ('Update') and resource ('notes content for a task'), making the purpose understandable. However, it does not differentiate from sibling tools like 'update-task-text' or 'update-task-backlog', which also update task attributes, so it lacks specific sibling distinction.

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 such as 'update-task-text' or other update-task-* siblings. It lacks context on prerequisites, exclusions, or specific scenarios for updating notes versus other task fields.

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/robertn702/mcp-sunsama'

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