Skip to main content
Glama
7robots

Micro.blog Books MCP Server

by 7robots

get_goal_progress

Check reading goal progress by retrieving current status and completion metrics for a specific goal ID.

Instructions

Get books list progress toward a goal.

Args: goal_id: The ID of the reading goal

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
goal_idYes

Implementation Reference

  • MCP server dispatch handler for the get_goal_progress tool. Extracts goal_id from arguments and calls the client method to fetch progress from Micro.blog API, then formats as JSON text response.
    case "get_goal_progress": {
      const { goal_id } = args;
      const result = await client.getGoalProgress(goal_id);
      return {
        content: [
          {
            type: "text",
            text: JSON.stringify(result, null, 2),
          },
        ],
      };
    }
  • FastMCP tool handler for get_goal_progress. Calls the client method and returns JSON string of the goal progress.
    async def get_goal_progress(goal_id: int) -> str:
        """Get books list progress toward a goal.
        
        Args:
            goal_id: The ID of the reading goal
        """
        try:
            result = await client.get_goal_progress(goal_id)
            return json.dumps(result, indent=2)
        except Exception:
            logger.exception("Failed to get goal progress")
            raise
  • Input schema definition for the get_goal_progress tool, specifying goal_id as required positive integer.
      name: "get_goal_progress",
      description: "Get progress toward a specific reading goal",
      inputSchema: {
        type: "object",
        properties: {
          goal_id: {
            type: "integer",
            description: "The ID of the reading goal",
            minimum: 1,
          },
        },
        required: ["goal_id"],
      },
    },
  • MicroBooksClient helper method that performs HTTP GET to Micro.blog /books/goals/{goalId} endpoint to retrieve goal progress.
    async getGoalProgress(goalId) {
      if (!Number.isInteger(goalId) || goalId <= 0) {
        throw new Error("Goal ID must be a positive integer");
      }
      return await this.makeRequest(`/books/goals/${goalId}`);
    }
  • MicroBooksClient helper method that performs HTTP GET request to Micro.blog API endpoint /books/goals/{goal_id} to fetch the goal progress data.
    async def get_goal_progress(self, goal_id: int) -> dict:
        """Get books list progress toward a goal."""
        async with httpx.AsyncClient() as client:
            response = await client.get(
                urljoin(BASE_URL, f"/books/goals/{goal_id}"),
                headers=self.headers,
            )
            response.raise_for_status()
            return response.json()

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/7robots/micro-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server