Skip to main content
Glama
hongfanmeng

Bookstore MCP Server

by hongfanmeng

MCP 书店服务器

系统要求

  • Python: 3.13 或更高版本

  • 包管理器: UV(推荐)或 pip

Related MCP server: Readbook MCP Server

安装

方式一:使用 UV(推荐)

  1. 安装 UV(如果尚未安装):

    curl -LsSf https://astral.sh/uv/install.sh | sh
    # 或在 Windows 上:
    # powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"
  2. 克隆并导航到项目目录:

    cd mcp-bookstore
  3. 安装依赖项(这会自动安装 python 3.13 和所有用到的依赖到 .venv 目录下):

    uv sync

方式二:使用 pip 和虚拟环境

  1. 导航到项目目录:

    cd mcp-bookstore
  2. 创建并激活虚拟环境:

    python -m venv .venv
    source .venv/bin/activate  # 在 Windows 上: venv\Scripts\activate
  3. 安装依赖项:

    pip install -e .

启动 MCP 服务器

HTTP 模式

以 HTTP 模式启动服务器,便于与 Cherry Studio 等 AI 客户端集成:

# 使用 UV
uv run fastmcp run src/bookstore_mcp/server.py -t http --port 8000

# 使用已激活的虚拟环境
fastmcp run src/bookstore_mcp/server.py -t http --port 8000

服务器启动后会显示:

INFO     Starting MCP server 'BookStore' with transport 'http' on http://127.0.0.1:8000/mcp

服务器配置

  • HTTP 端点: http://localhost:8000/mcp

  • 端口: 8000(可通过 --port 标志配置)

  • 数据文件: data/books.json(包含图书库存的 JSON 文件)

Cherry Studio 集成

Cherry Studio 是一款功能强大的全能 AI 助手平台,集成了多模型对话、知识库管理、AI 绘画、翻译等功能。通过 MCP(模型上下文协议)支持,Cherry Studio 可以无缝集成本服务,提供图书管理功能。

安装 Cherry Studio

  1. 下载客户端

  2. 完成安装

    • 按照安装向导完成 Cherry Studio 的安装

    • 首次启动时会进入欢迎界面

配置 MCP 服务器

  1. 启动书店 MCP 服务器(以 HTTP 模式):

    uv run fastmcp run src/bookstore_mcp/server.py -t http --port 8000
  2. 打开 Cherry Studio

    • 启动 Cherry Studio 应用程序

    • 进入 设置MCP 服务器

  3. 添加 MCP 服务器配置

    • 点击 添加服务器

    • 填写以下配置信息:

      • 名称: 书城 MCP

      • 类型: streamableHttp

      • URL: http://localhost:8000/mcp

      • 描述: 书城管理和搜索工具(可选)

  4. 保存并测试连接

    • 点击 保存 保存配置

    • 点击 测试连接 确认服务器连接正常

    • 连接成功后,工具将自动可用

使用书店 MCP 工具

连接成功后,您可以在 Cherry Studio 的对话中使用以下功能。当前书店库存包含10本经典文学作品。

可用的 MCP 工具

本书店服务器提供以下工具:

工具名称

功能描述

参数

get_all_books

获取所有书籍列表

get_book_by_id

根据ID获取特定书籍

book_id (整数)

search_books_by_title

按书名搜索

title_query (字符串)

search_books_by_author

按作者搜索

author_query (字符串)

get_books_in_stock

获取有库存的书籍

buy_book

购买书籍

book_id (整数), quantity (整数,默认1)

check_availability

检查库存可用性

book_id (整数), quantity (整数,默认1)

restock_book

补充库存

book_id (整数), quantity (整数)

使用示例

以下是常用的查询和操作示例:

浏览和搜索功能

  • 显示书店中的所有书籍

  • 搜索书名包含"Great"的书籍

  • 查找书名里包含"Hobbit"的图书

  • 查找George Orwell的所有作品

  • 搜索J.R.R. Tolkien写的书

  • 找一找Harper Lee的书籍

  • 显示目前有库存的所有书籍

  • 哪些书还有现货?

