Skip to main content
Glama

eDiscovery Decoder News/Calc

Calculate Prevalence Or Richness

calculate_prevalence_richness
Read-onlyIdempotent

Estimate how rich or prevalent a population is — the share that is responsive/relevant/positive — from positive hits in a random sample, with a Wilson confidence interval. Use for 'what % of this set is relevant?' or to size review scope and cost expectations. Aggregate counts only; not legal advice.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sample_sizeYes
positive_hitsYes
population_sizeNo
confidence_levelNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
formulaYes
sampleSizeYes
positiveHitsYes
pointEstimateYes
confidenceLevelYes
confidenceIntervalYes
estimatedPositiveCountYes
estimatedPositiveLowerYes
estimatedPositiveUpperYes

TDQS

A3.9/5.0
Behavior3/5

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

Annotations already declare readOnlyHint, idempotentHint, and destructiveHint, so the description bears less burden. It adds a disclaimer ('not legal advice') and notes 'Aggregate counts only', which is helpful but not essential. No contradiction with annotations.

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?

Concise and front-loaded: first sentence states purpose, second gives usage, third adds disclaimer. Every sentence earns its place with no redundancy.

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?

Adequately complete for a statistical calculation tool. The output schema (present, not shown) likely documents return values, so the description focuses on inputs and appropriate use. Slight gap: no mention of assumptions (e.g., random sampling required).

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

Parameters2/5

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

With 0% schema description coverage, the description should compensate but only mentions 'positive_hits' and 'sample_size' implicitly. Parameters like 'population_size' and 'confidence_level' are left unexplained, relying on naming alone.

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 uses specific verbs ('estimate', 'calculate') and clearly identifies the resource (prevalence/richness from positive hits in a random sample with Wilson confidence interval). It distinguishes from siblings like 'calculate_sample_size' and 'calculate_elusion'.

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?

Provides clear use cases ('what % of this set is relevant?', 'size review scope and cost expectations'), but does not explicitly exclude inappropriate contexts or mention alternatives among siblings.

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.

TDQS

A4.2/5.0
Disambiguation5/5

Each tool has a clearly distinct purpose, with descriptions explicitly differentiating similar-sounding ones (e.g., calculate_control_set_recall vs calculate_review_metrics vs calculate_tar_recall_estimate). No ambiguity in tool selection.

Naming Consistency5/5

All tool names follow a consistent verb_noun pattern in snake_case (calculate_*, get_*, list_*, etc.), making them predictable and easy to understand.

Tool Count5/5

15 tools cover the server's domain—eDiscovery calculations, news, and utilities—without feeling excessive or insufficient. Each tool earns its place.

Completeness5/5

The tool set provides a thorough surface for eDiscovery calculations (recall, elusion, prevalence, sample size) and news, plus supporting utilities (demo guide, capability listing, health check). No obvious gaps for the stated purpose.

Resources