Skip to main content
Glama
hichana

Goal Story MCP Server

by hichana

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
NameRequiredDescriptionDefault
limitNoMaximum number of scheduled stories to return per page.
pageNoPage number for viewing subsets of scheduled stories (starts at 1).

Implementation Reference

  • 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, }; }, );
  • 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, }; }, );

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