Skip to main content
Glama
babosina

LibraryMCP

by babosina

LibraryMCP

Demo project — Intended for local development and learning purposes only. Do not expose it to the public internet or use it to store real data.

LibraryMCP is a FastAPI-based backend server designed to serve as a Model Context Protocol (MCP) tool invocation source for library management. It provides a set of API endpoints to manage books, members, and loans in a library system.

Features

  • Books Management: Full CRUD with filtering by title, author, genre, and availability.

  • Members Management: Register, list (with filters), view details with loan history and fines, update, and delete with business rules.

  • Loans Management: Borrow/return workflows, active loans listing, and fine calculations.

  • JWT Authentication: All API endpoints (except /auth/token) require a Bearer token. Credentials are configurable via environment variables.

  • SQLite Database: Lightweight storage using SQLAlchemy ORM.

  • FastAPI: High-performance web framework for building APIs with Python.

  • CORS Enabled: Open CORS for easy local development and browser demos.

  • Simple Frontend Demo: Minimal HTML page to add/list books and members.

  • Seeding Tool: Built-in script to populate the database with initial sample data.

Related MCP server: MCP Open Library & File Search Server

Project Structure

libraryMCP/
├── backend/                # Application source code
│   ├── routers/            # API route handlers
│   │   ├── auth.py         # Authentication endpoint (token issuance)
│   │   ├── books.py        # Book-related endpoints
│   │   ├── loans.py        # Loan-related endpoints
│   │   └── members.py      # Member-related endpoints
│   ├── auth.py             # JWT creation, verification, and get_current_user dependency
│   ├── crud.py             # CRUD operations
│   ├── database.py         # Database configuration and session management
│   ├── main.py             # FastAPI application entry point (CORS + routers)
│   ├── models.py           # SQLAlchemy database models
│   ├── schemas.py          # Pydantic models for request/response validation
│   └── seed.py             # Database seeding script
├── frontend/
│   └── index.html          # Simple browser demo (books/members)
├── library.db              # SQLite database file
├── openapi.json            # Generated OpenAPI schema snapshot
├── pyproject.toml          # Project dependencies and configuration
├── uv.lock                 # Lock file for dependencies
└── README.md               # Project documentation

Prerequisites

  • Python >= 3.13

  • uv (recommended for dependency management)

Installation

  1. Clone the repository:

    git clone <repository-url>
    cd libraryMCP
  2. Install dependencies:

    uv sync
  3. Configure credentials in .env (copy from .env and fill in your values):

    ADMIN_USERNAME="admin"
    ADMIN_PASSWORD="your-password"
    SECRET_KEY="your-secret-key"
    BACKEND_URL=http://localhost:8000

Usage

Running the Server

Start the FastAPI server using uvicorn:

uv run uvicorn backend.main:app --reload

The API will be available at http://127.0.0.1:8000.

Authentication

All endpoints except POST /auth/token require a JWT Bearer token.

Obtain a token:

curl -X POST http://127.0.0.1:8000/auth/token \
  -d "username=admin&password=your-password"

Response:

{ "access_token": "<token>", "token_type": "bearer" }

Use the token:

curl http://127.0.0.1:8000/books/ \
  -H "Authorization: Bearer <token>"

Tokens expire after 30 minutes. Configure credentials via ADMIN_USERNAME, ADMIN_PASSWORD, and SECRET_KEY environment variables (or in .env).

API Documentation

Once the server is running, you can access the interactive API documentation:

Seeding the Database

To populate the database with sample data, run the seed script:

uv run python backend/seed.py

Simple Frontend Demo (optional)

You can interact with the API using a tiny frontend:

  • Open frontend/index.html in your browser

  • Ensure the backend runs at http://localhost:8000 (CORS is enabled)

  • Use the UI to add/list books and members

MCP Server

The MCP server exposes the library's functionality as tools that AI assistants (Claude, etc.) can call directly.

Running the MCP Server

The MCP server communicates over stdio. Start the FastAPI backend first, then run:

uv run python mcp_server/main_stdio.py

