Skip to main content
Glama

wikidata_lookup

Find real Wikidata items for a query and check their types against an expected QID. Returns annotated candidates with descriptions; leave field empty if no match.

Instructions

Find real Wikidata items for a term, and type-check them.

Call it for every Wikidata topic or keyword destined for a nanopub field. It returns candidates with their descriptions and real P31/P279 types; it deliberately does NOT choose one, because picking the right sense of an ambiguous label is a judgement. What it guarantees is that the QID you publish exists and is what you say it is.

Pass expected_type as a QID (e.g. Q16521 taxon, Q11862829 academic discipline) and each candidate is marked typeMatches from its actual statements. Candidates are annotated, never filtered — a near miss is often the informative result. Searching "Bombus" with Q16521, for instance, returns the insect genus as a match and the album of the same name as not.

A zero-candidate result means leave the field empty or try another label. Never fall back to a QID from memory.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNo
queryYes
expected_typeNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.2

TDQS

A4.6/5.0
Behavior5/5

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

With no annotations provided, the description carries the full behavioral burden. It transparently discloses that the tool returns candidates with descriptions and P31/P279 types, marks typeMatches, annotates rather than filters, and deliberately does not choose a single result. This gives the agent a clear mental model of the tool's behavior.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is organized into three tight paragraphs, each earning its place: purpose, expected_type behavior with an example, and zero-candidate handling. No filler or redundant phrases; it is informative without being bloated.

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 no output schema and no annotations, the description covers return values, type-checking behavior, and failure handling well. The only notable omission is `limit`, but the tool's core contract is clear enough for an agent to use it correctly.

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 compensate. It explains `query` indirectly as 'a term' and `expected_type` well with concrete QID examples and its effect on candidate matching. However, `limit` is never mentioned, leaving one of three parameters semantically undocumented.

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 opens with a specific verb and resource: 'Find real Wikidata items for a term, and type-check them.' It clearly distinguishes the tool's role from siblings by scoping it to 'every Wikidata topic or keyword destined for a nanopub field' and by explicitly noting it does not choose among ambiguous candidates.

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?

The description gives explicit when-to-use guidance ('Call it for every Wikidata topic or keyword destined for a nanopub field') and when-not behavior ('A zero-candidate result means leave the field empty or try another label'). It also warns against a common misuse: 'Never fall back to a QID from memory.'

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