goalstory_read_scheduled_stories
Retrieve a paginated list of scheduled story generation configurations for users. All times are in UTC, requiring conversion to the user's local time for accurate viewing.
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 |
|---|---|---|---|
| limit | No | Maximum number of scheduled stories to return per page. | |
| page | No | Page number for viewing subsets of scheduled stories (starts at 1). |
Implementation Reference
- src/index.ts:727-747 (handler)Handler function for the 'goalstory_read_scheduled_stories' tool. Constructs API URL with optional pagination parameters, performs GET request via doRequest helper, and returns formatted JSON response.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)Tool schema definition including name, description, and Zod inputSchema for pagination (page, limit optional).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."), }), };
- src/index.ts:727-747 (registration)Registration of the tool via MCP server.tool() call, referencing the schema from tools.ts and providing inline handler.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, }; }, );