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.
All operations require Pro or a trial. GET and DELETE take query parameters; other methods take a JSON body. The input table also includes any MCP-only idempotency_key argument; REST sends it as a header. See retrying creates. Example ids are synthetic; find your own with the search and list operations.
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 · DailyGoal data 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.
Full input schema, including bounds and nested alternatives (MCP)
{
"type": "object",
"properties": {}
}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. |
Full output schema
{
"type": "object",
"properties": {
"goals": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Goal template id, from list_goals or get_daily_goals."
},
"name": {
"type": "string"
},
"description": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"type": {
"type": "string",
"enum": [
"numeric",
"boolean"
],
"description": "`numeric` goals have a target number; `boolean` goals are yes/no habits."
},
"metric": {
"anyOf": [
{
"type": "string",
"enum": [
"calories",
"protein",
"fat",
"carbs",
"alcohol",
"steps",
"hydration",
"custom"
],
"description": "What a numeric goal measures. Every metric except `custom` is calculated from logged data (food entries, steps, hydration), so its progress cannot be set directly."
},
{
"type": "null"
}
]
},
"targetValue": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"comparison": {
"anyOf": [
{
"type": "string",
"enum": [
"min",
"max",
"equals"
],
"description": "`min`: reach at least the target. `max`: stay at or under it. `equals`: hit it exactly."
},
{
"type": "null"
}
]
},
"daysOfWeek": {
"type": "array",
"items": {
"type": "string",
"enum": [
"monday",
"tuesday",
"wednesday",
"thursday",
"friday",
"saturday",
"sunday"
]
},
"description": "Days the goal is scheduled. An empty list means every day. Only boolean and custom numeric goals can have a schedule."
},
"active": {
"type": "boolean",
"description": "Inactive goals keep their history but do not appear in daily goals."
},
"calculated": {
"type": "boolean",
"description": "True when progress is calculated from logged data. set_goal_progress refuses calculated goals."
}
},
"required": [
"id",
"name",
"description",
"type",
"metric",
"targetValue",
"comparison",
"daysOfWeek",
"active",
"calculated"
],
"additionalProperties": true
}
}
},
"required": [
"goals"
],
"additionalProperties": true
}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 · DailyGoal data only · 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. |
Full input schema, including bounds and nested alternatives (MCP)
{
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Omit to create a goal. Pass a goal template id to update that goal."
},
"name": {
"type": "string",
"pattern": "^\\S(?:[\\s\\S]*\\S)?$",
"maxLength": 100,
"description": "Required when creating."
},
"description": {
"anyOf": [
{
"type": "string",
"maxLength": 500
},
{
"type": "null"
}
],
"description": "Null clears it."
},
"type": {
"type": "string",
"enum": [
"numeric",
"boolean"
],
"description": "Required when creating."
},
"metric": {
"type": "string",
"enum": [
"calories",
"protein",
"fat",
"carbs",
"alcohol",
"steps",
"hydration",
"custom"
],
"description": "Numeric goals only. Defaults to `custom` when creating a numeric goal."
},
"targetValue": {
"type": "number",
"minimum": 0,
"description": "Numeric goals only. Required when creating a numeric goal."
},
"comparison": {
"type": "string",
"enum": [
"min",
"max",
"equals"
],
"description": "Numeric goals only. Defaults to `min` when creating a numeric goal."
},
"daysOfWeek": {
"type": "array",
"items": {
"type": "string",
"enum": [
"monday",
"tuesday",
"wednesday",
"thursday",
"friday",
"saturday",
"sunday"
]
},
"description": "Days the goal is scheduled. An empty list means every day. Only boolean and custom numeric goals can have a schedule."
},
"active": {
"type": "boolean",
"description": "Defaults to true when creating. Set false to pause a goal without deleting it."
},
"idempotency_key": {
"type": "string",
"maxLength": 255,
"description": "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."
}
},
"additionalProperties": true
}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. |
Full output schema
{
"type": "object",
"properties": {
"goal": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Goal template id, from list_goals or get_daily_goals."
},
"name": {
"type": "string"
},
"description": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"type": {
"type": "string",
"enum": [
"numeric",
"boolean"
],
"description": "`numeric` goals have a target number; `boolean` goals are yes/no habits."
},
"metric": {
"anyOf": [
{
"type": "string",
"enum": [
"calories",
"protein",
"fat",
"carbs",
"alcohol",
"steps",
"hydration",
"custom"
],
"description": "What a numeric goal measures. Every metric except `custom` is calculated from logged data (food entries, steps, hydration), so its progress cannot be set directly."
},
{
"type": "null"
}
]
},
"targetValue": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"comparison": {
"anyOf": [
{
"type": "string",
"enum": [
"min",
"max",
"equals"
],
"description": "`min`: reach at least the target. `max`: stay at or under it. `equals`: hit it exactly."
},
{
"type": "null"
}
]
},
"daysOfWeek": {
"type": "array",
"items": {
"type": "string",
"enum": [
"monday",
"tuesday",
"wednesday",
"thursday",
"friday",
"saturday",
"sunday"
]
},
"description": "Days the goal is scheduled. An empty list means every day. Only boolean and custom numeric goals can have a schedule."
},
"active": {
"type": "boolean",
"description": "Inactive goals keep their history but do not appear in daily goals."
},
"calculated": {
"type": "boolean",
"description": "True when progress is calculated from logged data. set_goal_progress refuses calculated goals."
}
},
"required": [
"id",
"name",
"description",
"type",
"metric",
"targetValue",
"comparison",
"daysOfWeek",
"active",
"calculated"
],
"additionalProperties": true
},
"created": {
"type": "boolean",
"description": "True when this call created the goal, false when it updated one."
}
},
"required": [
"goal",
"created"
],
"additionalProperties": true
}Example request
The REST example uses OpenSSL to generate a fresh key for a new create. To retry that create, rerun only the curl command with the same key and input. You may send that key as idempotency_key in the MCP arguments too.
DAILYGOAL_IDEMPOTENCY_KEY="$(openssl rand -hex 16)"
curl -X POST "https://api.dailygoal.fit/v1/goal-templates" \
-H "Authorization: Bearer $DAILYGOAL_API_TOKEN" \
-H "Idempotency-Key: $DAILYGOAL_IDEMPOTENCY_KEY" \
-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 · DailyGoal data only
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. |
Full input schema, including bounds and nested alternatives (MCP)
{
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Goal template id, from list_goals or get_daily_goals."
}
},
"required": [
"id"
],
"additionalProperties": true
}Output
| Field | Type | Description |
|---|---|---|
| id | string | Goal template id, from list_goals or get_daily_goals. |
| deleted | true |
Full output schema
{
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Goal template id, from list_goals or get_daily_goals."
},
"deleted": {
"type": "boolean",
"enum": [
true
]
}
},
"required": [
"id",
"deleted"
],
"additionalProperties": 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)