Skip to main content
Glama

Schools API - US School Directory & District Lookup

us_schools_api
Read-onlyIdempotent

Official US K-12 school directory as JSON, no API key: 102,274 public and 22,510 private schools from NCES (2023-24) with NCES id, district, address, lat/lon, locale, grades, enrollment, teachers and student-teacher ratio. Search by name, city, state or ZIP, schools near a point or ZIP within N miles, one school by NCES id, all schools of a district with totals, bulk 50 queries. Usable from AI agents via MCP. Free: 5 calls/day per IP. Paid: Radar API key (from €9/mo at https://radarbg.com/pricing#starter via X-API-Key) or $0.02/call via x402 at https://radarbg.com/x402/us-schools-api.

Example tool call

This call uses example arguments supplied in the tool’s input schema.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "mode": "search",
      "name": "Lincoln",
      "state": "CA",
      "radiusMiles": 5
    },
    "name": "us_schools_api"
  }
}

Input Schema

NameRequiredDescriptionDefault
latNonear mode: centre latitude (use with lon instead of zip).
lonNonear mode: centre longitude.
zipNo5-digit ZIP. search: schools in this ZIP; near: centre of the radius.
cityNoCity name (search mode), e.g. Austin.
modeNosearch = filter by name/city/state/ZIP/district; near = schools within radiusMiles of lat/lon or a ZIP; school = one or more schools by NCES id; district = all schools of a district (LEAID or name) plus a summary row; bulk = up to 50 querie
nameNoPart of the school name, case-insensitive (search mode), e.g. Lincoln.
levelNoPublic schools only: elementary, middle, high, secondary, prekindergarten, other.
limitNo1-5000, default 100.
stateNo2-letter code or full name, e.g. CA or California.
ncesIdsNoschool mode: up to 50 NCES school ids (12-digit public NCESSCH or 8-character private PPIN).
queriesNobulk mode: up to 50 objects, each one an input of another mode, e.g. {"mode":"near","zip":"10001","radiusMiles":1}. A failing query returns an error row; the others still answer.
districtNoDistrict NCES LEAID (7 digits) or district name (search and district modes), e.g. 0622710 (Los Angeles Unified).
schoolTypeNopublic (default), private or all.
radiusMilesNonear mode: 0.1-50 miles, default 5. Rows are sorted by distanceMiles.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.5/5.0
Behavior5/5

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

Annotations already declare readOnlyHint, openWorldHint and idempotentHint, and the description still adds material operational context the annotations cannot carry: a free tier of 5 calls/day per IP, two paid paths (Radar API key via X-API-Key at a stated price, or $0.02/call via x402), and the bulk-mode failure semantics ('a failing query returns an error row; the others still answer'). That is exactly the kind of auth, quota and partial-failure disclosure an agent needs before calling.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The core capability and mode list are front-loaded in the opening sentences, and the schema-related vocabulary (mode names, field names) supports fast scanning. A few phrases are low-value padding — 'Usable from AI agents via MCP' and verbose pricing URL fragments — that could be trimmed without losing meaning.

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 14-parameter, multi-mode tool with no output schema, the description covers record provenance, available fields, mode behaviors, rate limits and auth paths, which is close to complete. The remaining gap is pagination/result-size behavior at the 1-5000 limit ceiling, which neither the description nor an output schema addresses.

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 already 100%, so the baseline is 3, but the description goes beyond the schema by explaining how parameters combine into modes and by naming output fields (NCES id, district, address, lat/lon, locale, grades, enrollment, teachers, student-teacher ratio). It does not add format hints the schema lacks (e.g., limit default, radius bounds), which keeps it below 5.

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 first sentence names a specific resource (official US K-12 school directory from NCES 2023-24) with concrete record counts and enumerated fields, then lists the five distinct query shapes (search, near, school, district, bulk). This is unambiguous and clearly distinct from every sibling tool listed (gas prices, drug lookup, geocoding).

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?

The description explains which inputs select which behavior — search by name/city/state/ZIP, near a point or ZIP within N miles, one school by NCES id, all schools of a district, bulk 50 queries — which effectively maps intent to mode. It does not state exclusions or explicitly contrast with a sibling, but no sibling overlaps this data domain, so the guidance is sufficient in practice.

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