get_reading_goals
Retrieve reading goals from Micro.blog to track progress and manage your book collection effectively.
Instructions
Get reading goals.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- micro_mcp_server/server.py:293-301 (handler)FastMCP tool handler for 'get_reading_goals'. Calls MicroBooksClient.get_reading_goals() and returns formatted JSON string response.@mcp.tool() async def get_reading_goals() -> str: """Get reading goals.""" try: result = await client.get_reading_goals() return json.dumps(result, indent=2) except Exception: logger.exception("Failed to get reading goals") raise
- micro_mcp_server/server.py:129-137 (helper)MicroBooksClient helper method implementing the core HTTP GET request to Micro.blog /books/goals API endpoint.async def get_reading_goals(self) -> dict: """Get reading goals.""" async with httpx.AsyncClient() as client: response = await client.get( urljoin(BASE_URL, "/books/goals"), headers=self.headers, ) response.raise_for_status() return response.json()
- FastMCP tool handler for 'get_reading_goals' in the Python DXT extension server.@mcp.tool() async def get_reading_goals() -> str: """Get reading goals.""" try: result = await client.get_reading_goals() return json.dumps(result, indent=2) except Exception: logger.exception("Failed to get reading goals") raise
- MicroBooksClient helper method for the HTTP API call in Python DXT extension.async def get_reading_goals(self) -> dict: """Get reading goals.""" async with httpx.AsyncClient() as client: response = await client.get( urljoin(BASE_URL, "/books/goals"), headers=self.headers, ) response.raise_for_status() return response.json()
- dxt-extension/server/index.js:570-579 (handler)MCP CallToolRequestSchema handler dispatch case for 'get_reading_goals'. Calls client.getReadingGoals() and returns text content with JSON.case "get_reading_goals": { const result = await client.getReadingGoals(); return { content: [ { type: "text", text: JSON.stringify(result, null, 2), }, ], };
- MicroBooksClient getReadingGoals method performing the core fetch request to /books/goals.async getReadingGoals() { return await this.makeRequest("/books/goals"); }
- Tool schema definition and registration in the tools list for ListToolsRequest, with empty input schema.{ name: "get_reading_goals", description: "Get all reading goals", inputSchema: { type: "object", properties: {}, }, },