Skip to main content
Glama
hichana

Goal Story MCP Server

by hichana

goalstory_get_story_context

Gather user-specific context, including goals, steps, beliefs, and motivations, to craft personalized stories. Integrates profile data and conversational insights for tailored narrative creation.

Instructions

Gather rich context about the user, their current goal/step, beliefs, and motivations to create deeply personalized and meaningful stories. Combines user profile data with conversation insights.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
feedbackNoAdditional user input to enhance context understanding.
goalIdYesUnique identifier of the goal for context gathering.
stepIdYesUnique identifier of the specific step for context gathering.

Implementation Reference

  • The handler function for 'goalstory_get_story_context' tool. It constructs URL query parameters from input (goalId, stepId, optional feedback), makes a GET request to the backend API endpoint '/context', and returns the response as formatted text content.
    async (args) => { const params = new URLSearchParams(); params.set("goalId", args.goalId); params.set("stepId", args.stepId); if (args.feedback) params.set("feedback", args.feedback); const url = `${GOALSTORY_API_BASE_URL}/context?${params.toString()}`; const result = await doRequest(url, "GET"); return { content: [ { type: "text", text: `Story context:\n${JSON.stringify(result, null, 2)}`, }, ], isError: false, }; },
  • src/index.ts:419-440 (registration)
    The MCP server.tool registration call that registers the 'goalstory_get_story_context' tool, specifying its name, description, input schema, and handler function.
    server.tool( GET_STORY_CONTEXT_TOOL.name, GET_STORY_CONTEXT_TOOL.description, GET_STORY_CONTEXT_TOOL.inputSchema.shape, async (args) => { const params = new URLSearchParams(); params.set("goalId", args.goalId); params.set("stepId", args.stepId); if (args.feedback) params.set("feedback", args.feedback); const url = `${GOALSTORY_API_BASE_URL}/context?${params.toString()}`; const result = await doRequest(url, "GET"); return { content: [ { type: "text", text: `Story context:\n${JSON.stringify(result, null, 2)}`, }, ], isError: false, }; }, );
  • Zod input schema definition for the 'goalstory_get_story_context' tool, defining required goalId and stepId strings, and optional feedback string.
    inputSchema: z.object({ goalId: z .string() .describe("Unique identifier of the goal for context gathering."), stepId: z .string() .describe( "Unique identifier of the specific step for context gathering.", ), feedback: z .string() .optional() .describe("Additional user input to enhance context understanding."), }), };
  • TypeScript interface defining the input shape for the 'goalstory_get_story_context' tool.
    export interface GoalstoryGetStoryContextInput { goalId: string; stepId: string; feedback?: string; }

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