Skip to main content
Glama

memshelf_stats

Read-onlyIdempotent

Report token economy metrics for a memory shelf: compare standing cost against shelved mass, claimed compression, and realized savings from logged recalls.

Instructions

Report the shelf's token economy: standing cost vs shelved mass, claimed compression, realized savings from logged recalls.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
paramsYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed6 schema fields changedv0.3.0
    • addedInput schema / $defs / StatsInput / additionalProperties
      Added value: +false
    • addedInput schema / $defs / StatsInput / description
      Added value: +"Beyond the shelf, only the bound on one episode's claim."
    • addedInput schema / $defs / StatsInput / properties / context_window
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "integer"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "Context window in tokens, used as the per-episode cap on claimed mass (#110). Optional: falls back to $MEMSHELF_CONTEXT_WINDOW, then to 200,000 — the standard window of the clients this shelf is written for. Pass your client's real window if it is larger.",
      +  "title": "Context Window"
      +}
    • addedInput schema / $defs / StatsInput / properties / shelf_path / default
      Added value: +""
    • changedInput schema / $defs / StatsInput / properties / shelf_path / description
      Previous value: -"Path to an initialized memory shelf."New value: +"Path to an initialized memory shelf. Optional: when omitted, the shelf named by $MEMSHELF_SHELF_PATH is used. Pass it explicitly to address a different shelf than that default."
    • removedInput schema / $defs / StatsInput / required
      Removed value: -[
      -  "shelf_path"
      -]
  2. First observedv0.1.0

TDQS

A3.5/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true, idempotentHint=true, openWorldHint=false, and destructiveHint=false, so the safety profile is fully covered by structured data. The description adds meaningful context about what the report contains (standing cost, compression claims, realized savings), but says nothing about cost of computation, staleness, or whether stats are recomputed on demand.

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

Conciseness4/5

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

A single front-loaded sentence with no filler; the colon-and-list structure efficiently names the three accounting outputs. Slightly telegraphic ('standing cost vs shelved mass'), but every phrase carries information.

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?

An output schema exists so return values need not be explained, and annotations plus detailed nested parameter docs cover safety and invocation. For a read-only single-parameter stats tool this is close to sufficient; only the absence of any usage framing keeps it from being complete.

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?

The reported schema_description_coverage of 0% applies only to the top-level 'params' wrapper; the nested StatsInput properties actually carry rich descriptions covering the $MEMSHELF_SHELF_PATH default, the $MEMSHELF_CONTEXT_WINDOW fallback chain, the 200,000 default, and units in tokens. The description itself contributes no parameter meaning, so the schema is doing all the work.

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 ('Report') and a precisely scoped resource ('the shelf's token economy'), then enumerates the exact metrics returned: standing cost vs shelved mass, claimed compression, realized savings from logged recalls. This is clearly distinguishable from siblings like memshelf_recall, memshelf_search, or memshelf_doctor without opening any schema.

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

Usage Guidelines2/5

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

There is no when-to-use guidance, no prerequisites, and no mention of alternatives or complementary tools (e.g. memshelf_recall, which is referenced indirectly via 'logged recalls'). The agent must infer that this is a reporting tool used to inspect token accounting.

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