Skip to main content
Glama

resolve_entity

Read-onlyIdempotent

Map an entity to a per-source identifier or reverse-map Wikidata and Data Commons anchors to the matching entity.

Instructions

Resolve an entity <-> per-source identifier, in either direction.

Forward (entity -> identifier), the default: resolve_entity(entity_type="country", entity_id=1, source="worldbank") -> {"identifier": "CN"} (or null when that source has no mapping)

Reverse (external anchor -> entity), pass identifier instead of the entity: wikidata (QID, e.g. Q148) and datacommons (DCID, e.g. country/CHN) are the anchor sources. resolve_entity(source="wikidata", identifier="Q148") -> {"match": {"entity_type": "country", "code": "CN", ...}} An identifier no entity carries returns {"match": null}, not an error.

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": "resolve_entity"
  }
}

Input Schema

NameRequiredDescriptionDefault
sourceNo
entity_idNo
identifierNo
entity_typeNo

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.9/5.0
Behavior3/5

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

Annotations already declare readOnly, idempotent and non-destructive, so safety is covered. The description adds genuinely useful behavior: a missing mapping yields a null payload rather than an error, in both forward and reverse directions. It stops there, without saying what happens on invalid source names or when neither entity nor identifier is supplied.

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 one-line summary followed by labeled modes with compact code-block examples; every sentence carries information. The formatting is slightly heavy for a four-parameter tool, but nothing is redundant.

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?

An output schema exists, so return values need not be explained, and the description still names the two anchor sources and the null semantics. The main residual gap is the absence of any statement about required/optional combinations and valid source values.

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 0%, so the description carries the full burden, and it does explain the two parameter pairs (entity_type+entity_id+source versus source+identifier) plus concrete formats such as QIDs and DCIDs. However it never enumerates allowed entity_type values beyond "country" and never states that all four parameters are optional or what an all-null call does.

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 (resolve) and the two-directional resource relationship (entity <-> per-source identifier) up front. The forward and reverse modes are each illustrated with a concrete call and response, so an agent can tell exactly what the tool produces for each direction.

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?

Explicitly names the default mode (forward, entity -> identifier) and the condition that selects the alternative (pass `identifier` instead of the entity, for wikidata/datacommons anchors). It does not address when to prefer this over get_entity or add_entity_identifier, but the in-tool mode selection is unambiguous.

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