书籍信息查询

  • 显示ID为1的书籍详细信息

  • 查看书籍编号3的详情

  • 检查《The Great Gatsby》是否有库存

  • ID为7的书籍还有多少本?

  • 确认《Animal Farm》能否购买2本

购买和库存管理

  • 购买一本《To Kill a Mockingbird》

  • 买2本ID为3的书籍

  • 我要买《Pride and Prejudice》

  • 为《The Catcher in the Rye》补货10本

  • 给ID为8的书籍增加5本库存

  • 补充《Fahrenheit 451》的库存数量15本

实际对话示例

以下是使用书城MCP工具的实际对话记录,展示了如何通过自然语言与书城系统进行交互:

用户: 书城有什么书

GLM-4.5-Flash | 智譜開放平台:

我来帮您查看书城有哪些书。

书城MCP : get_all_books 已完成

书城有以下书籍:

  • The Great Gatsby (了不起的盖茨比) - F. Scott Fitzgerald,库存:15本

  • To Kill a Mockingbird (杀死一只知更鸟) - Harper Lee,库存:8本

  • Animal Farm (动物农场) - George Orwell,库存:14本

  • Pride and Prejudice (傲慢与偏见) - Jane Austen,库存:12本

  • The Catcher in the Rye (麦田里的守望者) - J.D. Salinger,库存:6本

  • Lord of the Flies (蝇王) - William Golding,库存:10本

  • The Hobbit (霍比特人) - J.R.R. Tolkien,库存:18本

  • Fahrenheit 451 (华氏451度) - Ray Bradbury,库存:7本

  • Jane Eyre (简·爱) - Charlotte Brontë,库存:9本

  • The Chronicles of Narnia (纳尼亚传奇) - C.S. Lewis,库存:13本

书城共有10种书籍,涵盖了经典文学作品,库存总数为112本。如果您想了解某本书的详细信息或购买,请告诉我书名或ID。

用户: 买两本 Ray Bradbury 的书

GLM-4.5-Flash | 智譜開放平台:

我需要先找到Ray Bradbury的书籍ID,然后为您购买两本。

书城MCP : search_books_by_author 已完成

书城MCP : buy_book 已完成

已成功购买2本Ray Bradbury的《Fahrenheit 451》!

用户: Fahrenheit 451 还有多少本

GLM-4.5-Flash | 智譜開放平台:

书城MCP : check_availability 已完成

《Fahrenheit 451》目前还有 5本 在库。

更多资源

Available Tools

8 tools
buy_bookD

Buy a book.

ParametersJSON Schema
NameRequiredDescriptionDefault
book_idYes
quantityNo

TDQS

D1.7/5.0
Behavior1/5

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

With no annotations provided, the description carries full burden but offers no behavioral details. It doesn't disclose that this is a transactional/mutative operation, potential side effects (e.g., inventory reduction, payment processing), authentication needs, error conditions, or what happens upon success/failure.

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 extremely concise with just three words. While under-specified, it's front-loaded and wastes no words—every word directly states the tool's action, though it lacks necessary detail.

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

Completeness1/5

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

For a transactional tool with 2 parameters, 0% schema coverage, no annotations, and no output schema, the description is completely inadequate. It doesn't explain what the tool does beyond the obvious name, provide usage context, parameter meanings, or expected outcomes.

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

Parameters1/5

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

Schema description coverage is 0%, so parameters are undocumented in the schema. The description adds no information about what 'book_id' represents (e.g., ISBN, database ID) or 'quantity' constraints (e.g., must be positive, stock limits). It fails to compensate for the complete lack of schema documentation.

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

Purpose2/5

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

The description 'Buy a book' restates the tool name 'buy_book' almost verbatim, making it tautological. It doesn't specify what buying entails (e.g., purchase transaction, inventory reduction, order placement) or distinguish it from siblings like 'check_availability' or 'restock_book'.

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

