Skip to main content
Glama
7robots

Micro.blog Books MCP Server

by 7robots

move_book

Move books between bookshelves in Micro.blog to organize your digital book collection. Specify book ID and target bookshelf ID to relocate items.

Instructions

Move a book to a different bookshelf.

Args: book_id: The ID of the book to move bookshelf_id: The ID of the target bookshelf

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
book_idYes
bookshelf_idYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • MCP tool handler and registration for 'move_book' using FastMCP @mcp.tool() decorator. Calls client.move_book() and returns JSON result.
    @mcp.tool()
    async def move_book(book_id: int, bookshelf_id: int) -> str:
        """Move a book to a different bookshelf.
        
        Args:
            book_id: The ID of the book to move
            bookshelf_id: The ID of the target bookshelf
        """
        try:
            result = await client.move_book(book_id, bookshelf_id)
            return json.dumps(result, indent=2)
        except Exception:
            logger.exception("Failed to move book")
            raise
  • Core helper method in MicroBooksClient that performs the HTTP POST request to Micro.blog API to move a book to a different bookshelf.
    async def move_book(self, book_id: int, bookshelf_id: int) -> dict:
        """Move a book to a different bookshelf."""
        async with httpx.AsyncClient() as client:
            response = await client.post(
                urljoin(BASE_URL, f"/books/bookshelves/{bookshelf_id}/assign"),
                headers=self.headers,
                data={"book_id": str(book_id)},
            )
            response.raise_for_status()
            return {"success": True, "message": f"Book moved to bookshelf {bookshelf_id} successfully"}
  • Explicit input schema definition for the 'move_book' tool, used in listTools response.
    {
      name: "move_book",
      description: "Move a book to a different bookshelf",
      inputSchema: {
        type: "object",
        properties: {
          book_id: {
            type: "integer",
            description: "The ID of the book to move",
            minimum: 1,
          },
          bookshelf_id: {
            type: "integer",
            description: "The ID of the target bookshelf",
            minimum: 1,
          },
        },
        required: ["book_id", "bookshelf_id"],
      },
    },
  • MCP tool handler for 'move_book' in the switch statement of callTool request handler. Dispatches to client.moveBook() and returns JSON content.
    case "move_book": {
      const { book_id, bookshelf_id } = args;
      const result = await client.moveBook(book_id, bookshelf_id);
      return {
        content: [
          {
            type: "text",
            text: JSON.stringify(result, null, 2),
          },
        ],
      };
    }
  • Core helper method in MicroBooksClient class that validates inputs and makes HTTP POST to Micro.blog API to assign book to new bookshelf.
    async moveBook(bookId, bookshelfId) {
      if (!Number.isInteger(bookId) || bookId <= 0) {
        throw new Error("Book ID must be a positive integer");
      }
      if (!Number.isInteger(bookshelfId) || bookshelfId <= 0) {
        throw new Error("Bookshelf ID must be a positive integer");
      }
    
      await this.makeRequest(`/books/bookshelves/${bookshelfId}/assign`, {
        method: "POST",
        body: new URLSearchParams({ book_id: bookId.toString() }),
      });
    
      return { success: true, message: `Book moved to bookshelf ${bookshelfId} successfully` };
    }
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It implies a mutation ('Move'), but doesn't specify permissions needed, whether the operation is reversible, error conditions, or effects on related data. This is a significant gap for a mutation tool with zero annotation coverage.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is front-loaded with the core purpose in the first sentence, followed by a structured 'Args' section. Every sentence earns its place by providing essential information without redundancy, making it highly efficient and easy to parse.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool has an output schema (which handles return values), 2 parameters with full coverage in the description, and no annotations, the description is minimally adequate. However, as a mutation tool, it lacks details on behavioral aspects like side effects or error handling, leaving gaps in completeness.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The description includes an 'Args' section that explains the meaning of both parameters ('book_id' and 'bookshelf_id'), adding value beyond the schema which has 0% description coverage. This compensates well for the lack of schema descriptions, though it doesn't detail format constraints beyond IDs being integers.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('Move') and resource ('a book to a different bookshelf'), making the purpose immediately understandable. However, it doesn't differentiate from sibling tools like 'remove_book' or 'add_book' beyond the basic verb, which prevents a perfect score.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance is provided on when to use this tool versus alternatives. For example, it doesn't clarify if this is for reorganizing books versus deleting them (vs. 'remove_book') or if there are prerequisites like existing bookshelves. The description only states what it does, not when or why to use it.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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