The server reads BACKEND_URL, ADMIN_USERNAME, and ADMIN_PASSWORD from the environment (or .env). It obtains a JWT token automatically on first use and refreshes it when it expires.

Connecting to Claude Desktop

Add the following to your Claude Desktop configuration (claude_desktop_config.json):

{
  "mcpServers": {
    "library": {
      "command": "uv",
      "args": ["run", "python", "mcp_server/main_stdio.py"],
      "env": {
        "PYTHONPATH": "/absolute/path/to/libraryMCP"
      }
    }
  }
}

Available MCP Tools

Tool

Description

search_books

Search books by title, author, or genre

get_book

Get full details of a book by ID

add_book

Add a new book to the catalog

update_book

Update book metadata or copy count

delete_book

Remove a book (blocked if active loans exist)

list_members

List members with optional filters

register_member

Register a new library member

get_member

Get member profile, loan history, and fines

delete_member

Delete a member (blocked if active loans or unpaid fines)

borrow_book

Borrow a book for a member

return_book

Return a borrowed book, calculating any overdue fine

get_loans

List all active loans for a member

check_fines

Get total outstanding fines for a member

API Endpoints Overview

Authentication

  • POST /auth/token — Obtain a JWT Bearer token (form fields: username, password).

Books

  • GET /books/ — List books with optional filters.

    • Query: title, author, genre, available_only

  • GET /books/{id} — Get a single book by ID.

  • POST /books/ — Create a book (initial available_copies = total_copies).

  • PUT /books/{id} — Update a book.

  • DELETE /books/{id} — Delete a book (blocked if there are active loans).

Members

  • GET /members/ — List members with filters and pagination.

    • Query: skip, limit, name, email, is_active

  • GET /members/{id} — Get member details with loan history, active loans count, and total fines.

  • POST /members/ — Register a new member (unique email required).

  • PUT /members/{id} — Update member (cannot deactivate with active loans; email must be unique/valid).

  • DELETE /members/{id} — Delete member (blocked if active loans or unpaid fines).

Loans

  • POST /loans/borrow — Borrow a book (member must be active; book must have available copies; no duplicate active loan).

  • POST /loans/return — Return a book (increments availability; computes fine if overdue: $0.50/day).

  • GET /loans/{member_id} — List active loans for a member.

  • GET /loans/{member_id}/fines — Calculate and return fine breakdown for a member.

Available Tools

13 tools
add_bookC

Adds a new book to the library catalog. ISBN must be unique.

ParametersJSON Schema
NameRequiredDescriptionDefault
isbnYes
genreNo
titleYes
authorYes
total_copiesNo

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

C2.8/5.0
Behavior2/5

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

No annotations are provided, so the description carries the full behavioral disclosure burden. It discloses that the tool mutates the catalog and requires unique ISBNs, but it does not explain what happens on duplicate ISBN, whether permissions are needed, or how fields like total_copies behave when omitted.

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 two short sentences with no filler. The core operation is stated first and the key invariant is stated second, making it easy to scan and act on.

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

Completeness2/5

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

For a mutation tool with no annotations and zero parameter schema descriptions, the description is too thin. It omits practical details such as duplicate-ISBN behavior, ISBN format, and the role of total_copies. The presence of an output schema reduces the need to describe return values, but not enough to make the description complete.

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

Parameters2/5

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

Schema description coverage is 0%, so the description must compensate for undocumented parameters. It only adds meaning for isbn (uniqueness) and leaves title, authr, genre, and total_copies to rely on their names and defaults, which is insufficient compensation.

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 states a specific action ('Adds') and resource ('new book to the library catalog'), making the core purpose clear. The 'ISBN must be unique' note adds useful precision. While it does not explicitly name sibling tools, the create-oriented wording clearly distinguishes it from get_book, update_book, delete_book, and borrow_book.

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 for when to use this tool versus alternatives like update_book or borrow_book. The unique-ISBN statement is a constraint, not usage guidance, and there are no conditions, prerequisites, or exclusions.

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

borrow_bookA