Usage Guidelines1/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. It doesn't mention prerequisites (e.g., checking availability first), exclusions, or relationships to sibling tools like 'check_availability' or 'get_books_in_stock'.

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

check_availabilityC

Check if book is available.

ParametersJSON Schema
NameRequiredDescriptionDefault
book_idYes
quantityNo

TDQS

C2.4/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 full burden. It states the action but doesn't disclose behavioral traits such as whether this is a read-only operation, if it requires authentication, rate limits, or what the output looks like (e.g., boolean, details). This leaves significant gaps for an agent to understand how to invoke it correctly.

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 very concise with a single sentence, which is front-loaded and wastes no words. However, it's arguably too brief, bordering on under-specified, but within the scope of conciseness, it's efficient.

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?

Given the complexity (a check operation with 2 parameters), no annotations, no output schema, and 0% schema coverage, the description is incomplete. It doesn't provide enough context for an agent to fully understand how to use the tool, what to expect in return, or how it differs from siblings.

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. It mentions 'book' but doesn't explain the parameters 'book_id' or 'quantity' (e.g., what 'quantity' means in this context—number of copies needed?). This adds minimal meaning beyond the bare schema, failing to address the coverage gap.

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

Purpose3/5

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

The description 'Check if book is available' clearly states the verb ('check') and resource ('book'), but it's vague about what 'available' means (e.g., in stock, borrowable, reservable). It doesn't distinguish from siblings like 'get_books_in_stock' or 'get_book_by_id', which might provide overlapping information.

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 like 'get_books_in_stock' (which might list available books) or 'get_book_by_id' (which might include availability status). The description implies usage for checking availability but doesn't specify contexts or exclusions.

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

get_all_booksC

Get all books.

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

TDQS

C2.7/5.0
Behavior1/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. 'Get all books' implies a read operation but doesn't specify if it's safe, requires authentication, has rate limits, returns paginated results, or what format the output takes. This is inadequate for a tool with no 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 extremely concise ('Get all books.'), consisting of a single, front-loaded sentence with no wasted words. It efficiently communicates the core action, though this brevity contributes to gaps in other dimensions.

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?

Given the tool's simplicity (0 parameters, no output schema), the description is minimal but incomplete. It lacks context on behavior, usage relative to siblings, and output details, making it insufficient for an agent to fully understand how to invoke and interpret results without additional inference.

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 input schema has 0 parameters with 100% description coverage, so no parameter documentation is needed. The description doesn't add parameter details, which is appropriate, but it also doesn't compensate for any gaps since there are none. A baseline of 4 is applied for zero parameters.

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

Purpose3/5

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

The description 'Get all books' states a clear verb ('Get') and resource ('books'), making the basic purpose understandable. However, it lacks specificity about what 'all' means (e.g., all books in a catalog, library, or database) and doesn't distinguish it from siblings like 'get_books_in_stock' or 'search_books_by_author', leaving ambiguity about scope and differentiation.

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. It doesn't mention use cases like retrieving a complete list versus filtered searches, prerequisites, or exclusions, leaving the agent to infer usage from the tool name alone among multiple sibling tools.

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

get_book_by_idC

Get book by ID.

ParametersJSON Schema
NameRequiredDescriptionDefault
book_idYes

TDQS

C2.6/5.0
Behavior2/5

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

With no annotations, the description carries the full burden but only states the action without behavioral details. It doesn't disclose if this is a read-only operation, requires authentication, has rate limits, or what the output looks like (e.g., book details or just availability). This leaves critical gaps for safe invocation.

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 extremely concise with just three words, front-loaded and zero waste. It efficiently conveys the core action without unnecessary elaboration, though this brevity contributes to gaps in other dimensions.

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?

