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 marks the favored statements for a property; check qualifiers and references for temporal scope and evidence.

Input 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

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

A4.6/5.0
Behavior5/5

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

Annotations only declare readOnly/idempotent/openWorld; the description adds substantial non-obvious behavior: the 24,000-byte pre-label threshold, the 'outline' response kind with per-P-ID byte sizes, the retrieval_notice suggesting a workable subset, the fact that labels are added after the size check so results can exceed the limit, and that a single requested property is always returned whole. That is exactly the kind of operational detail annotations cannot convey.

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?

Purpose is front-loaded and every sentence carries operational value. The middle sentences are long and pack multiple clauses (size check, labels, single-property exception), which slightly hurts skimmability but no content is filler.

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

Completeness5/5

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

Given an output schema exists, the description does not need to explain return values, yet it still covers the critical edge case of the 'outline' payload and how to recover from it. Combined with annotations and full schema coverage, an agent has everything needed to call this correctly on both small and huge entities.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so baseline is 3, but the description adds real meaning: omitting properties returns all statements, label resolution applies to values, qualifiers and references, and the requested P-ID set determines the byte budget. It does not elaborate on language or resolve_labels interplay beyond what the schema already states.

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?

Opening sentence names a specific verb and resource ('Fetch property claims for a Wikidata entity') and immediately scopes it with 'qualifier and reference detail'. This distinguishes it from siblings like wikidata_get_entity, wikidata_get_labels, and wikidata_sparql_query without needing their schemas.

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?

Gives explicit guidance on the properties parameter ('omitting it returns every statement' and to narrow for well-connected items) and states the intended use case: 'Designed for fact verification'. It stops short of naming which sibling to reach for instead when this tool isn't appropriate (e.g., sparql_query for cross-entity queries).

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.