Borrows a book for a member, creating a loan record. Fails if the book has no available copies or the member already has an active loan for it.

ParametersJSON Schema
NameRequiredDescriptionDefault
book_idYes
member_idYes

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A4/5.0
Behavior4/5

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

No annotations are present, so the description carries the full burden. It discloses the mutation side effect (a loan record is created) and, more valuably, both failure modes (no available copies; already-active loan), which spares the agent from a doomed invocation. It stops short of addressing permissions or reversibility, but that is a minor gap given the output schema covers the return value.

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?

Two sentences with zero filler: the action is front-loaded and the second sentence adds high-value failure information. Every word earns its place.

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

Completeness4/5

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

For a low-complexity tool (two required integer params, no nesting, output schema present), the description covers the action, the side effect, and both relevant failure conditions. The missing sibling routing is a minor gap that does not undermine an agent's ability to invoke the tool correctly.

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?

Schema description coverage is 0%, so the description must compensate. It maps member_id to the borrowing member and book_id to the book being borrowed, and the failure conditions add constraints on which values are acceptable (a book with available copies, a member without an active loan). This is useful but stays at role-and-constraint level, offering no source or lookup guidance for the IDs.

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

Purpose5/5

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

The description opens with a specific verb ('Borrows'), a concrete resource ('a book'), a beneficiary ('a member'), and the resulting side effect ('creating a loan record'). The purpose is unmistakable and naturally contrasts with the sibling return_book, so an agent can tell it apart without opening any schema.

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

Usage Guidelines3/5

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

The description implies the usage context — use this when a member wants to borrow a book — but never explicitly states when-not-to-use or names alternatives such as return_book for returning or get_loans for inspecting existing loans. The 'Fails if' clause provides useful preconditions, but explicit routing guidance is absent.

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

check_finesA

Returns the total outstanding fines for a member, including overdue active loans and unpaid fines from returned books.

ParametersJSON Schema
NameRequiredDescriptionDefault
member_idYes

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A4.3/5.0
Behavior4/5

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

With no annotations, the description supplies the safety profile: 'Returns' signals a read-only operation, and the 'including...' clause explains exactly what the total comprises. Minor edge cases like invalid member_id behavior are undocumented, but that's acceptable for a simple query.

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?

A single sentence that is front-loaded with the verb and object and contains no filler. Every clause earns its place by clarifying scope.

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

Completeness5/5

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

The tool is simple, with one required parameter and an output schema present, so explaining return values isn't needed. The description states precisely what the returned total includes, which is enough for correct invocation.

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 covers only member_id's type and required status, and additional description coverage is zero. The description maps member_id to 'for a member,' adding slight semantic context, but provides no extra format or behavior details. For a single obvious parameter this is minimally sufficient.

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

Purpose5/5

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

Clear verb 'Returns' with a specific resource, 'total outstanding fines for a member,' and scope, 'including overdue active loans and unpaid fines from returned books.' No sibling tool handles fines, so it is immediately distinguishable.

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

Usage Guidelines4/5

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

The description clearly frames when to use it: when a member's total fines are needed. It doesn't explicitly name alternative tools or exclusions, but the inclusion detail differentiates it from loan-returned siblings like get_loans.

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

delete_bookA

Removes a book from the catalog by book ID. Fails if the book has active loans.

ParametersJSON Schema
NameRequiredDescriptionDefault
book_idYes

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A3.7/5.0
Behavior3/5

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

No annotations are provided, so the description must carry the full behavioral burden. It clearly states that deletion occurs and that active loans cause failure, which is useful, but it does not mention whether the deletion is permanent, whether related loan history is affected, or what the failure response looks like.

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?

Two concise sentences with no filler. The primary action is front-loaded and the failure condition is stated directly.

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?

For a simple one-parameter delete with an output schema, the core information is present, but because there are no annotations, a destructive operation would benefit from clarity on reversibility/cascade effects or error behavior. The active-loan guard partially compensates, but gaps remain.

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?

