Skip to main content
Glama

lru_simulate

Simulate LRU cache behavior for a sequence of key accesses to calculate hit and miss rates with configurable capacity.

Instructions

Simulate an LRU cache over a sequence of key accesses and report hit/miss rates.

Input Schema

NameRequiredDescriptionDefault
accessesYesSequence of key accesses
capacityNoCache capacity (default 4)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.1.11

TDQS

B3.4/5.0
Behavior3/5

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

With no annotations, the description must carry behavioral burden, and it partially does by disclosing that the tool reports hit/miss rates as output. However it does not state that this is a side-effect-free pure computation, nor anything about output format beyond the metric names.

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?

A single front-loaded sentence naming the action, input, and output with zero wasted words. Well structured for quick scanning.

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 simple two-parameter pure simulation with no output schema, the description covers what is simulated and what is returned (hit/miss rates). Minor gap: no detail on result shape or edge cases, but nothing essential is missing.

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 coverage is 100%, so both parameters (accesses, capacity with default 4) are already documented in the schema. The description's mention of the key-access sequence adds nothing beyond what the schema states, so the baseline 3 applies.

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 (simulate), resource (LRU cache), and scope (over a sequence of key accesses with hit/miss rate reporting). It is distinguishable from siblings like rb_tree_sim and skip_list_sim by naming the exact structure, though it does not explicitly contrast itself with them.

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?

No guidance on when to use this versus the many other algorithm-simulator siblings (rb_tree_sim, treap_sim, bloom_filter, etc.), nor any prerequisites or constraints noted. The agent must infer appropriate usage purely from the name.

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

Deploy Server

Other Tools