Get Wikidata Entity
wikidata_get_entityFetch a Wikidata entity (item or property) by QID or PID. The fields parameter narrows the upstream fetch, not just the response — asking for labels alone costs a fraction of the whole entity, so name the fields you need. Omit fields for all data; a well-connected item is large enough to overflow, and an oversized entity returns kind: "outline" — the field categories with their byte sizes — instead of the data. Follow its retrieval_notice literally rather than picking from sections yourself — it names a fields set already measured to fit, since category sizes are additive and requesting them all would overflow again; for a category too large to deliver whole (statements or sitelinks on a major item) it names the sibling tool that can narrow it. Q-IDs (e.g. Q76) fetch items; P-IDs (e.g. P31) fetch properties from the correct endpoint automatically. Use wikidata_get_statements for deep claim traversal with label resolution, and whenever an entity's statements are large — its properties parameter selects individual P-IDs, granularity fields does not carry.
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": {
"id": "<id>"
},
"name": "wikidata_get_entity"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | Q-ID (e.g., "Q76") or P-ID (e.g., "P31"), bare or as an entity URI or wd: form (e.g., "http://www.wikidata.org/entity/Q76", "wd:Q76"). Case-insensitive — normalized to uppercase. | |
| fields | No | Fields to include. Options: "labels", "descriptions", "aliases", "statements", "sitelinks". Narrows the upstream fetch as well as the response, so a narrow selection is markedly cheaper. Omit for all fields. | |
| languages | No | Wikidata language codes to include in labels, descriptions, and aliases (e.g., ["en", "de"]). Case-insensitive; "_" is read as "-"; blank entries are dropped. A requested language with no label of its own falls back to the entity's multilingual ("mul") value, returned under the requested code. Omit, or send an empty list, to return all available languages. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | No | Resolved entity ID (e.g., "Q76" or "P31"). | |
| kind | No | full — the requested field categories carry their data. outline — the entity overflowed the inline byte budget, so sections lists the categories with their byte sizes instead, and retrieval_notice names how to fetch each one. The id and type are present either way. | |
| type | No | Entity type: "item" or "property". | |
| error | No | Present when the call failed. Absent on success. | |
| labels | No | Map of language code to label string (e.g., {"en": "Barack Obama", "de": "Barack Obama"}). | |
| aliases | No | Map of language code to list of alias strings (e.g., {"en": ["Barack H. Obama", "President Obama"]}). | |
| sections | No | Present when kind = outline: the entity's field categories, largest first, each with its byte size. Sizes are additive — a set of categories is only retrievable together if their total fits the budget, so follow retrieval_notice rather than requesting every name listed here. | |
| data_type | No | Property data type (e.g., "wikibase-item", "external-id"). Present on properties only. | |
| sitelinks | No | Map of site code (e.g., "enwiki") to sitelink metadata with title, url, and badges fields. | |
| statements | No | Map of property ID to array of raw statement objects. Use wikidata_get_statements for resolved claims with label resolution, and whenever this entity's statements are large — its properties parameter selects individual P-IDs, granularity fields does not carry. | |
| descriptions | No | Map of language code to description string (e.g., {"en": "44th President of the United States"}). | |
| fieldsReturned | No | Which fields were requested. In outline mode these are the categories the outline covers, not data returned. | |
| redirectedFrom | No | The normalized requested ID when it redirects to id. | |
| retrieval_notice | No | Present when kind = outline: the next call to make, and the authoritative one to follow. It names a literal fields set already measured to fit the budget, defers any category that would not fit alongside it, and for a category too large for fields to deliver at all names the sibling tool (wikidata_get_statements, wikidata_get_sitelinks) or the languages parameter that can narrow it. |