Skip to main content
Glama

Find similar hexes (embeddings)

find_similar
Read-onlyIdempotent

Rank H3 hexes by cosine similarity to a query embedding and exclude existing sites to surface untapped look-alike locations for retail site selection.

Instructions

Method 2. Rank hexes by cosine similarity of Esri's USA Geodemographic Embeddings to a query. query = "independent_shops" (all hexes that hold an independent coffee shop) or a list of H3 r7 ids. exclude_existing drops query hexes and hexes that already have an independent shop ("untapped look-alikes"). engine: auto (precomputed Esri run for the default query, numpy for custom queries), arcpy (live FindSimilarFeaturesUsingEmbeddings, needs ArcGIS Pro Advanced; ~1 min), numpy, or open_proxy (no Esri data).

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "find_similar"
  }
}

Input Schema

NameRequiredDescriptionDefault
queryNoindependent_shops
top_nNo
engineNoauto
exclude_existingNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.6/5.0
Behavior3/5

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

Annotations already declare readOnly, idempotent, non-destructive, so safety is covered. The description adds genuine beyond-schema context: arcpy requires ArcGIS Pro Advanced and takes ~1 minute, auto falls back to a precomputed run versus numpy, and open_proxy has no Esri data. It does not say what a degraded open_proxy result looks like, so the disclosure is useful but incomplete.

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 action is front-loaded in the first sentence and the remaining lines are dense, non-redundant notes on query, filtering, and engine choice. The unexplained "Method 2" opener and the fragment-style line breaks cost it a point.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/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 should imply what comes back, and it only says "rank hexes" without describing the shape of results or scoring. With four undocumented-in-schema parameters and an unexplained "Method 2" reference, it is adequate but leaves real gaps.

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 0%, so the description must carry parameter meaning and it covers three of four: query formats and default, exclude_existing semantics, and the four engine values with their requirements. top_n is never mentioned, leaving its range and interaction with ranking unexplained.

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?

States a specific verb and resource: rank hexes by cosine similarity of Esri geodemographic embeddings to a query. That is far more informative than the title alone. It does not distinguish itself from siblings (hot_spots, hex_profile), and the leading "Method 2" is never explained, so a 4 rather than a 5.

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 real conditional guidance: the query can be the default "independent_shops" preset or a custom list of H3 r7 ids, exclude_existing yields "untapped look-alikes", and each engine has a stated tradeoff. It stops short of saying when to pick this over a sibling tool, so it is clear context without explicit alternatives.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.