Skip to main content
Glama

Margin of Error Calculator

margin_of_error
Read-only

Compute the margin of error for a survey sample at the 90, 95, or 99 percent confidence level, assuming maximum variance proportions.

Input Schema

NameRequiredDescriptionDefault
nYesSample size, above zero
confidenceNoConfidence level percent (default 90)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.8/5.0
Behavior4/5

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

Annotations already establish the safety profile (readOnlyHint=true, destructiveHint=false, closed-world), so the description only needs to add modeling context. It does so usefully by disclosing the 'maximum variance proportions' assumption (i.e., p=0.5), which materially changes the numeric result and is not encoded anywhere in the schema.

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 with no filler; all three clauses (what it computes, the confidence levels, the variance assumption) carry information. Nothing is wasted or buried.

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 two-parameter, annotation-backed tool with no output schema, the description covers the computation and its key assumption. It does not state the output's form (e.g., a plus/minus percentage), a minor gap for an agent interpreting the result.

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 'n' and the confidence enum are fully documented in the schema. The description restates the allowed confidence levels but adds nothing about the default (90) or the meaning of the sample-size input, so baseline 3 is appropriate.

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?

The description gives a specific verb (compute) and resource (margin of error for a survey sample), plus the supported confidence levels and the variance assumption. It is unambiguous, though it never explicitly differentiates itself from the many other calculator siblings, so it lands just below the top tier.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Usage is only implied by the phrase 'for a survey sample.' There is no explicit when-to-use statement, no exclusion of related tools (e.g., how this differs from a sample-size or confidence-interval calculation), and no statements about prerequisites for the input data.

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.