Schema description coverage is 0%, so the description needs to compensate. It only paraphrases the already-obvious book_id parameter as 'by book ID' and adds little detail about how to obtain or format the ID. The single integer parameter is ssimple enough that this is minimally sufficient but not enriching.

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

Purpose5/5

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

Description starts with a specific verb, 'Removes', names the resource ('book from the catalog'), and identifies the key parameter ('by book ID'). The note about active loans differentiates it from update_book, get_book, and delete_member.

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

Usage Guidelines3/5

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

The condition 'Fails if the book has active loans' implies the agent should verify or clear loans before calling, but it does not explicitly name alternatives like return_book or get_loans as prerequisites. It provides implied guidance rather than clear when-to-use or when-not-to-use direction.

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

delete_memberA

Deletes a member account by member ID. Fails if the member has active loans or unpaid fines.

ParametersJSON Schema
NameRequiredDescriptionDefault
member_idYes

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A4.4/5.0
Behavior4/5

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

No annotations are provided, so the description carries the burden. It discloses destructive intent and a concrete failure condition, which is meaningful behavioral context beyond 'delete'. It does not mention irreversibility, permissions, or effects on historical records, but the core safety/usability behavior is covered.

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?

Two short sentences, front-loaded with the action and key constraint; no filler or redundant restating of the schema.

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

Completeness4/5

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

For a single-parameter destructive operation with an output schema present, the description covers the action, the identifier, and the main prerequisite/failure condition. It could add a note about permanence or related member records, but nothing essential to invoking the tool correctly is missing.

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 schema provides only a member_id integer with no description (0% coverage), so the description's 'by member ID' is the sole semantic link between the parameter and the operation. It tells the agent which identifier to pass, though it adds no format or source guidance beyond that.

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

Purpose5/5

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

The description opens with a specific verb ('Deletes') and resource ('member account'), and identifies the key ('member ID'). This clearly distinguishes it from sibling tools such as delete_book and register_member.

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

Usage Guidelines4/5

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

It states an explicit when-not condition: the call fails if the member has active loans or unpaid fines, which tells an agent to pre-check or avoid deletion in those cases. It does not name alternative tools or a broader when-to-use policy, so it stops short of a 5.

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

get_bookB

Retrieves full details of a single book by its ID.

ParametersJSON Schema
NameRequiredDescriptionDefault
book_idYes

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

B3.1/5.0
Behavior3/5

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

With no annotations, the description carries the burden of behavioral disclosure. It correctly indicates a read-only retrieval operation, but does not mention behavior for missing IDs, permission requirements, or error cases. The output schema covers return shape, but edge behavior remains undisclosed.

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?

One sentence with no wasted words. The verb, object, and parameter context are all front-loaded, making it 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?

The tool is simple and has an output schema, so return-value documentation is unnecessary. Still, the description lacks usage context and edge-case behavior, and with no annotations it does not fully cover what an agent needs for confident invocation.

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

Parameters2/5

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

Schema description coverage is 0%, so the description should compensate. However, 'by its ID' merely restates the book_id parameter name and adds little meaningful semantic detail beyond what the schema already provides.

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 a specific verb ('Retrieves'), resource ('full details of a single book'), and scope ('by its ID'). This distinguishes it from siblings like add_book, delete_book, and return_book, though it does not explicitly contrast it with search_books.

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 given about when to use this tool versus alternatives like search_books or list_members. The description implies 'get by ID' but does not state exclusions or conditions.

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

get_loansA

Lists all active (not yet returned) loans for a member by member ID.

ParametersJSON Schema
NameRequiredDescriptionDefault
member_idYes

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A4.1/5.0
Behavior3/5

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

With no annotations provided, the description carries the burden and does disclose a key behavioral trait: it returns only active (not yet returned) loans, not the full loan history. It does not mention edge cases like missing member IDs, pagination, or ordering, but as a read-only listing tool these are less critical.

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?

A single well-structured sentence front-loads the core purpose ('Lists all active loans') and immediately adds the filtering criterion and parameter scope. Every word is necessary, with no fluff or repetition.

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

Completeness5/5

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

For a simple read-only list operation with one required parameter and an existing output schema, the description covers the essential invocation context: what is returned, the filter, and how to scope it. No additional information is needed to call this tool correctly.

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?

Schema description coverage is 0%, but the description compensates by explaining that member_id is used to scope the result set to one member's loans. While it doesn't add format details, clarifying the role of the sole required parameter provides sufficient meaning beyond the raw schema.

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

Purpose5/5

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

The description uses a specific verb and resource ('Lists ... loans') and includes critical scoping ('active (not yet returned)', 'by member ID'). This clearly distinguishes it from sibling tools like get_book or return_book, which target different resources or actions.

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

Usage Guidelines3/5

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

The description implies when to use the tool: when you need a member's currently active loans and already have a member ID. However, it does not explicitly state exclusions or point to any alternative, leaving selection guidance mostly implicit.

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

get_memberA

Retrieves a member's profile, loan history, and outstanding fines by member ID.

ParametersJSON Schema
NameRequiredDescriptionDefault
member_idYes

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A3.8/5.0
Behavior3/5

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

With no annotations provided, the description carries the behavioral burden. 'Retrieves' conveys read-only intent and enumerates the returned data fields, which is useful context. However, it does not disclose edge-case behavior such as member-not-found handling, access requirements, or whether all fines/loans are returned.

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 one sentence, front-loaded with the action and object, and contains no filler. Every word contributes meaningful information about the tool's purpose.

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

Completeness4/5

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

For a single-parameter getter with an output schema present, the description covers the essential input and purpose. It is slightly incomplete in not relating itself to get_loans or check_fines, but that gap is more about usage guidance and does not block correct invocation.

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?

Schema description coverage is 0%, so the description must compensate. It explicitly states the lookup is 'by member ID', reinforcing the role of member_id even though the property name and integer type are already self-descriptive. It adds minimal extra meaning but enough for a single straightforward parameter.

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

Purpose5/5

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

The description uses the specific verb 'Retrieves' and names the resource (member) plus the exact data scope: profile, loan history, and outstanding fines. This clearly distinguishes it from get_book and list_members, and shows it aggregates data that get_loans and check_fines provide individually.

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

Usage Guidelines3/5

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

The description implies when to use it: when a member's combined profile, loan history, and fines are needed by member ID. However, it provides no explicit when-not guidance or alternatives, and overlapping siblings like get_loans and check_fines exist without any routing advice.

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

list_membersA

Lists all library members with optional filters by name, email, or active status.

ParametersJSON Schema
NameRequiredDescriptionDefault
nameNo
emailNo
is_activeNo

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A3.8/5.0
Behavior3/5

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

With no annotations, the description carries the burden of behavioral disclosure. It correctly indicates a read-only listing operation and that no active-status filter includes both states, but it does not mention pagination, result limits, or matching semantics such as exact versus partial or case sensitivity. These are plausible hidden behaviors for a list endpoint.

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?

A single front-loaded sentence that states the core action, scope, and filter options with no filler. Every clause earns its place.

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

Completeness4/5

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

For a simple three-optional-filter list tool with an output schema, the description is nearly complete: it names the result scope and available filters. It does not explicitly route to get_member for single-member lookups, but this gap is minor and largely covered by sibling names.

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?

Schema coverage is 0%, so the description must compensate; it does map all three parameters to meaningful filter concepts (name, email, active status) and marks them optional. However, it adds no detail about match behavior or how multiple filters interact, so it only partially compensates for the schema's lack of property descriptions.

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

Purpose5/5

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

The description has a specific verb ('Lists') and resource ('all library members'), with optional filters. This clearly differentiates it from single-record siblings like get_member and from mutation tools like register_member/delete_member.

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

Usage Guidelines3/5

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

The description conveys that this is the tool for broad member queries and optional filtering, but it never explicitly states when to prefer this over get_member or how the filters combine. The usage guidance is thus implied by sibling names rather than stated.

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

register_memberA

Registers a new library member with a name and email address. Email must be unique.

