Skip to main content
Glama

find_counterparts

Find nearest geopolitical or urban counterparts for a specified country or city using 1024-dimensional vector cosine distance, with optional filters and result limits.

Instructions

Find nearest geopolitical or urban counterparts to a specified country or city using 1024-dimensional pgvector cosine distance.

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": {
      "entity_type": "<entity_type>",
      "id": "<id>"
    },
    "name": "find_counterparts"
  }
}

Input Schema

NameRequiredDescriptionDefault
idYesID of the country or city
limitNoNumber of nearest neighbors to return (default: 10)
country_idNoOptional country ID to filter counterpart candidates (for city counterparts)
entity_typeYesEntity type to find counterparts for: country or city
continent_idNoOptional continent ID to filter counterpart candidates
include_embeddingNoWhether to include raw 1024-float vector embeddings in results

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

C2.9/5.0
Behavior2/5

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

No annotations are provided, so the description carries the full disclosure burden. It reveals the similarity metric (cosine distance over 1024-dim pgvector embeddings), which implies ranked nearest-neighbor output, but says nothing about ordering guarantees, behavior when an entity lacks an embedding, error conditions, or the shape of the result. For a read tool with zero annotation coverage this is a substantial gap.

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?

A single well-formed sentence with the resource front-loaded and no wasted framing. The phrase "1024-dimensional pgvector cosine distance" is an implementation detail an agent arguably does not need, which keeps it from a 5.

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

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Six parameters, no output schema, and no annotations mean the description should explain prerequisites and result characteristics, but it does neither. An agent knows what the tool does conceptually but not what it gets back or what must hold true before calling it.

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 every parameter including the limit, country_id, continent_id filters and include_embedding flag is already documented in the schema. The description adds no syntax or semantics beyond what the schema states; baseline 3 applies.

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?

The description has a specific verb ("Find") and resource ("nearest geopolitical or urban counterparts") scoped precisely to a country or city, matching the entity_type enum. It is clear what the tool returns, though it does not distinguish itself from any specific alternative tool, since no sibling shares this behavior.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

There is no when-to-use guidance, no mention of prerequisites (e.g., that generate_country_embedding or generate_city_embedding may need to have run first), and no statement about when to prefer this over list_countries or compute_clusters. The agent must infer the calling context entirely.

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