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

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)
JSON Schema
{
  "type": "object",
  "properties": {}
}

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.
Full output schema
JSON 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

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 · 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

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.
Full input schema, including bounds and nested alternatives (MCP)
JSON Schema
{
  "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

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.
Full output schema
JSON 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.

REST
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"}'
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 · 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

FieldTypeDescription
idstringGoal template id, from list_goals or get_daily_goals.
Full input schema, including bounds and nested alternatives (MCP)
JSON Schema
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Goal template id, from list_goals or get_daily_goals."
    }
  },
  "required": [
    "id"
  ],
  "additionalProperties": true
}

Output

FieldTypeDescription
idstringGoal template id, from list_goals or get_daily_goals.
deletedtrue
Full output schema
JSON 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

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