Skip to main content
Glama
7robots

Micro.blog Books MCP Server

by 7robots

change_book_cover

Update a book's cover image in your Micro.blog collection by providing a bookshelf ID, book ID, and new cover URL.

Instructions

Change the cover for a book.

Args: bookshelf_id: The ID of the bookshelf book_id: The ID of the book cover_url: URL to the new cover image

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
bookshelf_idYes
book_idYes
cover_urlYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • MCP tool call handler for 'change_book_cover': destructures arguments from request and calls the client helper method, returning JSON stringified result.
    case "change_book_cover": {
      const { bookshelf_id, book_id, cover_url } = args;
      const result = await client.changeBookCover(bookshelf_id, book_id, cover_url);
      return {
        content: [
          {
            type: "text",
            text: JSON.stringify(result, null, 2),
          },
        ],
      };
    }
  • MicroBooksClient helper method that validates inputs and makes POST request to Micro.blog API endpoint to update the book's cover image.
    async changeBookCover(bookshelfId, bookId, coverUrl) {
      if (!Number.isInteger(bookshelfId) || bookshelfId <= 0) {
        throw new Error("Bookshelf ID must be a positive integer");
      }
      if (!Number.isInteger(bookId) || bookId <= 0) {
        throw new Error("Book ID must be a positive integer");
      }
      if (!coverUrl || typeof coverUrl !== 'string' || coverUrl.trim().length === 0) {
        throw new Error("Cover URL is required and must be a non-empty string");
      }
    
      await this.makeRequest(`/books/bookshelves/${bookshelfId}/cover/${bookId}`, {
        method: "POST",
        body: new URLSearchParams({ cover_url: coverUrl.trim() }),
      });
    
      return { success: true, message: "Book cover updated successfully" };
  • Explicit JSON schema defining input parameters, types, descriptions, constraints, and required fields for the change_book_cover tool.
    inputSchema: {
      type: "object",
      properties: {
        bookshelf_id: {
          type: "integer",
          description: "The ID of the bookshelf",
          minimum: 1,
        },
        book_id: {
          type: "integer",
          description: "The ID of the book",
          minimum: 1,
        },
        cover_url: {
          type: "string",
          description: "URL to the new cover image",
          minLength: 1,
        },
      },
      required: ["bookshelf_id", "book_id", "cover_url"],
  • Tool registration entry in the listTools response, specifying name, description, and input schema for MCP server.
    name: "change_book_cover",
    description: "Change the cover image for a book",
    inputSchema: {
      type: "object",
      properties: {
        bookshelf_id: {
          type: "integer",
          description: "The ID of the bookshelf",
          minimum: 1,
        },
        book_id: {
          type: "integer",
          description: "The ID of the book",
          minimum: 1,
        },
        cover_url: {
          type: "string",
          description: "URL to the new cover image",
          minLength: 1,
        },
      },
      required: ["bookshelf_id", "book_id", "cover_url"],
    },
  • FastMCP tool handler function for change_book_cover, decorated with @mcp.tool(), calls client helper and returns JSON result.
    @mcp.tool()
    async def change_book_cover(bookshelf_id: int, book_id: int, cover_url: str) -> str:
        """Change the cover for a book.
        
        Args:
            bookshelf_id: The ID of the bookshelf
            book_id: The ID of the book
            cover_url: URL to the new cover image
        """
        try:
            result = await client.change_book_cover(bookshelf_id, book_id, cover_url)
            return json.dumps(result, indent=2)
        except Exception:
            logger.exception("Failed to change book cover")
            raise
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 states the action ('Change the cover') but doesn't mention permissions needed, whether the change is reversible, rate limits, or what the output schema returns. This leaves significant gaps for a mutation tool.

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

Conciseness4/5

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

The description is front-loaded with the main purpose, followed by a structured 'Args' section. It's efficient with minimal waste, though the 'Args' formatting could be integrated more seamlessly into the narrative flow.

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's complexity (mutation with 3 parameters), no annotations, and an output schema present, the description is moderately complete. It covers the basic action and parameters but lacks behavioral context and usage guidance, which the output schema doesn't compensate for fully.

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

Parameters3/5

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

The schema description coverage is 0%, so the description must compensate. It lists all three parameters with brief explanations, adding meaning beyond the schema's titles. However, it doesn't detail constraints like valid URL formats or ID ranges, leaving some ambiguity.

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 ('Change the cover') and resource ('for a book'), making the purpose immediately understandable. However, it doesn't differentiate from sibling tools like 'move_book' or 'remove_book' in terms of scope or specific use cases, 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?

The description provides no guidance on when to use this tool versus alternatives, such as 'add_book' for initial book setup or 'move_book' for relocation. It lacks context about prerequisites, like needing an existing book and bookshelf, or exclusions, such as not being for creating new books.

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