ParametersJSON Schema
NameRequiredDescriptionDefault
nameYes
emailYes

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A4.2/5.0
Behavior4/5

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

With no annotations present, the description carries the full behavioral burden. It discloses that this is a creation operation and adds the important constraint that email must be unique, which signals duplicate emails will likely cause failure. It does not detail error formats or auth requirements, but the disclosed constraint is a meaningful behavioral trait.

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?

Two short sentences with no wasted words. The core action and the key constraint are front-loaded, making it easy for an agent to scan and act on.

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

Completeness4/5

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

For a simple two-parameter registration with an output schema already available, the description covers the essential elements: operation, inputs, and a key constraint. It could be slightly richer by mentioning what happens on duplicate email, but overall it is sufficiently complete for this tool's complexity.

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?

Schema description coverage is 0%, so the description must compensate. It adds meaning to both parameters: 'name' is the member's name, and 'email' is the member's email and must be unique. This is helpful but does not explain formats, normalization, or duplicate-handling behavior beyond uniqueness.

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

Purpose5/5

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

The description clearly states the action ('registers'), the resource ('a new library member'), and the required inputs (name and email). It naturally distinguishes itself from the sibling member tools like list_members, get_member, and delete_member.

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

Usage Guidelines4/5

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

The phrase 'registers a new library member' gives clear context for when to use this tool: adding a new member to the library. It does not explicitly mention alternatives or exclusions, but the intended use is unambiguous enough for an agent.

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

return_bookA

Returns a borrowed book for a member, closing the loan and calculating any overdue fines ($0.50/day). Fails if no active loan exists for the member and book.

ParametersJSON Schema
NameRequiredDescriptionDefault
book_idYes
member_idYes

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A4/5.0
Behavior4/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 disclosing behavioral traits. It reveals that the tool mutates loan state, calculates overdue fines at a specific rate ($0.50/day), and fails cleanly when no active loan exists. This is useful behavioral context beyond the raw tool name and schema.

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?

A single, dense sentence that front-loads the primary action, states the important side effects, and includes a critical failure condition. There is no redundant wording or filler.

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

Completeness4/5

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

For a simple two-parameter tool with an output schema, the description covers the action, effects, and an important error condition. It is sufficient for an agent to invoke correctly. It could be slightly stronger by explicitly noting when this tool should be chosen over check_fines or get_loans, but that is not essential given the straightforward operation.

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 provides no property descriptions (0% coverage), so the description must compensate. It references 'the member and book,' which maps to member_id and book_id, and the parameter names are self-explanatory. However, it does not explicitly explain that these are the identifiers of the borrowing member and the borrowed book, so the compensation is partial.

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

Purpose5/5

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

The description clearly states the action ('Returns a borrowed book'), the target ('for a member'), and the main effects ('closing the loan and calculating any overdue fines'). It also distinguishes itself from sibling tools like borrow_book, check_fines, and get_loans by describing the exact operation and failure condition.

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

Usage Guidelines3/5

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

The intended use is implied: call this when a borrowed book is being returned. However, it does not explicitly contrast with alternatives such as check_fines or get_loans, nor does it state when not to use it. The failure condition ('Fails if no active loan exists') provides some guidance about prerequisites but not a full usage policy.

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

search_booksA

Searches for books in the library by title, author, or genre. Returns matching books with their availability status.

ParametersJSON Schema
NameRequiredDescriptionDefault
genreNo
titleNo
authorNo
available_onlyNo

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A3.5/5.0
Behavior3/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It communicates that the operation is a read-oriented search and that results include availability status, but it does not explain how available_only affects results, whether filters combine, or whether there are result limits. This is adequate but thin.

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 two concise sentences with no filler. The primary operation and criteria are front-loaded, and the return value is mentioned compactly.

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?

For a tool with four optional parameters and no annotations, an agent gets enough to make a basic title/author/genre search but not enough to know how optional filters interact or what happens when no criteria are supplied. The output schema helps, but the description still leaves important usage gaps.

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?

