Skip to main content
Glama

Get Wikidata Statements

wikidata_get_statements
Read-onlyIdempotent

Fetch property claims for a Wikidata entity with qualifier and reference detail. Item QIDs and quantity units — in values, qualifiers, and references — are resolved to human-readable labels by default. Use the properties parameter to fetch only specific P-IDs — omitting it returns every statement, and a well-connected item (a country, a major city) carries hundreds of properties: more than fits inline. A set over 24,000 bytes before labels comes back as kind: "outline" — every available P-ID with its byte size, largest first — instead of the statements; re-call with the same id plus properties:[...] naming P-IDs whose sizes sum to 24,000 or less (the retrieval_notice names one such set). Labels are added after that check, so a returned set can run past 24,000 bytes by their size, and a property requested alone is always returned whole — on a major item one property can run to hundreds of kilobytes. Designed for fact verification: "what does Wikidata say about this entity's {property}?". Preferred-rank statements are the most current values.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesQ-ID (e.g., "Q76") or P-ID of the entity to fetch statements for.
languageNoWikidata language code for label resolution of QID values (e.g., "en", "de"). Case-insensitive; "_" is read as "-"; blank means "en".en
propertiesNoP-IDs to fetch (e.g., ["P31", "P569", "P27"]). Omit to return all properties (may be large for major items).
resolve_labelsNoResolve item QIDs (label) and quantity unit QIDs (unitLabel) to human-readable labels via one batched label call, covering main values, qualifiers, and reference parts. Set to false to skip label resolution and return raw QIDs only (faster, smaller payload).

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
idNoThe entity ID whose statements were fetched.
kindNofull — statements carries the claims. outline — the statement set overflowed the inline byte budget, so sections lists the P-IDs available instead; re-call with properties:[...] to retrieve specific ones. The counts below are reported either way.
errorNoPresent when the call failed. Absent on success.
sectionsNoPresent when kind = outline: the P-IDs this entity carries statements for, largest first, each sized as the UTF-8 bytes it adds to a response before labels. Sizes add up: copy names whose sizes sum to 24,000 or less into the properties input to retrieve them.
statementsNoMap of property ID to array of normalized statements. Each statement has id, rank, property, value (with type-specific fields), optional qualifiers ([{ property, value }]), and optional references — one entry per source in upstream order, each { parts: [{ property, value }] }. Present in full mode; omitted in outline mode.
propertyCountNoNumber of distinct properties — those returned in full mode, those offered as sections in outline mode.
labelsResolvedNoTrue when the returned statements had labels resolved: resolve_labels was true and kind is full, so every item QID and quantity unit that resolved carries its label. False when resolve_labels was false, and on an outline, which carries no statements and makes no label lookup.
statementCountNoTotal number of statement objects across all properties. Counted before any overflow, so it reports the entity's full statement volume in both modes.
retrieval_noticeNoPresent when kind = outline: how to re-call for specific properties.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed6 schema fields changed
    • changedInput schema / properties / language / description
      Previous value: -"Language code for label resolution of QID values (e.g., \"en\", \"de\")."New value: +"Wikidata language code for label resolution of QID values (e.g., \"en\", \"de\"). Case-insensitive; \"_\" is read as \"-\"; blank means \"en\"."
    • addedInput schema / properties / language / pattern
      Added value: +"^\\s*(?:[A-Za-z]{2,8}(?:[-_][A-Za-z0-9]{1,9})*\\s*)?$"
    • changedInput schema / properties / resolve_labels / description
      Previous value: -"Resolve wikibase-item value QIDs to human-readable labels via a batched label call. Set to false to skip label resolution and return raw QIDs only (faster, smaller payload)."New value: +"Resolve item QIDs (label) and quantity unit QIDs (unitLabel) to human-readable labels via one batched label call, covering main values, qualifiers, and reference parts. Set to false to skip label resolution and return raw QIDs only (faster, smaller payload)."
    • changedOutput schema / properties / labelsResolved / description
      Previous value: -"True when QID values were resolved to labels. False when resolve_labels was set to false."New value: +"True when the returned statements had labels resolved: resolve_labels was true and kind is full, so every item QID and quantity unit that resolved carries its label. False when resolve_labels was false, and on an outline, which carries no statements and makes no label lookup."
    • changedOutput schema / properties / sections / description
      Previous value: -"Present when kind = outline: the P-IDs this entity carries statements for, largest first. Copy names into the properties input to retrieve them."New value: +"Present when kind = outline: the P-IDs this entity carries statements for, largest first, each sized as the UTF-8 bytes it adds to a response before labels. Sizes add up: copy names whose sizes sum to 24,000 or less into the properties input to retrieve them."
    • changedOutput schema / properties / statements / description
      Previous value: -"Map of property ID to array of normalized statements. Each statement has id, rank, property, value (with type-specific fields), and optional qualifiers and references arrays. Present in full mode; omitted in outline mode."New value: +"Map of property ID to array of normalized statements. Each statement has id, rank, property, value (with type-specific fields), optional qualifiers ([{ property, value }]), and optional references — one entry per source in upstream order, each { parts: [{ property, value }] }. Present in full mode; omitted in outline mode."
  2. Changed1 schema field changed
    • changedOutput schema / properties / error / properties / data / properties / reason / description
      Previous value: -"Machine-readable failure mode. Declared by this tool: `entity_not_found`: No entity exists at this QID — either unassigned or out of range. `invalid_id`: ID is not a valid Q-ID or P-ID format. `invalid_property`: A properties entry is not a valid P-ID format. Other values are possible when a failure originates below the handler."New value: +"Machine-readable failure mode. Declared by this tool: `entity_not_found`: No entity exists at this ID — either unassigned or out of range. `invalid_id`: ID is not a valid Q-ID or P-ID format. `invalid_property`: A properties entry is not a valid P-ID format. Other values are possible when a failure originates below the handler."
  3. Changed6 schema fields changed
    • changedInput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
    • addedInput schema / additionalProperties
      Added value: +false
    • changedOutput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
    • addedOutput schema / anyOf
      Added value: +[
      +  {
      +    "not": {
      +      "required": [
      +        "error"
      +      ]
      +    },
      +    "required": [
      +      "id",
      +      "kind",
      +      "propertyCount",
      +      "statementCount",
      +      "labelsResolved"
      +    ]
      +  },
      +  {
      +    "required": [
      +      "error"
      +    ]
      +  }
      +]
    • addedOutput schema / properties / error
      Added value: +{
      +  "additionalProperties": {},
      +  "description": "Present when the call failed. Absent on success.",
      +  "properties": {
      +    "code": {
      +      "description": "JSON-RPC error code for this failure.",
      +      "maximum": 9007199254740991,
      +      "minimum": -9007199254740991,
      +      "type": "integer"
      +    },
      +    "data": {
      +      "additionalProperties": {},
      +      "properties": {
      +        "reason": {
      +          "description": "Machine-readable failure mode. Declared by this tool: `entity_not_found`: No entity exists at this QID — either unassigned or out of range. `invalid_id`: ID is not a valid Q-ID or P-ID format. `invalid_property`: A properties entry is not a valid P-ID format. Other values are possible when a failure originates below the handler.",
      +          "examples": [
      +            "entity_not_found",
      +            "invalid_id",
      +            "invalid_property"
      +          ],
      +          "type": "string"
      +        },
      +        "recovery": {
      +          "additionalProperties": {},
      +          "description": "Actionable next step for the caller.",
      +          "properties": {
      +            "hint": {
      +              "type": "string"
      +            }
      +          },
      +          "required": [
      +            "hint"
      +          ],
      +          "type": "object"
      +        },
      +        "retryable": {
      +          "description": "Whether retrying may succeed.",
      +          "type": "boolean"
      +        }
      +      },
      +      "type": "object"
      +    },
      +    "message": {
      +      "description": "Human-readable description of what went wrong.",
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "code",
      +    "message"
      +  ],
      +  "type": "object"
      +}
    • removedOutput schema / required
      Removed value: -[
      -  "id",
      -  "kind",
      -  "propertyCount",
      -  "statementCount",
      -  "labelsResolved"
      -]
  4. Changed7 schema fields changed
    • addedOutput schema / properties / kind
      Added value: +{
      +  "description": "full — statements carries the claims. outline — the statement set overflowed the inline byte budget, so sections lists the P-IDs available instead; re-call with properties:[...] to retrieve specific ones. The counts below are reported either way.",
      +  "enum": [
      +    "full",
      +    "outline"
      +  ],
      +  "type": "string"
      +}
    • changedOutput schema / properties / propertyCount / description
      Previous value: -"Number of distinct properties returned."New value: +"Number of distinct properties — those returned in full mode, those offered as sections in outline mode."
    • addedOutput schema / properties / retrieval_notice
      Added value: +{
      +  "description": "Present when kind = outline: how to re-call for specific properties.",
      +  "type": "string"
      +}
    • addedOutput schema / properties / sections
      Added value: +{
      +  "description": "Present when kind = outline: the P-IDs this entity carries statements for, largest first. Copy names into the properties input to retrieve them.",
      +  "items": {
      +    "additionalProperties": false,
      +    "description": "An available property — its P-ID and the serialized byte size of its statements.",
      +    "properties": {
      +      "bytes": {
      +        "description": "Serialized byte size of the section",
      +        "maximum": 9007199254740991,
      +        "minimum": 0,
      +        "type": "integer"
      +      },
      +      "name": {
      +        "description": "Section identifier — pass in `sections` to retrieve it",
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "name",
      +      "bytes"
      +    ],
      +    "type": "object"
      +  },
      +  "type": "array"
      +}
    • changedOutput schema / properties / statementCount / description
      Previous value: -"Total number of statement objects across all properties."New value: +"Total number of statement objects across all properties. Counted before any overflow, so it reports the entity's full statement volume in both modes."
    • changedOutput schema / properties / statements / description
      Previous value: -"Map of property ID to array of normalized statements. Each statement has id, rank, property, value (with type-specific fields), and optional qualifiers and references arrays."New value: +"Map of property ID to array of normalized statements. Each statement has id, rank, property, value (with type-specific fields), and optional qualifiers and references arrays. Present in full mode; omitted in outline mode."
    • changedOutput schema / required
      Previous value: -[
      -  "id",
      -  "statements",
      -  "propertyCount",
      -  "statementCount",
      -  "labelsResolved"
      -]New value: +[
      +  "id",
      +  "kind",
      +  "propertyCount",
      +  "statementCount",
      +  "labelsResolved"
      +]
  5. First observed

TDQS

Score is being calculated.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.