Skip to content

Operations Reference

The bridge exposes 16 operations for controlling Super Productivity. These are the stable contract — transport-specific names (MCP tools, CLI subcommands) are adapter details.

Verified against Super Productivity 18.8.0 (commit 24725c9).

Call Shape

text
operation: "task.create"
payload:   { "title": "Review budget", "projectId": "p1" }

Result Shape

json
{
  "ok": true,
  "data": { ... }
}

Error Shape

json
{
  "ok": false,
  "error": {
    "code": "TASK_NOT_FOUND",
    "message": "Resource not found.",
    "details": { "status_code": 404 }
  }
}

Operations

OperationDescriptionRequired Payload
task.listList tasks (with optional filters)
task.getGet a task by IDid
task.createCreate a new tasktitle
task.updateUpdate fields on an existing taskid
task.completeMark a task as doneid
task.uncompleteMark a task as not doneid
task.startStart time tracking for a taskid
task.stop_currentStop the currently tracked task
task.get_currentGet the currently tracked task
task.set_currentSet or clear the current tasktaskId
task.archiveArchive a taskid
task.restoreRestore an archived taskid
project.listList all projects (with query)
tag.listList all tags (with query)
status.getGet SP status summary
bridge.healthCheck SP connectivity and status

Local REST Mapping

OperationHTTP MethodEndpoint
task.listGET/tasks
task.getGET/tasks/:id
task.createPOST/tasks
task.updatePATCH/tasks/:id
task.completePATCH/tasks/:id ({"isDone": true})
task.uncompletePATCH/tasks/:id ({"isDone": false})
task.startPOST/tasks/:id/start
task.stop_currentPOST/task-control/stop
task.get_currentGET/task-control/current
task.set_currentPOST/task-control/current
task.archivePOST/tasks/:id/archive
task.restorePOST/tasks/:id/restore
project.listGET/projects
tag.listGET/tags
status.getGET/status
bridge.healthGET/health + /status

Error Codes

CodeMeaning
SP_UNAVAILABLECannot connect to SP (connection refused, DNS error)
TIMEOUTRequest to SP timed out
UNKNOWN_OPERATIONOperation name not recognized
UNSUPPORTED_OPERATIONOperation recognized but not available
INVALID_INPUTPayload validation failed
TASK_NOT_FOUNDRequested task does not exist (HTTP 404)
PROJECT_NOT_FOUNDRequested project does not exist
SP_ERRORSP returned an error response
INTERNAL_ERRORUnexpected bridge failure

MCP Tool Names

The MCP adapter maps snake_case tool names to core operations:

MCP ToolCore Operation
healthbridge.health
get_statusstatus.get
list_taskstask.list
get_tasktask.get
create_tasktask.create
update_tasktask.update
complete_tasktask.complete
uncomplete_tasktask.uncomplete
start_tasktask.start
stop_current_tasktask.stop_current
get_current_tasktask.get_current
set_current_tasktask.set_current
archive_tasktask.archive
restore_tasktask.restore
list_projectsproject.list
list_tagstag.list

Payload Fields

Use Super Productivity's native camelCase field names at all REST boundaries.

task.create fields

FieldTypeRequiredNotes
titlestringyesNon-empty
projectIdstring | nullnoProject to assign
tagIdsstring[]noTag IDs to assign
notesstringnoTask notes
parentIdstringnoParent task ID (subtask). Create-only. Cannot be combined with projectId or tagIds (subtasks inherit from parent)
plannedAtstring | int | nullnoPlanned date/time (ISO string or Unix ms timestamp)
dueDaystring | nullnoDue date (YYYY-MM-DD format)
dueWithTimeint | nullnoDue date+time as Unix millisecond timestamp
isDonebooleannoCompletion status
timeEstimateintnoEstimated time in milliseconds (≥ 0)
timeSpentintnoTime spent in milliseconds (≥ 0). Absolute replacement, not additive

task.update fields

Same as task.create except:

  • id is required (identifies the task to update)
  • parentId is not allowed (upstream rejects it on PATCH)
  • At least one field besides id must be provided

task.list filters

All optional query parameters passed as payload fields:

FieldTypeNotes
querystringSearch tasks by title substring
projectIdstringFilter by project ID
tagIdstringFilter by tag ID
includeDonebooleanInclude completed tasks (default: false)
sourcestring"active" (default), "archived", or "all"

project.list / tag.list filters

FieldTypeNotes
querystringFilter by name substring

task.set_current payload

FieldTypeNotes
taskIdstring | nullRequired. Task ID to set as current, or null to clear.

No-payload operations

task.get_current, task.stop_current, status.get, bridge.health take no payload.

ID-only operations

task.get, task.complete, task.uncomplete, task.start, task.archive, task.restore require only { "id": "<task-id>" }.

Excluded Operations

  • task.delete — intentionally excluded from v1. Deletion is destructive and irreversible in SP.

Examples

Create a task

json
{
  "operation": "task.create",
  "payload": {
    "title": "Write integration tests",
    "projectId": "project-1",
    "tagIds": ["tag-dev"],
    "notes": "Cover REST client edge cases"
  }
}

Update a task

json
{
  "operation": "task.update",
  "payload": {
    "id": "task-abc123",
    "title": "Write integration tests (updated)",
    "isDone": true
  }
}

Complete a task

json
{
  "operation": "task.complete",
  "payload": { "id": "task-abc123" }
}

Archive a task

json
{
  "operation": "task.archive",
  "payload": { "id": "task-abc123" }
}

Known REST API Gaps

These operations are not available via the SP Local REST API and are candidates for future versions:

  • project.create
  • tag.create
  • notification.show
  • Recurring task creation / repeat config

API Contract Fixtures

Canonical SP REST API response shapes are maintained in tests/fixtures/. Files without qualifiers (e.g. task-list-ok.json) represent observed API responses. Files with qualifiers (e.g. task-create-error-with-details.json) are synthetic edge cases.

MCP Error Semantics

ConditionMCP behavior
SP returns an errorCallToolResult(isError=True) with error code and message
SP unreachable / timeoutCallToolResult(isError=True) with SP_UNAVAILABLE or TIMEOUT
Payload validation failureCallToolResult(isError=True) with INVALID_INPUT
Unknown tool nameCallToolResult(isError=True) with "Unknown tool: ..." message

Released under the MIT License. New users: use the Go bridge.