Skip to main content
Glama
hichana

Goal Story MCP Server

by hichana

goalstory_destroy_goal

Permanently delete a goal and its associated steps and stories from Goal Story MCP Server. Requires 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
NameRequiredDescriptionDefault
idYesUnique identifier of the goal to be permanently removed.

Implementation Reference

  • The handler function for the 'goalstory_destroy_goal' tool. It constructs the API URL `/goals/${id}`, performs a DELETE request using the shared `doRequest` helper, and formats the response as MCP tool output.
    /** * Destroy Goal */ 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, }; }, );
  • Schema definition for the tool, including name, description, and Zod input schema validating the 'id' parameter.
    /** * DELETE /goals/:id */ 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."), }), };
  • TypeScript interface defining the input shape for destroying a goal.
    export interface GoalstoryDestroyGoalInput { id: string; }
  • src/index.ts:328-346 (registration)
    Registration of the tool with the MCP server using server.tool, referencing the schema from tools.ts and providing the handler.
    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, }; }, );

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/hichana/goalstory-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server