Skip to main content
Glama

compress_hipocampo

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

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.6/5.0
Behavior4/5

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

With no annotations provided, the description carries the behavioral burden and performs well: it discloses API cost for the LLM method, the fact that extractive is fast with no cost, the default method behavior, and return statistics. It does not explicitly state whether the operation is read-only or describe rate limits, but its behavior is substantially transparent.

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 and front-loaded: purpose, method options, usage context, argument list, and return summary. Every sentence adds useful information, and no filler or repetition is present.

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?

Given six parameters, zero annotations, and no schema descriptions, the description covers all required invocation details: query semantics, k constraints, method choices, token budgeting, metadata option, and output contents. Agents can correctly select and call the tool without needing external context.

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%, but the description compensates fully by explaining every parameter, including defaults, max value for k, the meaning of target_token = -1, and budget_ratio as a scale factor. This is exactly the semantic detail an agent needs beyond the bare schema titles.

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 names a specific verb ('compress') and resource ('retrieved memories from Hipocampo'), and clarifies the hybrid approach. It clearly distinguishes this tool from sibling tools like search_hipocampo, which retrieve without compressing.

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 says to use this tool BEFORE sending context to another LLM to reduce prompt size, and gives method-selection guidance for technical/code versus generic content. It does not explicitly state when to prefer a sibling tool like search_hipocampo, but the context is clear enough.

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.

Resources