Skip to main content
Glama

Levels.fyi

search-locations

Read-only

Search locations (countries, metro areas / DMAs, US states and cities) using searchText input (required) and get their Levels.fyi slugs. Use this to resolve a location name (e.g. "San Francisco", "United States") into the slug the benchmark tools require in their locationSlugs filter. Each result includes its location type. Optionally restrict to one type. Results can include cities; pass a city's own slug to the pay tools. When a tool says a city has too little data, pass its parent location instead (a metro, or the country where there is none). Search by place name alone: "Cambridge", not "Cambridge, MA". Several places can share a name: pick the one the user means from context, and ask if unsure. If this returns no matches, fall back to search-all, which searches every entity type and applies a fuzzy fallback. REQUIRED arguments: searchText.

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": {
      "searchText": "<searchText>"
    },
    "name": "search-locations"
  }
}

Input Schema

NameRequiredDescriptionDefault
typeNoRestrict results to one location type. Omit to search countries, metros (DMAs) and states together, with matching cities after them.
limitNoMax results to return (1–15).
searchTextYesLocation name to search for (country, metro area / DMA, or US state).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / additionalProperties
      Added value: +false
  2. Changed1 schema field changed
    • changedInput schema / properties / type / description
      Previous value: -"Restrict results to one location type. Omit to search countries, metros (DMAs), and states together. Cities are only returned with type \"city\"."New value: +"Restrict results to one location type. Omit to search countries, metros (DMAs) and states together, with matching cities after them."
  3. First observed

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already establish readOnly/destructive/openWorld semantics, so the bar is lower, yet the description adds real behavior: results are ordered with countries/metros/states first and matching cities after, each result carries its type, and name collisions are possible with an instruction to disambiguate with the user. It doesn't describe pagination or an exact result shape, which keeps it short of a 5.

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?

Front-loaded with purpose and the slug-resolution rationale, then progressively finer guidance. It is dense but every sentence carries actionable content; the closing "REQUIRED arguments: searchText" is redundant with the schema and adds minor waste.

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 resolver tool with no output schema, the description covers what results contain (slug plus location type), ordering, ambiguity handling, and the failure/fallback path. The only gap is not illustrating a slug's actual format, which an agent could infer from sample results at call time.

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 the schema already documents searchText, type, and limit (1–15). The description adds some genuine meaning for searchText — use a bare place name without state qualifiers — but says nothing extra about limit and only echoes the optional type restriction. Baseline 3 is appropriate.

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 and resource ("Search locations") plus the exact output (Levels.fyi slugs) and the entity types covered (countries, DMAs, states, cities). It clearly separates itself from search-all and the benchmark/pay tools by framing the result as an input (locationSlugs) for those tools.

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?

Explicitly says when to use it (resolving a location name into a slug for the locationSlugs filter), gives the fallback path ("If this returns no matches, fall back to search-all"), and even prescribes input form ("Search by place name alone: 'Cambridge', not 'Cambridge, MA'"). The city-vs-parent-location rule ("When a tool says a city has too little data, pass its parent location instead") is a concrete when/when-not distinction.

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.