Skip to main content
Glama
Terobyte

librarian

by Terobyte

get_chapters

Retrieve chapter text from a book using a chapter number spec or token budget. Provide either 'spec' (e.g., 1-3,5) or 'budget'; defaults to 12,000 tokens when neither is given.

Instructions

Chapter text of a book: by chapter numbers (spec, e.g. "1-3,5") or by token budget (budget). If neither spec nor budget is given, the default budget of 12000 tokens is used. Passing both parameters at once is an error. If even the first chapter doesn't fit the budget, an empty text with an explanation in message is returned instead of an error — retry with a larger budget or use spec.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
specNo
from_No
budgetNo
book_idYes
Behavior4/5

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

With no annotations, the description carries the behavioral disclosure burden, and it does well: it discloses the default 12000-token budget, the error condition for passing both parameters, and the graceful fallback of returning empty text with an explanation instead of throwing an error. It does not disclose return format details or behavior of the undocumented from_ parameter, which keeps it from a 5.

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?

Three tightly packed sentences deliver the core purpose, usage modes, default behavior, error condition, and fallback behavior without any filler. The most important information is front-loaded in the first sentence, and 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?

Given the tool has no annotations and no output schema, the description covers the essential behavioral context: modes, default, error handling, and fallback. The main gaps are the undocumented from_ parameter and the absence of any description of the returned data shape beyond 'text' and 'message,' so it is strong but not fully complete.

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

Parameters3/5

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

The description does a good job explaining spec (with an example) and budget (token-based), plus the default and mutual-exclusivity constraints. However, schema description coverage is 0%, and the from_ parameter is completely undocumented in both the schema and the description, leaving a meaningful gap for an integer parameter with a default that is not self-evident.

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 'Chapter text of a book,' a specific verb-plus-resource statement that clearly distinguishes get_chapters from sibling tools like list_chapters (which likely lists chapter metadata). It further clarifies the two retrieval modes (by spec or budget), leaving no ambiguity about what the tool does.

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 explicitly explains when to use spec vs. budget, the default behavior when neither is provided, and that passing both is an error. It also gives retry guidance when the budget is too small. However, it does not mention when to use this tool over sibling tools like find or book_info, so it stops short of full alternative-tool guidance.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Terobyte/librarian-cli'

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