Schema description coverage is 0%, so the description must compensate. It does add meaning by identifying title, author, and genre as search criteria, but it is silent on the available_only parameter, whose semantics an agent must infer from its name and default alone. It also leaves filter combination behavior unspecified.

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 identifies the operation (searches for books), the resource (books in the library), and the supported criteria (title, author, genre). It is not a tautology and is understandable on its own, but it does not explicitly distinguish itself from the sibling get_book, so it stops short of full sibling differentiation.

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

Usage Guidelines3/5

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

The description implies this tool is for broad catalog search by title, author, or genre, which is reasonable context for use. However, it never explicitly states when to choose search_books over a direct lookup like get_book, nor does it mention any when-not-to-use conditions.

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

update_bookA

Updates book metadata or copy count by book ID. Only provided fields are updated.

ParametersJSON Schema
NameRequiredDescriptionDefault
isbnNo
genreNo
titleNo
authorNo
book_idYes
total_copiesNo
available_copiesNo

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A3.6/5.0
Behavior3/5

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

With no annotations provided, the description carries the full disclosure burden. It does add useful behavioral context with 'Only provided fields are updated,' clarifying partial-update semantics. However, it omits behaviors like what happens when book_id does not exist, whether copy-count fields have invariants (e.g., available_copies cannot exceed total_copies), or any error responses.

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?

Two front-loaded sentences with no filler. The first sentence names the action and resource, and the second adds the critical partial-update behavior. Every word contributes.

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?

The output schema exists, so return-value explanation is not required. Still, with 7 parameters, no parameter descriptions, and no annotations, the description is too thin to fully guide correct usage; it leaves relationships between copy counts and field-specific semantics to inference.

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

Parameters2/5

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

Schema description coverage is 0%, so the description must compensate, but it only groups fields vaguely as 'metadata or copy count' and names only book_id. It does not explain the meaning or constraints of fields like total_copies versus available_copies, nor does it detail how 'only provided fields' are passed in practice.

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

Purpose5/5

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

States a specific verb ('Updates'), a clear resource ('book metadata or copy count'), and the key identifier ('by book ID'). This differentiates update_book from siblings like add_book, get_book, and delete_book without needing to inspect their schemas.

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

Usage Guidelines3/5

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

The description makes clear that this tool is for modifying an existing book identified by book_id, which implies usage for updates rather than creation/retrieval. However, it does not explicitly state when-not-to-use it, nor does it name alternatives such as add_book for new books.

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

TDQS

A3.7/5.0
Disambiguation4/5

Most tools have clearly distinct purposes: book catalog, member management, loans, and fines form separate clusters. The main overlap is that get_member includes loan history and outstanding fines, which also have dedicated tools, but the descriptions are clear enough to avoid serious confusion.

Naming Consistency5/5

All tools follow a consistent verb_noun snake_case pattern, such as get_book, update_book, borrow_book, and list_members. There are no mixed conventions or vague generic verbs, making the API predictable.

Tool Count5/5

13 tools is well-scoped for a library management domain, covering books, members, loans, and fines without excessive granularity. Each tool represents a meaningful operation that earns its place in the set.

Completeness3/5

Book catalog coverage is solid, and borrow/return/fine-check workflows are present. However, there is no update_member tool, and fines can only be checked, never paid or cleared, leaving an unresolved state for members with unpaid fines.

Maintenance

ActivityInactive
ResponsivenessSyncing

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

Related MCP Servers

  • F
    license
    A
    quality
    D
    maintenance
    An MCP server for managing local Calibre libraries using the calibredb CLI. It allows users to search books, manage metadata, and retrieve EPUB file paths through natural language commands.
    7
  • F
    license
    A
    quality
    C
    maintenance
    A small MCP server modeling a library with tools to search books, borrow books, and manage members, enabling interaction with a library catalog through natural language.
    4
  • A
    license
    Not graded
    quality
    C
    maintenance
    MCP server for Google Books API, enabling volume details, ISBN lookup, and bookshelf access via natural language queries.
    15
    MIT

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/babosina/libraryMCP'

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