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 that declare readOnly and idempotent, description adds error behavior (never protocol error, returns structured error), retry safety, and method details (maximum variance, finite-population correction). No contradiction.

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?

Every sentence serves a purpose: definition, method, usage, error handling, safety. Well-structured and compact.

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 tool complexity (3 optional params, output schema exists), description covers purpose, method, example, error handling, retry guidance, and usage constraints. Output schema is implied via example.

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?

Schema coverage is 100%, so baseline is 3. Description adds value by explaining usage context for each parameter (e.g., 'population=0 means unknown'), providing a concrete example, and clarifying valid confidence_pct values.

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 states the tool calculates survey sample size with specific verb-resource, and explicitly distinguishes from siblings confidence_interval and stats_describe.

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?

Clearly states when to use ('before collecting data, to size a survey') and when not to, naming specific alternative tools for data already collected.

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

Each tool targets a distinct function: statistics tools for descriptive, inferential, and planning; product tools for listing, free skill, paid skill, and full product; and citation formatting. No overlap or ambiguity.

Naming Consistency4/5

Most tools follow a verb_noun or noun_verb pattern, but there is a mix: some are noun phrases (confidence_interval, sample_size, stats_describe) while others are verb phrases (format_citation, list_products). The naming is clear but not perfectly uniform.

Tool Count5/5

With 8 tools, the server covers two functional domains (statistics and product browsing) without being bloated. Each tool serves a clear purpose, and the count feels well-scoped.

Completeness4/5

The product domain is covered thoroughly (list, free skill, paid skill, full product). The statistics domain is missing hypothesis tests and more advanced analyses, but the included tools cover basic descriptive, confidence intervals, and sample size planning, which is reasonable for a 'research desk' scope.

Resources