Skip to main content
Glama

get_stats

Retrieve knowledge base statistics: active and total facts, entity and domain counts, fact distribution, vector coverage, and reclaimable log space. Check how much memory is stored before assuming recall.

Instructions

Get knowledge base statistics — how many facts are currently true, how many are held in total including superseded history, entity and domain counts, how facts are distributed across domains, and how much raw log can be reclaimed.

Call this when the user asks what you know or remember about them, how much you have stored, or whether their memory is working. This answers "how much do you know", not "what do you know" — use search_knowledge, get_entity or get_context for actual recall.

semantic is present when this store is configured for meaning search. semantic.stored is how many currently-true facts already have a vector for the working model (and dimension, when known). embeddings lists every vector group the store holds, including leftovers from a previous model — leftover rows do not serve meaning search. No semantic object means keyword-only, which is the default, even if embeddings still lists leftover rows. When semantic is present and semantic.stored is well below facts.active_latest, facts are findable by wording but not yet by meaning — call consolidate. Search does not wait for full coverage: unembedded facts still match on words.

extract.unextracted_events is how many transcript lines extract has not examined. pending_facts is I not yet integrated. A large unextracted count with a healthy fact count means capture is writing D that extract has not examined.

intelligence is billed consolidation spend (calls, tokens, elapsed), broken down by stage and provider for the last 24 hours, all time, and the last few runs. Embeddings are not this number — they are a separate API. Token fields are omitted when the provider did not report them, not shown as zero.

token_budget is remaining room under optional intelligence.token_budget caps (per billed provider, rolling hour / day / week / month). Unset means unlimited. Over the cap at the start of a run, consolidate skips extract, holds the watermark, and does not fall back to the heuristic. A run already underway stops after the current extract batch and does not start integrate. Local HTTP extract is not billed and does not trip that stop.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "get_stats"
  }
}

Input Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.30.1

TDQS

A4.4/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 burden and does substantial work: it explains that a missing `semantic` object means keyword-only even when leftover `embeddings` rows exist, that unembedded facts still match on words, and that over-cap runs cause consolidate to skip extract and hold the watermark. It never explicitly states the tool is a side-effect-free read, which is the one behavioral gap left for an unannotated tool.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The purpose and the when-to-use routing are correctly front-loaded, but the body runs to five dense paragraphs and includes garbled text ('`pending_facts` is I not yet integrated', 'capture is writing D that extract has not examined') that costs the reader clarity. Several sentences about consolidate's cap behavior are useful but could be tightened considerably.

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?

There is no output schema, so the description must explain the return shape, and it does so field by field: `semantic.stored` vs `facts.active_latest`, `embeddings` leftovers, `extract.unextracted_events`, `pending_facts`, `intelligence` billing, and `token_budget` caps. Coverage is broad and the only shortfall is the corrupted phrasing in the extract/pending_facts sentence, which leaves that field's meaning partly ambiguous.

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

Parameters4/5

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

The tool takes zero parameters, so there is no parameter semantics to add and the baseline of 4 applies. The description instead spends its space on interpreting the response fields, which is the right allocation for a no-arg tool.

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?

States a specific verb and resource (knowledge base statistics) and enumerates the concrete measures returned: active facts, total including superseded history, entity/domain counts, distribution, and reclaimable log. It also explicitly distinguishes itself from recall tools, so an agent can tell it apart from search_knowledge, get_entity, and get_context without opening a schema.

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

Usage Guidelines5/5

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

Gives an explicit trigger ('when the user asks what you know or remember about them, how much you have stored, or whether their memory is working') and an explicit exclusion with named alternatives ('This answers how much do you know, not what you know — use search_knowledge, get_entity or get_context for actual recall'). Both the when and the when-not are stated.

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