Skip to main content
Glama

APJ RAISE Research

Survey sample size

sample_size
Read-only

Calculates how many survey responses are needed to estimate a proportion (Cochran formula, with finite population correction), and how many people to invite for an expected response rate. Use for surveys and questionnaires. For comparing groups or testing effects, use power_analysis instead.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "sample_size"
  }
}

Input Schema

NameRequiredDescriptionDefault
confidenceNoConfidence level %. Default 95.
populationNoTotal population size, if known (e.g. 2000 students). Leave out if very large.
response_rateNoExpected response rate %. Default 100.
margin_of_errorNoMargin of error %. Default 5.
expected_proportionNoExpected % answering a certain way. Default 50 (safest).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true, destructiveHint=false and openWorldHint=true, so the safety profile is covered. Beyond that the description discloses the statistical method and that two outputs are produced (sample needed and invitations to send), which is meaningful context for trusting the numbers. It stops short of describing output shape or how results are rounded, so it is strong but not exhaustive.

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?

Two sentences, both front-loaded with the essential information: what is computed first, then the routing rule. No filler, no restatement of the title.

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 stateless calculator with all-optional parameters and full schema coverage, the definition covers method, scope and alternative adequately. The only minor gap is that with no output schema the exact return structure (two figures, units) is described only in prose rather than precisely.

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 description coverage is 100% and every parameter already documents its meaning and default (95, 100, 5, 50, population optional). The description only alludes to 'expected response rate' and the finite population correction, adding no syntax or guidance 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.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description names a specific verb and resource ('calculates how many survey responses are needed') and specifies the method (Cochran formula with finite population correction) plus the second quantity computed (invitees given a response rate). It also distinguishes itself from power_analysis by naming that sibling, so an agent can pick between them without opening either schema.

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?

It gives a positive use case ('surveys and questionnaires') and an explicit exclusion with the alternative to use instead ('For comparing groups or testing effects, use power_analysis instead'). The routing decision is fully stated rather than implied.

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.

Resources