goalstory_destroy_scheduled_story
Remove a scheduled story configuration from the Goal Story MCP Server by specifying its unique ID. This tool ensures efficient management of automated storytelling features.
Instructions
Delete a scheduled story generation configuration. Use with confirmation.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | Unique identifier of the scheduled story configuration to delete. |
Implementation Reference
- src/index.ts:809-821 (handler)The anonymous async handler function that executes the tool logic: constructs the API URL for the scheduled story ID and sends a DELETE request using the doRequest helper, then formats the response.async (args) => { const url = `${GOALSTORY_API_BASE_URL}/schedules/stories/${args.id}`; const result = await doRequest(url, "DELETE"); return { content: [ { type: "text", text: `Scheduled story deleted:\n${JSON.stringify(result, null, 2)}`, }, ], isError: false, }; },
- src/index.ts:805-822 (registration)Registers the tool on the MCP server using server.tool(), providing name, description, input schema shape from the imported TOOL constant, and the inline handler function.server.tool( DESTROY_SCHEDULED_STORY_TOOL.name, DESTROY_SCHEDULED_STORY_TOOL.description, DESTROY_SCHEDULED_STORY_TOOL.inputSchema.shape, async (args) => { const url = `${GOALSTORY_API_BASE_URL}/schedules/stories/${args.id}`; const result = await doRequest(url, "DELETE"); return { content: [ { type: "text", text: `Scheduled story deleted:\n${JSON.stringify(result, null, 2)}`, }, ], isError: false, }; }, );
- src/tools.ts:531-542 (schema)Defines the tool metadata: name 'goalstory_destroy_scheduled_story', description, and Zod input schema requiring a string 'id'.export const DESTROY_SCHEDULED_STORY_TOOL = { name: "goalstory_destroy_scheduled_story", description: "Delete a scheduled story generation configuration. Use with confirmation.", inputSchema: z.object({ id: z .string() .describe( "Unique identifier of the scheduled story configuration to delete.", ), }), };