Skip to main content
Glama
7robots

Micro.blog Books MCP Server

by 7robots

get_bookshelves

Retrieve all bookshelves from Micro.blog to organize book collections, manage reading goals, and track reading progress through natural language commands.

Instructions

Get all bookshelves from Micro.blog.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • MCP tool handler for 'get_bookshelves': calls the MicroBooksClient helper method and returns the result as a formatted JSON string.
    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
  • Core helper method in MicroBooksClient that performs the HTTP GET request to the Micro.blog Books API to fetch all bookshelves.
    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()
  • MCP tool handler case for 'get_bookshelves' in the switch statement: calls the client helper and returns the result as JSON text content.
    case "get_bookshelves": { const result = await client.getBookshelves(); return { content: [ { type: "text", text: JSON.stringify(result, null, 2), }, ], };
  • Core helper method in MicroBooksClient that performs the HTTP GET request to the Micro.blog Books API to fetch all bookshelves.
    async getBookshelves() { return await this.makeRequest("/books/bookshelves"); }
  • Tool schema definition for 'get_bookshelves' in the tools list, specifying empty input schema (no parameters required).
    name: "get_bookshelves", description: "Get all bookshelves from Micro.blog", inputSchema: { type: "object", properties: {}, }, },

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