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. Value QIDs 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. An oversized set 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 the P-IDs you want. 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.
languageNoLanguage code for label resolution of QID values (e.g., "en", "de").en
propertiesNoP-IDs to fetch (e.g., ["P31", "P569", "P27"]). Omit to return all properties (may be large for major items).
resolve_labelsNoResolve 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).

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. Copy names 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), and optional qualifiers and references arrays. 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 QID values were resolved to labels. False when resolve_labels was set to false.
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 / $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"
      -]
  2. 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"
      +]
  3. First observed

TDQS

A4.7/5.0
Behavior5/5

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

Beyond the read-only and idempotent annotations, the description discloses meaningful behaviors: default QID-to-label resolution, the outline fallback for oversized result sets, the need to re-call with selected P-IDs, and the preferred-rank currency note. This goes well beyond what annotations alone convey.

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 dense but efficient: primary function first, then payload-size caveat, then the outline recovery mechanism, then the intended use case. Every sentence contributes actionable information with no redundancy.

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?

With a rich output schema, complete parameter documentation, and annotations covering safety, the description still adds the missing behavioral context: oversize handling, label resolution defaults, and rank semantics. Nothing critical is missing for an agent to select and invoke this tool correctly.

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 complete at 100%, so the parameters are already documented. The description adds useful semantic context beyond the schema: what happens when properties is omitted, the outline response shape, and the effect of label resolution on payload size and speed.

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+resource ('Fetch property claims for a Wikidata entity') and adds detail about qualifiers, references, and label resolution. It clearly distinguishes itself from sibling tools like get_entity, get_labels, and sparql_query, which serve different purposes.

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?

The description gives practical guidance: use the properties parameter to narrow to specific P-IDs, and expect a large result set if omitted. It also characterizes the tool as designed for fact verification, which signals an appropriate use case, though it does not explicitly name when-not-to-use alternatives.

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.