Skip to main content
Glama

robotbase-content

Cyberlibrary Rag Context

cyberlibrary_rag_context
Read-onlyIdempotent

Retrieve ranked passages for a question and pack them into a token budget, ready to paste into an agent context. Each passage carries a permanent chunk_id, book/chapter/paragraph, citation, license and source URL, plus a packed context string and citations index. When to use: you are building a RAG answer and need grounded evidence with citations, without assembling chunks yourself. Do not use: to verify an exact quotation (cyberlibrary_verify_quote) or to read a whole book (cyberlibrary_get_chunks). Returns: {query, lang, budget_tokens, used_tokens, passages_returned, corpus_version, context, passages[], citations[]}.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
langNoOptional language filter, e.g. zh-cn, en.
limitNoMax passages (1-30). Default 12.
queryYesQuestion or keywords (2-300 chars).
budget_tokensNoApproximate context budget (300-12000). Default 2000.
snippet_charsNoPer-passage character cap (200-2000). Default 900.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.7/5.0
Behavior4/5

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

Annotations already declare the safety profile (readOnly, idempotent, non-destructive, openWorld), so the bar is lower. The description still adds real behavioral content: what each passage carries (permanent chunk_id, book/chapter/paragraph, citation, license, source URL) and that a packed context string plus citations index are produced. It omits rate limits and any auth requirements, which keeps it short of 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?

Purpose is front-loaded, followed by structured 'When to use', 'Do not use' and 'Returns' segments. Every sentence carries distinct information with no filler.

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?

Although there is no output schema, the description provides a Returns object shape, the usage boundaries, and per-passage payload detail. Combined with full schema coverage and safety annotations, an agent has everything needed to call it 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 100%, so the schema already documents all five parameters (baseline 3). The description adds meaning by framing the call around a token budget and packing behavior, contextualizing how budget_tokens/limit/snippet_chars interact, and enumerates the returned fields. Slight value-add over the schema, but no syntax or format detail.

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 and resource ('Retrieve ranked passages') plus the distinguishing behavior of packing them into a token budget. It explicitly names the sibling tools it is not (cyberlibrary_verify_quote, cyberlibrary_get_chunks), so an agent can separate it from the crowded cyberlibrary family without opening schemas.

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?

Contains an explicit 'When to use' (building a RAG answer needing grounded citations without assembling chunks) and 'Do not use' with named alternatives and their selecting conditions. Nothing is left to inference.

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.