goalstory_read_scheduled_stories
Retrieve scheduled story generation configurations with pagination options to manage automated narrative creation for goal tracking.
Instructions
Get a list of all scheduled story generation configurations for the user, with optional pagination. IMPORTANT: All times stored in Goal Story are in UTC, so you'll have to convert that to the user's local time.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| page | No | Page number for viewing subsets of scheduled stories (starts at 1). | |
| limit | No | Maximum number of scheduled stories to return per page. |
Implementation Reference
- src/index.ts:727-747 (handler)The handler function registered via server.tool for 'goalstory_read_scheduled_stories'. It handles optional pagination parameters, makes a GET request to the GoalStory API endpoint /schedules/stories, and returns a formatted text response with the retrieved data.server.tool( READ_SCHEDULED_STORIES_TOOL.name, READ_SCHEDULED_STORIES_TOOL.description, READ_SCHEDULED_STORIES_TOOL.inputSchema.shape, async (args) => { const params = new URLSearchParams(); if (args.page) params.set("page", `${args.page}`); if (args.limit) params.set("limit", `${args.limit}`); const url = `${GOALSTORY_API_BASE_URL}/schedules/stories?${params.toString()}`; const result = await doRequest(url, "GET"); return { content: [ { type: "text", text: `Scheduled stories retrieved:\n${JSON.stringify(result, null, 2)}`, }, ], isError: false, }; }, );
- src/tools.ts:470-486 (schema)The tool metadata object defining the name, description, and Zod input schema (with optional page and limit parameters) for 'goalstory_read_scheduled_stories'.export const READ_SCHEDULED_STORIES_TOOL = { name: "goalstory_read_scheduled_stories", description: "Get a list of all scheduled story generation configurations for the user, with optional pagination. IMPORTANT: All times stored in Goal Story are in UTC, so you'll have to convert that to the user's local time.", inputSchema: z.object({ page: z .number() .optional() .describe( "Page number for viewing subsets of scheduled stories (starts at 1).", ), limit: z .number() .optional() .describe("Maximum number of scheduled stories to return per page."), }), };