Skip to main content
Glama

cuba_faro

Search long-term agent memory before answering to ground responses. Verify claims against evidence, filter results by time, and get grounding scores.

Instructions

Search memory BEFORE answering to ground responses. Returns grounding scores. Mode 'verify' checks claims against evidence (confidence: verified/partial/weak/unknown). Session-aware: boosts results matching active session goals. Supports temporal filtering. Optional MMR diversification, OOD abstention and an exact tiktoken-based token budget.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
modeNoSearch mode (default: hybrid). 'verify' checks if claim is grounded.
tagsNoFilter observations by tag keyword (exact match against auto-extracted tags)
afterNoISO8601 datetime — return results created after this time
limitNoMax results (default 10, max 50)
queryYesSearch text
scopeNoWhere to search (default: all)
beforeNoISO8601 datetime — return results created before this time
formatNoResponse format. compact (DEFAULT): abbreviated keys — e=entity, c=content, t=type, i=importance, s=score. 71% fewer tokens (798 vs 2787 at limit=10, measured). verbose: full key names, only when you need every field.
rerankNoCross-encoder rerank top-50 → top-K with bge-reranker-v2-m3. Auto-enabled when CUBA_MODE=completo, or when this build has a real GPU provider active (CUDA/DirectML compiled in AND a working device). Off by default everywhere else, even with the model on disk: on CPU it costs 60-110s and blows the search budget. Explicit true/false always wins; run `cuba-memorys doctor` to see which reason applies here.
diversifyNoPost-RRF MMR pass that penalizes near-duplicates among top-K. Default false.
max_tokensNoToken budget for results (default 5000). Counted exactly via tiktoken cl100k_base.
mmr_lambdaNoMMR balance — 1.0 pure relevance, 0.0 pure diversity. Default 0.7.
abstain_oodNoAbstain (return empty results with abstain_reason) when the query is out-of-distribution via Mahalanobis distance. Default false.
associativeNoMulti-hop expansion: seeds spreading activation from query-matched entities and pulls in observations on graph-connected entities that no lexical/vector signal surfaced. Additive — never lowers a base hit. Default false.
enable_bm25NoEnable BM25 (ts_rank_cd) as third RRF signal alongside text + vector. Catches queries with rare terms that dense embeddings miss. Default true.
ood_thresholdNoMahalanobis distance threshold for abstention. Defaults to sqrt(chi2_0.99(d)), which scales with the embedding dimension (~21.25 for d=384). Override only if you calibrated on your own corpus.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed7 schema fields changedv0.25.0
    • changedInput schema / properties / abstain_ood / description
      Previous value: -"v0.9: abstain (return empty results with abstain_reason) when query is out-of-distribution via Mahalanobis distance. Default false."New value: +"Abstain (return empty results with abstain_reason) when the query is out-of-distribution via Mahalanobis distance. Default false."
    • changedInput schema / properties / associative / description
      Previous value: -"v0.11: multi-hop expansion (HippoRAG-style). Seeds spreading activation from query-matched entities and pulls in observations on graph-connected entities that no lexical/vector signal surfaced. Additive — never lowers a base hit. Measured +10pts recall@10 on the smoke set. Default false."New value: +"Multi-hop expansion: seeds spreading activation from query-matched entities and pulls in observations on graph-connected entities that no lexical/vector signal surfaced. Additive — never lowers a base hit. Default false."
    • changedInput schema / properties / diversify / description
      Previous value: -"v0.9: post-RRF MMR pass that penalizes near-duplicates among top-K. Default false."New value: +"Post-RRF MMR pass that penalizes near-duplicates among top-K. Default false."
    • changedInput schema / properties / enable_bm25 / description
      Previous value: -"v0.9: enable BM25 (ts_rank_cd) as third RRF signal alongside text + vector. Catches queries with rare terms that dense embeddings miss. Default true."New value: +"Enable BM25 (ts_rank_cd) as third RRF signal alongside text + vector. Catches queries with rare terms that dense embeddings miss. Default true."
    • changedInput schema / properties / mmr_lambda / description
      Previous value: -"v0.9: MMR balance — 1.0 pure relevance, 0.0 pure diversity. Default 0.7."New value: +"MMR balance — 1.0 pure relevance, 0.0 pure diversity. Default 0.7."
    • changedInput schema / properties / ood_threshold / description
      Previous value: -"v0.9: Mahalanobis distance threshold for abstention. Defaults to sqrt(chi2_0.99(d)), which scales with the embedding dimension (~21.25 for d=384). Override only if you calibrated on your own corpus."New value: +"Mahalanobis distance threshold for abstention. Defaults to sqrt(chi2_0.99(d)), which scales with the embedding dimension (~21.25 for d=384). Override only if you calibrated on your own corpus."
    • changedInput schema / properties / rerank / description
      Previous value: -"v0.9.2: cross-encoder rerank top-50 → top-K with bge-reranker-v2-m3 (Xiao 2023). Auto-enabled when CUBA_RERANKER_PATH points to a valid ONNX. Identity fallback otherwise."New value: +"Cross-encoder rerank top-50 → top-K with bge-reranker-v2-m3. Auto-enabled when CUBA_MODE=completo, or when this build has a real GPU provider active (CUDA/DirectML compiled in AND a working device). Off by default everywhere else, even with the model on disk: on CPU it costs 60-110s and blows the search budget. Explicit true/false always wins; run `cuba-memorys doctor` to see which reason applies here."
  2. First observedv0.18.0

TDQS

A4/5.0
Behavior4/5

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

With no annotations, the description carries the full behavioral burden and does disclose non-obvious traits: session-awareness that boosts results matching active session goals, grounding scores in the return, verify-mode confidence tiers, and optional MMR/OOD abstention. It omits safety/auth profile, but the operational behavior described is substantively beyond the structured fields (session-goal boosting appears nowhere in the schema).

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?

Five short sentences, each carrying a distinct capability, with the primary directive ('Search memory BEFORE answering') front-loaded. No filler and no repetition of schema detail.

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

Completeness4/5

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

For a 16-parameter tool with no output schema and no annotations, the description covers the main mode split, temporal filtering, and the opt-in features well enough to call it correctly. It does not sketch the return shape beyond 'grounding scores', which is a minor gap given there is no output schema.

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

Parameters3/5

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

Schema description coverage is 100%, and the parameter docs are themselves unusually detailed (rerank GPU gating, tiktoken budget, ood_threshold derivation). The description adds only the verify-mode confidence vocabulary, so baseline 3 is appropriate — the schema does the heavy lifting.

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?

States a specific verb and resource ('Search memory') plus its goal ('ground responses'), which is a real functional purpose rather than a restatement of the name. However, it never distinguishes itself from the many near-identical siblings (memory_faro, memory_remedio, cuba_remedio), so an agent cannot tell from the text alone why it would pick this one.

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?

'Search memory BEFORE answering to ground responses' gives a clear triggering context, and the mention of verify mode implies a claim-checking use case. It stops short of naming alternatives or stating when-not to use it, despite an unusually crowded sibling namespace.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.