get_bookshelves
Retrieve all bookshelves from your Micro.blog account to organize book collections, track reading goals, and manage your digital library.
Instructions
Get all bookshelves from Micro.blog.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- dxt-extension/server/index.js:467-477 (handler)MCP ServerRequestHandler for CallToolRequestSchema dispatches 'get_bookshelves' tool calls to the MicroBooksClient.getBookshelves() method and returns the JSON-formatted result.case "get_bookshelves": { const result = await client.getBookshelves(); return { content: [ { type: "text", text: JSON.stringify(result, null, 2), }, ], }; }
- Explicit JSON schema definition for the 'get_bookshelves' tool, registered in the tools list for ListToolsRequestSchema response. Input is empty object (no parameters).{ name: "get_bookshelves", description: "Get all bookshelves from Micro.blog", inputSchema: { type: "object", properties: {}, }, },
- dxt-extension/server/index.js:56-58 (helper)MicroBooksClient helper method implementing the core HTTP GET request to the Micro.blog '/books/bookshelves' API endpoint using a shared makeRequest utility.async getBookshelves() { return await this.makeRequest("/books/bookshelves"); }
- micro_mcp_server/server.py:170-178 (handler)FastMCP @tool()-decorated handler function for 'get_bookshelves' that invokes the client helper and returns indented JSON string.@mcp.tool() async def get_bookshelves() -> str: """Get all bookshelves from Micro.blog.""" try: result = await client.get_bookshelves() return json.dumps(result, indent=2) except Exception: logger.exception("Failed to get bookshelves") raise
- micro_mcp_server/server.py:27-36 (helper)MicroBooksClient class method containing the core implementation: async HTTP GET to Micro.blog '/books/bookshelves' with bearer auth, returns JSON dict.async def get_bookshelves(self) -> dict: """Get all bookshelves.""" async with httpx.AsyncClient() as client: response = await client.get( urljoin(BASE_URL, "/books/bookshelves"), headers=self.headers, ) response.raise_for_status() return response.json()