Skip to main content
Glama
hwillGIT
by hwillGIT

library_context_prepare

Append a user turn and return a bounded semantic-paging envelope for subsequent model calls, structuring context within token limits.

Instructions

Durably append a user turn, then return the complete bounded semantic-paging envelope for the next model call. Send only the returned messages to the model.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
focusNo
event_idNoOptional caller idempotency key for this turn.
metadataNoJSON catalog metadata or exact-match catalog filters.
max_booksNo
protectedNo
collectionNoOptional library collection/namespace; defaults to the configured collection.
importanceNo
session_idNocodex
token_budgetNo
user_messageYes
system_promptNo
strict_freshnessNo
recent_token_budgetNo
protected_token_budgetNo
Behavior4/5

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

Given annotations only state readOnlyHint:false, openWorldHint:false, idempotentHint:false, and destructiveHint:false, the description adds meaningful behavioral context: operations are durable ('Durably append'), outputs are bounded via a paging envelope, and the model should replace its message set with the returned value. It does not contradict the annotations (a write is consistent with readOnlyHint:false) and adds beyond what annotations provide, though it omits details on the envelope's structure or edge cases.

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 terse sentences with zero filler. The first declares the primary action and return value; the second provides a critical usage warning. Both sentences earn their place and critical information is front-loaded. Ideal concision.

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?

For a tool with 14 parameters, no output schema, and low schema coverage, the description is far too thin. It explains none of the parameters (token budgets, focus, max_books, etc.) and the 'semantic-paging envelope' behavior is never structurally defined. The brief note about the envelope is helpful context, but it does not adequately enable an agent to select this tool over siblings or safely set advanced options.

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 only 21% (3 of 14 params), and the description provides no parameter-level explanation whatsoever—so 11/14 params (focus, max_books, token_budget, importance, etc.) are undocumented in both the schema and the description. The description does not compensate for this significant gap. It earns a 2 because the bare names and types are present, but the intent/format of most parameters is left to guesswork.

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?

Description names a specific verb+resource ('durably append a user turn', 'return... semantic-paging envelope'), and the second sentence clarifies an important behavioral consequence ('Send only the returned messages to the model'). It's clear this is a write-then-return-context operation, but heavy jargon like 'bounded semantic-paging envelope' and lack of explicit sibling differentiation keep it from a 5.

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

Usage Guidelines3/5

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

The phrase 'for the next model call' and the instruction 'Send only the returned messages to the model' imply this is the standard context-preparation entry point and convey a constraint on how to consume results. However, no explicit when-to-use guidance, exclusions, or named alternatives are given (e.g., when to use library_prompt_build or library_context_commit instead). With 15 siblings, explicit differentiation would materially help.

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/hwillGIT/library-of-context'

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