Skip to main content
Glama

ZIP codes within a radius

zip_codes_within_radius
Read-onlyIdempotent

Every US ZIP code whose centre lies within a radius of each of up to 50 places, nearest first, with its city, state, straight-line distance and population (people). A place is a US ZIP code, an address (looked up first) or a latitude/longitude point; the radius goes up to 100 miles. people_only leaves out ZIP codes where nobody lives: PO boxes, single buildings and businesses. Up to 500 ZIP codes are listed a place: count is the total and more says how many were left out. Costs $0.001 per place found, plus $0.001 for each different address looked up; places not found and failed calls are free. US ZIP codes only.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "places": "<places>",
      "radius": "<radius>"
    },
    "name": "zip_codes_within_radius"
  }
}

Input Schema

NameRequiredDescriptionDefault
unitsNoDistance units: miles or kilometers.mi
placesYesThe places to list ZIP codes around.
radiusYesThe radius in units, up to 100 miles (160 km). A ZIP code is listed when its centre is inside the circle.
people_onlyNoOnly ZIP codes where people live: leaves out PO box, single-building and business-only ZIP codes.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.2/5.0
Behavior3/5

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

Annotations already declare readOnlyHint, idempotentHint, openWorldHint and destructiveHint=false, so the safety profile is covered. The description adds genuinely useful behavior beyond that: nearest-first ordering, a 500-result cap per place with 'count'/'more' for truncation, lookup side effects for addresses, and pricing ($0.001 per place, extra for address lookups, free for misses and failures). This is strong disclosure, but the 3 reflects that it never covers pagination controls or what a partially failed multi-place call looks like in the result.

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?

Four dense sentences, front-loaded with the result shape and ordering, followed by input semantics, truncation, and cost. No filler, though the opening clause ('within a radius of each of up to 50 places, nearest first') is syntactically heavy and could be split for readability.

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?

There is no output schema, so the description must carry the return contract — and it does: per-ZIP fields, ordering, the 500-item cap, and the count/more truncation indicators. Combined with cost, failure handling and the US-only constraint, an agent has everything needed to call this correctly.

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, but the description goes beyond the schema: it explains that a place string is first looked up as an address (implying an extra geocoding step and cost), that radius is measured from ZIP centroids, and that people_only excludes PO box, single-building and business-only ZIPs. Only 'units' is left to the schema entirely.

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?

States a specific verb+resource with full scope: 'Every US ZIP code whose centre lies within a radius... nearest first' and enumerates the returned fields (city, state, distance, population). This clearly separates it from point-oriented siblings like geocode, reverse_geocode or nearest_location.

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?

Gives concrete operating context: up to 50 places, radius capped at 100 miles, US ZIP codes only, and a people_only filter for PO boxes/business-only codes. It does not explicitly say when to prefer a sibling tool (e.g. nearest_location or distance) over this one, so it stops short of full routing guidance.

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