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: List goalssave_goal: Save goaldelete_goal: Delete goal
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
| Field | Type | Description |
|---|---|---|
| goals | object[] | |
| goals[].id | string | Goal template id, from list_goals or get_daily_goals. |
| goals[].name | string | |
| goals[].description | string | 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[].targetValue | number | 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[].active | boolean | Inactive goals keep their history but do not appear in daily goals. |
| goals[].calculated | boolean | True when progress is calculated from logged data. set_goal_progress refuses calculated goals. |
Example request
curl "https://api.dailygoal.fit/v1/goal-templates" \
-H "Authorization: Bearer $DAILYGOAL_API_TOKEN"{
"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.
{
"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
unauthorized(401)origin_not_allowed(403)misdirected_request(421)subscription_required(403)rate_limited(429)internal_error(500)
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
| Field | Type | Description |
|---|---|---|
| idoptional | string | Omit to create a goal. Pass a goal template id to update that goal. |
| nameoptional | string | Required when creating. |
| descriptionoptional | string | null | Null 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. |
| targetValueoptional | number | Numeric 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. |
| activeoptional | boolean | Defaults to true when creating. Set false to pause a goal without deleting it. |
| idempotency_keyoptional | string | Optional. 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
| Field | Type | Description |
|---|---|---|
| goal | object | |
| goal.id | string | Goal template id, from list_goals or get_daily_goals. |
| goal.name | string | |
| goal.description | string | 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.targetValue | number | 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.active | boolean | Inactive goals keep their history but do not appear in daily goals. |
| goal.calculated | boolean | True when progress is calculated from logged data. set_goal_progress refuses calculated goals. |
| created | boolean | True when this call created the goal, false when it updated one. |
Example request
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"}'{
"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.
{
"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
unauthorized(401)origin_not_allowed(403)misdirected_request(421)subscription_required(403)rate_limited(429)validation_failed(400)not_found(404)idempotency_conflict(409)limit_exceeded(409)internal_error(500)
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
| Field | Type | Description |
|---|---|---|
| id | string | Goal template id, from list_goals or get_daily_goals. |
Output
| Field | Type | Description |
|---|---|---|
| id | string | Goal template id, from list_goals or get_daily_goals. |
| deleted | true |
Example request
curl -X DELETE "https://api.dailygoal.fit/v1/goal-templates?id=kn72x4c7v0b3n6m9q2w5e8r1t4y7u0i3" \
-H "Authorization: Bearer $DAILYGOAL_API_TOKEN"{
"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.
{
"id": "kn72x4c7v0b3n6m9q2w5e8r1t4y7u0i3",
"deleted": true
}Errors
unauthorized(401)origin_not_allowed(403)misdirected_request(421)subscription_required(403)rate_limited(429)validation_failed(400)not_found(404)internal_error(500)