Skip to content

Task creation and updates fail due to field name mismatch with Tweek API #2

@gabdorf

Description

@gabdorf

Problem

The MCP tools use different field names than the Tweek API expects, causing task creation and updates to fail or lose data.

Field Name Mismatches

MCP Field Tweek API Field
title text
description note
completed done

Additionally, the API requires certain fields that aren't being set:

  • done - Required boolean field (should default to false)
  • gcal - Required boolean field (should be false for non-Google Calendar tasks)

Affected Operations

  • createTask - Task data not properly mapped before sending to API
  • updateTask - Patch data not properly mapped before sending to API

Solution

Add mapper functions to translate between MCP field names and Tweek API field names:

  • mapCreateTaskToApi() - For task creation
  • mapTaskPatchToApi() - For task updates

Location

  • src/tweek/mappers.ts - Add new mapper functions
  • src/tweek/tweekClient.ts - Use mappers in createTask() and updateTask()

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions