Skip to main content
Glama
hichana

Goal Story MCP Server

by hichana

goalstory_read_one_goal

Retrieve detailed information about a specific goal to support focused discussion and story creation.

Instructions

Retrieve detailed information about a specific goal to support focused discussion and story creation.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesUnique identifier of the goal to retrieve.

Implementation Reference

  • The MCP server.tool registration and inline async handler function that executes the tool logic: makes a GET request to the API endpoint `/goals/{id}` using the provided goal ID, retrieves the goal data, and returns it formatted as text content.
    server.tool(
      READ_ONE_GOAL_TOOL.name,
      READ_ONE_GOAL_TOOL.description,
      READ_ONE_GOAL_TOOL.inputSchema.shape,
      async (args) => {
        const url = `${GOALSTORY_API_BASE_URL}/goals/${args.id}`;
        const result = await doRequest(url, "GET");
        return {
          content: [
            {
              type: "text",
              text: `Goal data:\n${JSON.stringify(result, null, 2)}`,
            },
          ],
          isError: false,
        };
      },
    );
  • Tool specification object including name, description, and Zod input schema definition for validating the 'id' parameter.
    export const READ_ONE_GOAL_TOOL = {
      name: "goalstory_read_one_goal",
      description:
        "Retrieve detailed information about a specific goal to support focused discussion and story creation.",
      inputSchema: z.object({
        id: z.string().describe("Unique identifier of the goal to retrieve."),
      }),
    };
  • TypeScript interface defining the input shape for the tool, matching the Zod schema.
    export interface GoalstoryReadOneGoalInput {
      id: 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