Skip to main content
Glama

Compare areas for a business

compare_areas
Read-onlyIdempotent

Rank areas by market per competing business for a category (the opportunity score).

Each area gets a yearly market in euros, estimated competing businesses and an opportunity score against its region, all with ranges. Areas are ranked by the cautious (low) end of the score; areas too small for the category are left out and counted. Use for "where in Valladolid should I open a gym" or "which towns in Málaga province lack pharmacies".

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
levelNo'district' or 'tract' within a municipality; 'municipality' within a province or region.auto
limitNoHow many areas to return, best first.
withinYesA municipality (compares its districts or tracts) or a province or region (compares its municipalities).
categoryYesBusiness category: restaurant, cafe, bar, fast_food, bakery, butcher, greengrocer, supermarket, pharmacy, optician, dentist, physiotherapy, hairdresser, beauty_salon, veterinary, gym, childcare, private_school, clothes, home. Plain words work too ('gyms', 'peluquerías').

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
dataYes
checksNo
sourcesYes
confidenceYesLowest confidence across inputs: high, medium or low. Never state a conclusion more strongly than this.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changed
    • addedOutput schema / $defs / Place / properties / area_names
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "For districts and tracts: OpenStreetMap neighbourhood names inside it (not official INE names).",
      +  "title": "Area Names"
      +}
    • changedOutput schema / $defs / Place / properties / match / description
      Previous value: -"How the query matched. 'fuzzy' means a spelling guess: confirm it."New value: +"How the query matched. 'fuzzy' means a spelling guess: confirm it. 'neighbourhood' means a neighbourhood name was found inside this INE district."
    • changedOutput schema / $defs / Place / properties / match / enum
      Previous value: -[
      -  "code",
      -  "exact",
      -  "prefix",
      -  "fuzzy"
      -]New value: +[
      +  "code",
      +  "exact",
      +  "prefix",
      +  "fuzzy",
      +  "neighbourhood"
      +]
    • addedOutput schema / $defs / Place / properties / matched_name
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "The neighbourhood name that matched, if any.",
      +  "title": "Matched Name"
      +}
  2. First observed

TDQS

A4.3/5.0
Behavior5/5

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

Annotations already cover safety and idempotency, and the description adds substantial behavioral context: what each area returns (yearly market in euros, estimated competitors, opportunity score with ranges), how areas are ranked (by the cautious low end), and that areas too small are excluded and counted.

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 description is front-loaded with the core ranking purpose and moves efficiently through output details and examples. It is appropriately sized, though the middle sentence partially repeats what the output schema likely covers, keeping it just short of maximally concise.

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?

Given the rich schema, annotations, and an output schema, the description is nearly complete: it covers purpose, usage, output shape, ranking, and exclusion behavior. It still lacks explicit alternative-tool routing and does not mention the limit parameter's behavior, leaving a small gap for a multi-tool environment.

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%, so all four parameters are already documented in the schema. The description adds only contextual phrasing like 'for a category' and does not provide additional parameter syntax, defaults, or constraints beyond what the schema supplies.

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 states a specific verb and resource: ranking areas by market per competing business for a category. It identifies the core output as the opportunity score and gives concrete examples, which differentiates it from sibling tools like market_size or catchment.

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 gives clear usage examples ('where in Valladolid should I open a gym') that establish when to use the tool. However, it does not name alternatives or state when not to use it, so the routing guidance is present but incomplete.

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.