Skip to main content
Glama

Search Books

search_books

Search Shanghai public library holdings by title, ISBN, or author and get a paginated list with book IDs for follow-up availability checks.

Instructions

按关键字搜索城市图书馆的馆藏图书,返回分页列表。

已接入城市:shanghai(上海,全市 900+ 网点,含地铁站 24 小时自助机);其他城市待接入。 keyword 可以是书名、ISBN、作者名等。每条结果带 book_id,是后续查询的凭据。 total_results 为 null 表示数据源不提供总数:用 page 继续翻页, 直到 has_next 为 false 或 books 为空。

参数: keyword:书名、ISBN、作者等检索词 city:城市标识,默认 "shanghai" page:页码,默认 1 limit:每页条数,默认 20

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
cityNoshanghai
pageNo
limitNo
keywordYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
pageYes
booksYes
has_nextYes
total_pagesYes
total_resultsYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.1/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does well: it discloses the pagination contract (null total_results, iterate page until has_next is false or books is empty), states the actual data-source coverage limit (only shanghai, other cities pending), and explains the role of book_id as a follow-up credential. No auth, permission, or rate-limit details are given.

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?

Front-loaded with the core purpose, then operational notes (city coverage, paging), then parameters. Every sentence earns its place and the parameter block is justified given 0% schema coverage.

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?

An output schema exists, so return fields needn't be explained, yet the description helpfully explains the semantics of total_results/has_next/books that the agent needs for paging. Combined with the parameter and coverage notes, the definition is essentially complete for calling this tool.

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%, so the description must compensate, and it does: keyword is defined semantically (title/ISBN/author), city is given its default and its only valid value, and page/limit are named with defaults. The page/limit descriptions add no behavior beyond the schema defaults, keeping it short of a 5.

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?

States a specific verb and resource ('按关键字搜索...馆藏图书') plus scope (paginated list, city coverage). It hints at downstream use of book_id but never names the sibling tools (get_book_detail, find_book_availability), so an agent must infer the routing.

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?

Gives clear context for use: keyword matching on title/ISBN/author, default city shanghai with only shanghai currently supported. It also explains the paging protocol when total_results is null, which is genuine when-to-continue guidance, though it offers no explicit when-not-to-use-this-tool statement.

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