Given no annotations, 0% schema coverage, and no output schema, the description is incomplete. It doesn't address the tool's complexity (a lookup by ID), missing details on behavior, parameters, or return values, making it inadequate for reliable agent use.

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 adds no parameter semantics. It mentions 'by ID' but doesn't explain what 'book_id' represents (e.g., numeric identifier, format, source). This fails to clarify beyond the basic schema.

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

Purpose3/5

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

The description 'Get book by ID' clearly states the verb ('Get') and resource ('book'), but it's vague about what 'Get' entails (e.g., retrieve details, fetch metadata) and doesn't distinguish it from siblings like 'get_all_books' or 'search_books_by_title'. It's minimally adequate but lacks specificity.

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 specify if this is for retrieving a single book by its unique identifier, as opposed to using search tools for broader queries. The agent must infer usage from the name alone.

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

get_books_in_stockB

Get books with count > 0.

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

TDQS

B3.1/5.0
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 only states the filtering condition ('count > 0') without mentioning other traits like whether this is a read-only operation, if it requires authentication, how results are returned (e.g., pagination, format), or any rate limits. This is a significant gap for a 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 a single, efficient sentence that directly states the tool's purpose without any wasted words. It is appropriately sized and front-loaded, making it easy for an agent to parse quickly.

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?

Given the lack of annotations and output schema, the description is incomplete. It doesn't explain what the return values look like (e.g., list of books with details), behavioral aspects like safety or performance, or how it differs from sibling tools. For a tool with no structured data support, this leaves critical gaps for an agent.

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 tool has 0 parameters, and schema description coverage is 100%, so no parameter documentation is needed. The description adds value by clarifying the semantic filtering ('count > 0'), which isn't captured in the empty schema, earning a score above the baseline of 3 for zero-parameter tools.

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 verb 'Get' and resource 'books' with a specific condition 'with count > 0', making the purpose understandable. However, it doesn't explicitly differentiate from siblings like 'get_all_books' (which might include out-of-stock books) or 'check_availability' (which might check a specific book), leaving room for ambiguity.

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 specify if this should be used for inventory checks instead of 'check_availability', or if it's preferred over 'get_all_books' for filtering in-stock items, leaving the agent to infer usage from the name and description alone.

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

restock_bookC

Add stock to a book.

ParametersJSON Schema
NameRequiredDescriptionDefault
book_idYes
quantityYes

TDQS

C2.8/5.0
Behavior2/5

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

With no annotations, the description carries full burden but only states the action without behavioral details. It doesn't disclose if this requires admin permissions, whether it's idempotent, if it logs changes, or what happens on failure (e.g., invalid book_id). 'Add stock' implies a mutation, but safety, side effects, and response format are unspecified.

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 with zero waste. It's front-loaded with the core action and resource, making it easy to parse quickly. No extraneous information or redundancy is present.

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?

Given a mutation tool with 2 parameters, 0% schema coverage, no annotations, and no output schema, the description is incomplete. It lacks details on permissions, error handling, return values, and parameter meanings, leaving significant gaps for an AI agent to invoke it correctly in a real-world context.

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 adds no parameter semantics. It doesn't explain what 'book_id' refers to (e.g., database ID, ISBN) or 'quantity' (e.g., units to add, must be positive). The schema provides titles and types, but meaning and constraints are undocumented in both schema and description.

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 ('Add stock to') and resource ('a book'), making the purpose understandable. It distinguishes from siblings like 'buy_book' (which likely reduces stock) and 'check_availability' (which queries stock), but doesn't explicitly differentiate from all siblings like inventory management tools that might exist.

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. It doesn't mention prerequisites (e.g., book must exist), when not to use it (e.g., for initial stock setup vs. restocking), or compare to siblings like 'buy_book' (which might handle sales transactions). The context is implied but not stated.

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

search_books_by_authorC

Search books by author.

ParametersJSON Schema
NameRequiredDescriptionDefault
author_queryYes

TDQS

