Skip to main content
Glama
srgsanky

Personal Library MCP Server

by srgsanky

delete_book

Remove books from your personal library by ISBN to manage your reading list and keep your collection current.

Instructions

Removes a book from the library.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
isbnYes

Implementation Reference

  • Implementation of the 'delete_book' tool which removes a book record from the database.
    @mcp.tool()
    def delete_book(isbn: str) -> str:
        """Removes a book from the library."""
        conn = get_db_connection()
        cursor = conn.cursor()
        cursor.execute("DELETE FROM books WHERE isbn = ?", (isbn,))
        conn.commit()
        changes = conn.total_changes
        conn.close()
        
        if changes > 0:
            return f"Success: Book {isbn} deleted."
        return f"Error: No book found with ISBN {isbn}."

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/srgsanky/mcp-demo'

If you have feedback or need assistance with the MCP directory API, please join our Discord server