Skip to main content
Glama

NextBooks

count_books

Read-onlyIdempotent

Count the books that match a title search and filters. Use it to learn how large a result is before paging through list_books, or to compare two filters. Returns the total.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "count_books"
  }
}

Input Schema

NameRequiredDescriptionDefault
listNoa curated list to choose from
yearNolatest publication year to include; books from 1950 up to it match
pagesNogreatest number of pages to include
ratingNolowest average rating to include, out of five
searchNowords that must all appear in the title; accents and word endings are ignored
languageNolanguage of the edition

Output Schema

NameRequiredDescriptionDefault
totalYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.3/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true, idempotentHint=true, and openWorldHint=false, so the safety profile is covered. The description contributes the return semantic ("Returns the total") but says nothing about cost, rate limits, or whether counting is cheaper than listing — the main behavioral question an agent would have for a count tool.

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, front-loading the operation before the routing advice and closing with the return value. Every clause carries information the agent can act on.

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?

Six optional, fully documented parameters, an output schema covering the return value, and annotations covering the safety profile — the description only needs to supply purpose and routing, which it does. Nothing required to call this correctly is missing.

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 100%, with enums and bounds documented for all six optional parameters, so the baseline of 3 applies. The description only gestures at "a title search and filters" and adds no meaning beyond what the schema already states per 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?

States a specific verb (count), resource (books), and scope (title search and filters). An agent can tell this apart from list_books and get_book from the description alone, without opening a schema.

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

Usage Guidelines5/5

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

Explicitly names the alternative (list_books) and the condition that selects this tool: sizing a result before paging. Adds a second legitimate use case (comparing two filters), so the when-to-use guidance is concrete rather than implied.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources