delete_goal
Remove obsolete API-created goals to prevent duplicates on the learner dashboard. Use after regenerating a goal following a skill assessment retake.
Instructions
Delete a goal created via the API.
Use this when regenerating a goal after a learner retakes a skill assessment: call create_goal with the new suggested_goal_seed, then call delete_goal on the obsolete goal so the learner's dashboard shows the current goal instead of duplicates.
Soft delete by default (status='deleted'); the dashboard already filters these out, but a superadmin can restore them. Set hard_delete=true to permanently remove the row and cascade to steps, plans, and share links.
Scoped to api-created goals in your org -- you cannot delete goals a user created in the webapp UI. Calling twice with the same goal_id is safe (soft delete is idempotent).
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"goal_id": "<goal_id>"
},
"name": "delete_goal"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| goal_id | Yes | The UUID of the goal to delete (the goalId returned by create_goal) | |
| hard_delete | No | If true, permanently delete the row instead of soft-deleting. Default false. |