C2.6/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 full burden. It states it's a search operation, implying read-only behavior, but doesn't disclose any behavioral traits such as pagination, result format, error handling, or rate limits. This leaves significant gaps for an agent to understand how to use it effectively.

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 with zero waste. It's appropriately sized and front-loaded, making it easy to parse quickly without unnecessary details.

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?

Given no annotations, 0% schema coverage, no output schema, and multiple sibling tools, the description is incomplete. It lacks details on behavior, parameters, and usage context, making it inadequate for an agent to select and invoke this tool correctly among alternatives.

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%, and the description doesn't add any meaning beyond the schema. It mentions 'by author' but doesn't explain the 'author_query' parameter's semantics, such as expected format (e.g., full name, partial match) or examples. With low coverage, the description fails to compensate.

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

Purpose3/5

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

The description 'Search books by author' clearly states the verb ('search') and resource ('books'), but it's vague about scope and doesn't distinguish from siblings like 'search_books_by_title' or 'get_all_books'. It's functional but lacks specificity about what kind of search it performs.

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 like 'search_books_by_title' or 'get_all_books'. The description implies usage for author-based searches but doesn't specify exclusions, prerequisites, or comparison with siblings.

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

search_books_by_titleC

Search books by title.

ParametersJSON Schema
NameRequiredDescriptionDefault
title_queryYes

TDQS

C2.4/5.0
Behavior1/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 only states the action ('Search books by title') without detailing how the search works (e.g., exact match, partial match, case sensitivity), what the output includes (e.g., list of books with details), error handling, or any constraints like rate limits or authentication needs. This leaves critical behavioral traits unspecified.

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 ('Search books by title.') that is front-loaded and wastes no words. It directly conveys the core purpose without unnecessary elaboration, making it highly concise and well-structured for its minimal content.

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?

Given the tool's complexity (a search function with 1 parameter), lack of annotations, and no output schema, the description is incomplete. It does not cover behavioral aspects like search behavior, output format, or error conditions, leaving significant gaps for an AI agent to understand and invoke the tool correctly in context with its siblings.

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

Parameters1/5

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

The input schema has 1 parameter with 0% description coverage, and the description does not add any meaning beyond the parameter name 'title_query'. It does not explain what 'title_query' expects (e.g., full title, keywords, wildcards), formatting rules, or examples, failing to compensate for the low schema coverage.

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 'Search books by title' clearly states the verb ('Search') and resource ('books'), specifying the search criterion ('by title'). It distinguishes from siblings like 'search_books_by_author' by indicating the search field, but does not explicitly differentiate from 'get_all_books' or 'get_book_by_id' in terms of scope or method.

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. It does not mention when to prefer this over 'search_books_by_author' for title-based queries, 'get_all_books' for unfiltered lists, or 'get_book_by_id' for known IDs, nor does it specify any prerequisites or exclusions for usage.

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

TDQS

C2.9/5.0
Disambiguation4/5

Most tools have distinct purposes, but 'get_all_books' and 'get_books_in_stock' could be confused as both retrieve book lists, though the latter filters by stock count. The search tools are clearly differentiated by author vs. title, and other tools like 'buy_book' and 'restock_book' are unambiguous.

Naming Consistency5/5

All tools follow a consistent snake_case verb_noun pattern, such as 'buy_book', 'check_availability', and 'search_books_by_author'. The naming is predictable and readable throughout the set, with no deviations in style or structure.

Tool Count5/5

With 8 tools, this server is well-scoped for a bookstore domain, covering key operations like retrieval, search, purchasing, and inventory management. Each tool earns its place without feeling excessive or insufficient for the apparent purpose.

Completeness4/5

The tool set covers core CRUD-like operations for a bookstore, including retrieval, search, buying, and restocking. A minor gap is the lack of a tool to update book details (e.g., title or author) or delete books, but agents can likely work around this for basic workflows.

Maintenance

ActivityInactive
ResponsivenessNo issues

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

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/hongfanmeng/bookstore-mcp'

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