Skip to main content
Glama

compress_hipocampo

Reduce prompt size by compressing retrieved memories with extractive, LLM, or hybrid methods, preserving critical information before sending context to another LLM.

Instructions

Compress retrieved memories using a hybrid approach (extractive + LLM).

First searches Hipocampo (SSC v1.0), then compresses the top-k results:

  • method="extractive": sentence-level keyword relevance (fast, no API cost)

  • method="llm": summarization via NVIDIA NIM (highest quality, API cost)

  • method="hybrid" (default): uses LLM for technical/code content, extractive for generic text

Use this tool BEFORE sending context to another LLM to reduce prompt size while preserving critical information.

Args: query: Natural language search query. k: Number of memories to retrieve (default 5, max 20). method: Compression method: "hybrid" (default), "extractive", or "llm". target_token: Target token count (-1 = auto, based on content). include_metadata: Include per-memory details in output. budget_ratio: Scale factor for auto-estimated tokens (default 1.0).

Returns: Compressed context as plain text with compression statistics. Includes: compressed text, original/compressed char counts, ratio, latency.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
kNo
queryYes
methodNohybrid
budget_ratioNo
target_tokenNo
include_metadataNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior5/5

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

With no annotations, the description carries full responsibility for behavioral disclosure. It thoroughly explains that the tool first searches Hipocampo, then compresses top-k results, describes method-specific behavior (e.g., API costs, quality differences, hybrid's content-based routing), and lists return values including compression statistics. This exceeds typical transparency.

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 well-structured with a clear intro, method bullets, a usage case, Args, and Returns sections. Every sentence adds value, and the format is easy to scan. It is not overly verbose despite covering complex behavior.

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?

The description is complete for an agent to select and invoke the tool: it explains the search+compress flow, method choices, parameter effects, and return format. It even includes output details despite the presence of an output schema, making standalone comprehension straightforward.

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

Parameters5/5

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

Schema description coverage is 0%, and the description fully compensates with an 'Args' section explaining each parameter's meaning and defaults (e.g., 'k: Number of memories to retrieve (default 5, max 20)', 'target_token: Target token count (-1 = auto...)'). Parameter semantics are significantly enriched beyond the bare schema.

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 the tool's function: 'Compress retrieved memories using a hybrid approach (extractive + LLM)' and explicitly connects it to the workflow ('Use this tool BEFORE sending context to another LLM'). It distinguishes itself from sibling search tools by focusing on compression with retrieval, making its purpose unambiguous.

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 gives explicit guidance on when to use the tool ('Use this tool BEFORE sending context to another LLM to reduce prompt size') and details method selection (extractive, llm, hybrid) with tradeoffs. It lacks explicit 'when not to use' or alternative tool references, but the provided context is sufficient for most decisions.

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/carrasquelalex1/hipocampo'

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