Skip to main content
Glama

create_context_receipt

Creates a context receipt from documents, recording selected and omitted context, dependencies, and risk controls without using an LLM. Optionally saves a recovery bundle for byte-exact omission recovery.

Instructions

Create a Context Receipt from supplied documents.

documents_json may be:

  • a JSON object mapping source path to text

  • a JSON array of [source_path, text] pairs

  • a JSON array of objects with source_path/text or source/content keys

The receipt records selected context, omitted relevant context, dependency links, fingerprints, token ratio, warnings, and risk controls. It does not call an LLM.

Set recoverable=True to also persist a project-local recovery bundle, so any omitted chunk can later be recovered byte-exact and verified via recover_receipt_omission.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYes
recoverableNo
chunk_tokensNo
token_budgetNo
documents_jsonYes
overlap_tokensNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/5

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

With no annotations provided, the description fully bears the burden of disclosure. It states that the tool does not call an LLM, which is key behavioral information. It also explains that 'recoverable=True' persists a recovery bundle, offering transparency about side effects. However, it does not mention potential destructive actions or authorization needs.

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?

The description is compact (about 100 words), front-loaded with the purpose, and uses bullet points to efficiently present the acceptable formats. Every sentence adds value without repetition.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the presence of an output schema (which may document return values), the description is adequate for a simple creation tool. However, with over 60 sibling tools, it lacks guidance on when to use this tool versus 'create_context_receipt_from_path', limiting the agent's ability to differentiate.

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 0%, so the description must compensate. It only explains 'documents_json' in detail (three formats). The other five parameters ('query', 'chunk_tokens', 'token_budget', 'overlap_tokens', 'recoverable') are left with only their names and default values, lacking semantic meaning. This is insufficient for a tool with 6 parameters.

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 clearly states 'Create a Context Receipt from supplied documents', specifying the action and resource. It further distinguishes by noting that it does not call an LLM and lists what the receipt records, making it distinct from similar tools like 'create_context_receipt_from_path' which uses paths.

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 provides detailed guidance on the acceptable formats for 'documents_json' and explains when to set 'recoverable=True'. However, it does not explicitly guide when to use this tool over its sibling 'create_context_receipt_from_path', leaving some ambiguity for the agent.

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/juyterman1000/entroly'

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