goalstory_destroy_goal
Permanently delete a goal and all related steps and stories from your journey. Use with confirmation to avoid accidental removal.
Instructions
Remove a goal and all its associated steps and stories from the user's journey. Use with confirmation to prevent accidental deletion.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | Unique identifier of the goal to be permanently removed. |
Implementation Reference
- src/index.ts:328-345 (handler)The MCP server.tool registration and handler implementation for 'goalstory_destroy_goal'. It constructs the API URL /goals/{id} and sends a DELETE request using the doRequest helper, returning the result as tool output.server.tool( DESTROY_GOAL_TOOL.name, DESTROY_GOAL_TOOL.description, DESTROY_GOAL_TOOL.inputSchema.shape, async (args) => { const url = `${GOALSTORY_API_BASE_URL}/goals/${args.id}`; const result = await doRequest(url, "DELETE"); return { content: [ { type: "text", text: `Goal deleted:\n${JSON.stringify(result, null, 2)}`, }, ], isError: false, }; }, );
- src/tools.ts:148-153 (schema)Zod input schema definition for the tool, specifying the required 'id' parameter.inputSchema: z.object({ id: z .string() .describe("Unique identifier of the goal to be permanently removed."), }), };
- src/tools.ts:144-153 (registration)Tool configuration object exported for use in MCP server registration, including name, description, and schema.export const DESTROY_GOAL_TOOL = { name: "goalstory_destroy_goal", description: "Remove a goal and all its associated steps and stories from the user's journey. Use with confirmation to prevent accidental deletion.", inputSchema: z.object({ id: z .string() .describe("Unique identifier of the goal to be permanently removed."), }), };
- src/types.ts:38-40 (schema)TypeScript interface defining the input shape for the destroy goal tool.export interface GoalstoryDestroyGoalInput { id: string; }