Goals reference

List, create, update and delete the goals the user tracks, with targets and weekly schedules.

The DailyGoal API is not available on the Free plan. It works with a paid plan or during a free trial. See plans.

Operations

list_goals

GET https://api.dailygoal.fit/v1/goal-templates

MCP tool list_goals · Read-only

Lists every goal template the user tracks, active and inactive, with its target, comparison and schedule. It returns no progress; use get_daily_goals for one day's progress and completion.

Input

This operation takes no input.

Output

FieldTypeDescription
goalsobject[]
goals[].idstringGoal template id, from list_goals or get_daily_goals.
goals[].namestring
goals[].descriptionstring | null
goals[].type"numeric" | "boolean"`numeric` goals have a target number; `boolean` goals are yes/no habits.
goals[].metric"calories" | "protein" | "fat" | "carbs" | "alcohol" | "steps" | "hydration" | "custom" | null
goals[].targetValuenumber | null
goals[].comparison"min" | "max" | "equals" | null
goals[].daysOfWeek"monday" | "tuesday" | "wednesday" | "thursday" | "friday" | "saturday" | "sunday"[]Days the goal is scheduled. An empty list means every day. Only boolean and custom numeric goals can have a schedule.
goals[].activebooleanInactive goals keep their history but do not appear in daily goals.
goals[].calculatedbooleanTrue when progress is calculated from logged data. set_goal_progress refuses calculated goals.

Example request

REST
curl "https://api.dailygoal.fit/v1/goal-templates" \
  -H "Authorization: Bearer $DAILYGOAL_API_TOKEN"
MCP tools/call
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "list_goals",
    "arguments": {}
  }
}

Example response

Synthetic data. REST returns this object as the body; MCP returns it as structuredContent.

json
{
  "goals": [
    {
      "id": "kn71z3x6c9v2b5n8m1q4w7e0r3t6y9u2",
      "name": "Protein",
      "description": null,
      "type": "numeric",
      "metric": "protein",
      "targetValue": 140,
      "comparison": "min",
      "daysOfWeek": [],
      "active": true,
      "calculated": true
    },
    {
      "id": "kn72x4c7v0b3n6m9q2w5e8r1t4y7u0i3",
      "name": "Stretch for 10 minutes",
      "description": "After work, before dinner.",
      "type": "boolean",
      "metric": null,
      "targetValue": null,
      "comparison": null,
      "daysOfWeek": [
        "monday",
        "wednesday",
        "friday"
      ],
      "active": true,
      "calculated": false
    },
    {
      "id": "kn73c5v8b1n4m7q0w3e6r9t2y5u8i1o4",
      "name": "Glasses of water",
      "description": null,
      "type": "numeric",
      "metric": "custom",
      "targetValue": 8,
      "comparison": "min",
      "daysOfWeek": [],
      "active": true,
      "calculated": false
    }
  ]
}

Errors

save_goal

POST https://api.dailygoal.fit/v1/goal-templates

MCP tool save_goal · Changes data · Destructive · Accepts Idempotency-Key

Creates a goal template when called without an id, or updates the named goal with an id, including pausing it with active: false. Only the fields you pass change. A user can hold a limited number of goals (see get_context limits.goalTemplates). To record today's progress on a goal, use set_goal_progress instead.

Input

FieldTypeDescription
idoptionalstringOmit to create a goal. Pass a goal template id to update that goal.
nameoptionalstringRequired when creating.
descriptionoptionalstring | nullNull clears it.
typeoptional"numeric" | "boolean"Required when creating.
metricoptional"calories" | "protein" | "fat" | "carbs" | "alcohol" | "steps" | "hydration" | "custom"Numeric goals only. Defaults to `custom` when creating a numeric goal.
targetValueoptionalnumberNumeric goals only. Required when creating a numeric goal.
comparisonoptional"min" | "max" | "equals"Numeric goals only. Defaults to `min` when creating a numeric goal.
daysOfWeekoptional"monday" | "tuesday" | "wednesday" | "thursday" | "friday" | "saturday" | "sunday"[]Days the goal is scheduled. An empty list means every day. Only boolean and custom numeric goals can have a schedule.
activeoptionalbooleanDefaults to true when creating. Set false to pause a goal without deleting it.
idempotency_keyoptionalstringOptional. A unique value for this create, for example a UUID. Retrying with the same key and arguments within 24 hours returns the first result instead of creating a duplicate.

Output

FieldTypeDescription
goalobject
goal.idstringGoal template id, from list_goals or get_daily_goals.
goal.namestring
goal.descriptionstring | null
goal.type"numeric" | "boolean"`numeric` goals have a target number; `boolean` goals are yes/no habits.
goal.metric"calories" | "protein" | "fat" | "carbs" | "alcohol" | "steps" | "hydration" | "custom" | null
goal.targetValuenumber | null
goal.comparison"min" | "max" | "equals" | null
goal.daysOfWeek"monday" | "tuesday" | "wednesday" | "thursday" | "friday" | "saturday" | "sunday"[]Days the goal is scheduled. An empty list means every day. Only boolean and custom numeric goals can have a schedule.
goal.activebooleanInactive goals keep their history but do not appear in daily goals.
goal.calculatedbooleanTrue when progress is calculated from logged data. set_goal_progress refuses calculated goals.
createdbooleanTrue when this call created the goal, false when it updated one.

Example request

REST
curl -X POST "https://api.dailygoal.fit/v1/goal-templates" \
  -H "Authorization: Bearer $DAILYGOAL_API_TOKEN" \
  -H "Idempotency-Key: 3f1c9a52-7d4e-4b8a-9e21-5c6d7e8f9a01" \
  -H "Content-Type: application/json" \
  -d '{"name":"Glasses of water","type":"numeric","metric":"custom","targetValue":8,"comparison":"min"}'
MCP tools/call
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "save_goal",
    "arguments": {
      "name": "Glasses of water",
      "type": "numeric",
      "metric": "custom",
      "targetValue": 8,
      "comparison": "min"
    }
  }
}

Example response

Synthetic data. REST returns this object as the body; MCP returns it as structuredContent.

json
{
  "goal": {
    "id": "kn73c5v8b1n4m7q0w3e6r9t2y5u8i1o4",
    "name": "Glasses of water",
    "description": null,
    "type": "numeric",
    "metric": "custom",
    "targetValue": 8,
    "comparison": "min",
    "daysOfWeek": [],
    "active": true,
    "calculated": false
  },
  "created": true
}

Errors

delete_goal

DELETE https://api.dailygoal.fit/v1/goal-templates

MCP tool delete_goal · Changes data · Destructive

Permanently deletes a goal template and all its daily progress history. To stop tracking a goal but keep its history, use save_goal with active: false instead.

Input

FieldTypeDescription
idstringGoal template id, from list_goals or get_daily_goals.

Output

FieldTypeDescription
idstringGoal template id, from list_goals or get_daily_goals.
deletedtrue

Example request

REST
curl -X DELETE "https://api.dailygoal.fit/v1/goal-templates?id=kn72x4c7v0b3n6m9q2w5e8r1t4y7u0i3" \
  -H "Authorization: Bearer $DAILYGOAL_API_TOKEN"
MCP tools/call
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "delete_goal",
    "arguments": {
      "id": "kn72x4c7v0b3n6m9q2w5e8r1t4y7u0i3"
    }
  }
}

Example response

Synthetic data. REST returns this object as the body; MCP returns it as structuredContent.

json
{
  "id": "kn72x4c7v0b3n6m9q2w5e8r1t4y7u0i3",
  "deleted": true
}

Errors