Skip to main content
Glama
hichana

Goal Story MCP Server

by hichana

goalstory_read_self_user

Retrieve user profile data including preferences, belief systems, and goal history to enable personalized goal narratives and context-aware discussions.

Instructions

Get the user's profile data including their preferences, belief systems, and past goal history to enable personalized goal storying and context-aware discussions.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handler implementation registered via server.tool() for 'goalstory_read_self_user'. It performs a GET request to the /users endpoint using the doRequest helper and returns the user's profile data as formatted JSON text.
    server.tool(
      READ_SELF_USER_TOOL.name,
      READ_SELF_USER_TOOL.description,
      READ_SELF_USER_TOOL.inputSchema.shape,
      async (args) => {
        const url = `${GOALSTORY_API_BASE_URL}/users`;
        const result = await doRequest(url, "GET");
        return {
          content: [
            {
              type: "text",
              text: `User data:\n${JSON.stringify(result, null, 2)}`,
            },
          ],
          isError: false,
        };
      },
    );
  • Tool definition object providing the name, description, and Zod input schema (empty object since no params) used in registration.
    export const READ_SELF_USER_TOOL = {
      name: "goalstory_read_self_user",
      description:
        "Get the user's profile data including their preferences, belief systems, and past goal history to enable personalized goal storying and context-aware discussions.",
      inputSchema: z.object({}),
    };
  • TypeScript interface defining the empty input type for the tool.
    export interface GoalstoryReadSelfUserInput {}
  • Shared utility function for making authenticated HTTP requests to the GoalStory API, used by all tools including this one.
    async function doRequest<T = any>(
      url: string,
      method: string,
      body?: unknown,
    ): Promise<T> {
      console.error("Making request to:", url);
      console.error("Method:", method);
      console.error("Body:", body ? JSON.stringify(body) : "none");
    
      try {
        const response = await axios({
          url,
          method,
          headers: {
            "Content-Type": "application/json",
            Authorization: `Bearer ${GOALSTORY_API_TOKEN}`,
          },
          data: body,
          timeout: 10000, // 10 second timeout
          validateStatus: function (status) {
            return status >= 200 && status < 500; // Accept all status codes less than 500
          },
        });
        console.error("Response received:", response.status);
        return response.data as T;
      } catch (err) {
        console.error("Request failed with error:", err);
    
        if (axios.isAxiosError(err)) {
          if (err.code === "ECONNABORTED") {
            throw new Error(
              `Request timed out after 10 seconds. URL: ${url}, Method: ${method}`,
            );
          }
          if (err.response) {
            // The request was made and the server responded with a status code
            // that falls out of the range of 2xx
            throw new Error(
              `HTTP Error ${
                err.response.status
              }. URL: ${url}, Method: ${method}, Body: ${JSON.stringify(
                body,
              )}. Error text: ${JSON.stringify(err.response.data)}`,
            );
          } else if (err.request) {
            // The request was made but no response was received
            throw new Error(
              `No response received from server. URL: ${url}, Method: ${method}`,
            );
          } else {
            // Something happened in setting up the request that triggered an Error
            throw new Error(`Request setup failed: ${err.message}`);
          }
        } else {
          // Something else happened
          throw new Error(
            `Unexpected error: ${err instanceof Error ? err.message : String(err)}`,
          );
        }
      }
    }
  • Instruction in the VISUALIZE prompt template guiding the AI to use this tool when user context is insufficient.
    If you don't know enough about me to create a story, you can use the 'goalstory_read_self_user' tool.
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden. It states the tool reads user data but does not disclose behavioral traits such as authentication requirements, rate limits, data freshness, or error handling. For a read operation with zero annotation coverage, this is a significant gap in transparency.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, well-structured sentence that efficiently conveys the tool's purpose, content, and intended use. It is front-loaded with the core action and resource, followed by details and purpose, with no wasted words.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's complexity (read operation with no parameters) and lack of annotations and output schema, the description provides adequate purpose and usage context but is incomplete. It does not cover behavioral aspects like response format, data scope, or error conditions, which are important for a tool that fetches user data.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has 0 parameters with 100% coverage, so no parameter documentation is needed. The description appropriately does not discuss parameters, maintaining focus on the tool's purpose. This meets the baseline for tools with no parameters.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('Get') and resource ('user's profile data') with specific content details ('preferences, belief systems, and past goal history') and purpose ('to enable personalized goal storying and context-aware discussions'). It distinguishes from siblings like 'goalstory_update_self_user' (update vs. read) and 'goalstory_read_goals' (user data vs. goals). However, it doesn't explicitly contrast with all siblings, such as 'goalstory_read_current_focus' which might also provide user context.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage for personalization and context-aware discussions, suggesting it should be used when user profile data is needed. However, it lacks explicit guidance on when to use this tool versus alternatives like 'goalstory_read_current_focus' or 'goalstory_about', and does not specify prerequisites or exclusions. The context is clear but not comprehensive.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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