Skip to main content
Glama

Sample Size

sample_size
Read-onlyIdempotent

Calculate the survey sample size needed for a confidence level and margin. FREE.

Uses maximum variance (p=0.5) with a finite-population correction when population is given. Typical input {"population": 5000, "confidence_pct": 95, "margin_pct": 5} returns {"required_sample": 357, "assumptions": "p=0.5 (max variance), random sampling"}.

Use before collecting data, to size a survey. Not for analyzing data already collected (stats_describe, confidence_interval). Errors: on invalid, missing, or malformed input this tool never raises a protocol error — it returns {"error": ""} (for example {"error": "confidence_pct must be 90, 95, or 99"}). Every call is read-only and idempotent, so after correcting the input it is always safe to retry.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
margin_pctNoAcceptable margin of error percentage; above 0 and at most 50. Default 5.
populationNoTotal population size; 0 (default) means unknown or very large.
confidence_pctNoConfidence level; must be 90, 95, or 99. Default 95.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

TDQS

A4.9/5.0
Behavior5/5

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

Beyond annotations (readOnlyHint, idempotentHint), the description adds critical behavioral details: it uses maximum variance with finite-population correction, and crucially states that invalid input never raises a protocol error but returns an error object with fix instructions. This disclosure is valuable for an AI agent.

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?

The description is well-structured with front-loaded purpose, followed by algorithmic detail, usage guidance, and error behavior. Every sentence adds value; there is no fluff. The 'FREE' note is minor but not detrimental.

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

Completeness5/5

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

Given the tool's moderate complexity, the description covers all essential aspects: purpose, mathematical assumptions, input/output examples, error handling, and safety (read-only, idempotent). With an output schema available, the return format is already addressed, making this description self-sufficient.

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?

Although the input schema has 100% description coverage (baseline 3), the description adds meaningful context: it explains the p=0.5 assumption and finite-population correction when population is given, which are not evident from the schema alone. The typical input example further clarifies parameter interplay.

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 clearly states the tool calculates survey sample size for a given confidence level and margin. It explicitly differentiates from sibling tools stats_describe and confidence_interval by stating it is used before data collection, not for analyzing already collected data.

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?

The description provides explicit usage guidance: 'Use before collecting data, to size a survey. Not for analyzing data already collected (stats_describe, confidence_interval).' It also gives error recovery instructions, saying it is always safe to retry after correcting input, which aids tool invocation decisions.

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.3/5.0
Disambiguation5/5

Each tool has a clearly distinct purpose: statistical planning (sample_size), description (stats_describe), interval estimation (confidence_interval), citation formatting (format_citation), and product/skill retrieval (list_products, get_free_skill, get_full_skill, get_full_product). No two tools overlap in function, and the descriptions explicitly clarify boundaries.

Naming Consistency3/5

Naming is a mix of verb_noun (list_products, get_free_skill, format_citation) and descriptive noun phrases (confidence_interval, sample_size, stats_describe). While all are readable and use snake_case, the lack of a consistent pattern (e.g., all verbs or all nouns) makes it harder to predict tool names.

Tool Count4/5

At 8 tools, the count is appropriate for the server's scope, which covers statistics, citation formatting, and product retrieval. It is not overburdened, and each tool seems justified. The number is slightly above the minimal threshold but well within a reasonable range.

Completeness2/5

The server's name 'research' suggests broader coverage, but the tool surface has notable gaps. Basic statistical tools like hypothesis tests (t-test, ANOVA), correlation, or proportion analysis are missing. The citation tool is limited to three styles. The product retrieval tools are tied to a specific product line, leaving a weak general research focus.

Resources