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()
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
titletextdescriptionnotecompleteddoneAdditionally, the API requires certain fields that aren't being set:
done- Required boolean field (should default tofalse)gcal- Required boolean field (should befalsefor non-Google Calendar tasks)Affected Operations
createTask- Task data not properly mapped before sending to APIupdateTask- Patch data not properly mapped before sending to APISolution
Add mapper functions to translate between MCP field names and Tweek API field names:
mapCreateTaskToApi()- For task creationmapTaskPatchToApi()- For task updatesLocation
src/tweek/mappers.ts- Add new mapper functionssrc/tweek/tweekClient.ts- Use mappers increateTask()andupdateTask()