Skip to main content
Glama
srgsanky

Personal Library MCP Server

by srgsanky

update_book_status

Update the owned or read status of a book in your personal library using its ISBN number to track your reading progress.

Instructions

Updates the owned and/or read status of a book by ISBN.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
isbnYes
ownedNo
readNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The logic that updates the owned and/or read status of a book in the SQLite database.
    def update_book_status(isbn: str, owned: bool = None, read: bool = None) -> str:
        """Updates the owned and/or read status of a book by ISBN."""
        conn = get_db_connection()
        cursor = conn.cursor()
        
        updates = []
        params = []
        if owned is not None:
            updates.append("owned = ?")
            params.append(int(owned))
        if read is not None:
            updates.append("read = ?")
            params.append(int(read))
        
        if not updates:
            return "No updates provided."
            
        params.append(isbn)
        query = f"UPDATE books SET {', '.join(updates)} WHERE isbn = ?"
        
        cursor.execute(query, params)
        conn.commit()
        changes = conn.total_changes
        conn.close()
        
        if changes > 0:
            return f"Success: Updated status for book {isbn}."
        return f"Error: No book found with ISBN {isbn}."
  • server.py:86-86 (registration)
    MCP tool registration decorator for the update_book_status function.
    @mcp.tool()
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 it's an update operation, implying mutation, but doesn't cover critical aspects like required permissions, whether changes are reversible, error handling, or rate limits. This leaves significant gaps for an agent to understand the tool's behavior.

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 a single, efficient sentence that directly states the tool's purpose without any unnecessary words. It's front-loaded and appropriately sized for the task, earning a high score for conciseness.

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 moderate complexity (3 parameters, mutation operation) and the presence of an output schema (which reduces the need to describe return values), the description is minimally adequate. However, with no annotations and low schema coverage, it lacks details on behavioral traits and parameter nuances, making it incomplete for optimal agent use.

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 description mentions updating 'owned and/or read status,' which aligns with the 'owned' and 'read' parameters in the schema, adding some semantic context. However, with 0% schema description coverage, it doesn't fully compensate by explaining parameter formats, defaults, or the 'isbn' requirement beyond what's implied. The baseline is 3 due to the partial alignment.

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 ('Updates') and the target resource ('owned and/or read status of a book by ISBN'), making the purpose specific and understandable. However, it doesn't explicitly differentiate from sibling tools like 'add_book' or 'delete_book' beyond the 'update' verb, which is why it doesn't reach a 5.

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 like 'add_book' for new books or 'delete_book' for removal. It lacks context about prerequisites, such as whether the book must already exist in the system, or any exclusions for its use.

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

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