goalstory_create_goal
Initiate and define a new goal with clarity by specifying its title, context, and alignment with personal values. Use storytelling and belief frameworks to craft a meaningful and actionable goal.
Instructions
Begin the goal clarification process by creating a new goal. Always discuss and refine the goal with the user before or after saving, ensuring it's well-defined and aligned with their aspirations. Confirm if any adjustments are needed after creation.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| belief_mode | No | Framework defining how the user's core beliefs and values influence this goal. | |
| description | No | Detailed explanation of the goal, including context, motivation, and desired outcomes. | |
| name | Yes | Clear and specific title that captures the essence of the goal. | |
| story_mode | No | Narrative approach that shapes how future stories visualize goal achievement. |
Implementation Reference
- src/index.ts:248-279 (handler)Handler function that executes the tool logic by constructing a POST request body from input args and calling the shared doRequest helper to create a goal via the GoalStory API, then formatting and returning the response.async (args) => { const url = `${GOALSTORY_API_BASE_URL}/goals`; const body = { name: args.name, ...(args.description ? { description: args.description, } : {}), ...(args.story_mode ? { story_mode: args.story_mode, } : {}), ...(args.belief_mode ? { belief_mode: args.belief_mode, } : {}), }; const result = await doRequest(url, "POST", body); return { content: [ { type: "text", text: `Goal created:\n${JSON.stringify(result, null, 2)}`, }, ], isError: false, }; }, );
- src/tools.ts:66-94 (schema)Zod input schema definition and tool metadata (name, description) for the goalstory_create_goal tool, exported as CREATE_GOAL_TOOL and imported for use in server.tool registration.export const CREATE_GOAL_TOOL = { name: "goalstory_create_goal", description: `Begin the goal clarification process by creating a new goal. Always discuss and refine the goal with the user before or after saving, ensuring it's well-defined and aligned with their aspirations. Confirm if any adjustments are needed after creation.`, inputSchema: z.object({ name: z .string() .describe( "Clear and specific title that captures the essence of the goal.", ), description: z .string() .optional() .describe( "Detailed explanation of the goal, including context, motivation, and desired outcomes.", ), story_mode: z .string() .optional() .describe( "Narrative approach that shapes how future stories visualize goal achievement.", ), belief_mode: z .string() .optional() .describe( "Framework defining how the user's core beliefs and values influence this goal.", ), }), };
- src/index.ts:244-280 (registration)MCP server.tool registration call that registers the 'goalstory_create_goal' tool using the CREATE_GOAL_TOOL metadata and its handler function.server.tool( CREATE_GOAL_TOOL.name, CREATE_GOAL_TOOL.description, CREATE_GOAL_TOOL.inputSchema.shape, async (args) => { const url = `${GOALSTORY_API_BASE_URL}/goals`; const body = { name: args.name, ...(args.description ? { description: args.description, } : {}), ...(args.story_mode ? { story_mode: args.story_mode, } : {}), ...(args.belief_mode ? { belief_mode: args.belief_mode, } : {}), }; const result = await doRequest(url, "POST", body); return { content: [ { type: "text", text: `Goal created:\n${JSON.stringify(result, null, 2)}`, }, ], isError: false, }; }, );