goalstory_read_one_story
Retrieve a specific story to revisit visualizations and mental imagery created for goal achievement, helping users stay motivated and focused on their objectives.
Instructions
Retrieve a specific story to revisit the visualization and mental imagery created for goal achievement.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | Unique identifier of the story to retrieve. |
Implementation Reference
- src/index.ts:705-722 (handler)The handler function for the 'goalstory_read_one_story' tool. It constructs the API URL `/stories/${id}`, performs a GET request using the doRequest helper, and returns the story data formatted as text content.server.tool( READ_ONE_STORY_TOOL.name, READ_ONE_STORY_TOOL.description, READ_ONE_STORY_TOOL.inputSchema.shape, async (args) => { const url = `${GOALSTORY_API_BASE_URL}/stories/${args.id}`; const result = await doRequest(url, "GET"); return { content: [ { type: "text", text: `Story data:\n${JSON.stringify(result, null, 2)}`, }, ], isError: false, }; }, );
- src/tools.ts:400-407 (schema)Tool specification defining the name, description, and Zod input schema for validating the 'id' parameter.export const READ_ONE_STORY_TOOL = { name: "goalstory_read_one_story", description: "Retrieve a specific story to revisit the visualization and mental imagery created for goal achievement.", inputSchema: z.object({ id: z.string().describe("Unique identifier of the story to retrieve."), }), };
- src/types.ts:115-117 (schema)TypeScript type definition for the tool's input parameters.export interface GoalstoryReadOneStoryInput { id: string; }
- src/index.ts:32-43 (registration)Import of the READ_ONE_STORY_TOOL constant used to register the tool.READ_ONE_STORY_TOOL, READ_SCHEDULED_STORIES_TOOL, READ_SELF_USER_TOOL, READ_STEPS_TOOL, READ_STORIES_TOOL, SET_STEPS_ORDER_TOOL, UPDATE_GOAL_TOOL, UPDATE_SCHEDULED_STORY_TOOL, UPDATE_SELF_USER_TOOL, UPDATE_STEP_NOTES_TOOL, UPDATE_STEP_TOOL, } from "./tools.js";