Skip to main content
Glama

Get Wikidata Labels

wikidata_get_labels
Read-only

Resolve one or more QIDs or PIDs to their human-readable labels and descriptions. Lightweight — returns no claim data. Supports up to 50 IDs per call (batched automatically). Designed for the common agent pattern: receive QIDs from a SPARQL query, then humanize them.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idsYesQ-IDs (e.g., "Q76") or P-IDs (e.g., "P31") to resolve. 1–50 IDs per call.
languagesNoWikidata language codes for returned labels and descriptions (e.g., ["en", "de", "fr"]). Case-insensitive; "_" is read as "-"; blank entries are dropped, and an empty list means ["en"]. A language with no label of its own falls back to the entity's multilingual ("mul") value, returned under the requested code.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
errorNoPresent when the call failed. Absent on success.
foundNoCount of IDs that returned data.
entitiesNoMap of entity ID to labels and descriptions. IDs that were not found are absent.
notFoundNoIDs from the request that did not return data (not found or invalid).
languagesNoThe language codes that were requested.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changed
    • changedInput schema / properties / languages / description
      Previous value: -"BCP 47 language codes for returned labels and descriptions (e.g., [\"en\", \"de\", \"fr\"]). A language with no label of its own falls back to the entity's multilingual (\"mul\") value, returned under the requested code."New value: +"Wikidata language codes for returned labels and descriptions (e.g., [\"en\", \"de\", \"fr\"]). Case-insensitive; \"_\" is read as \"-\"; blank entries are dropped, and an empty list means [\"en\"]. A language with no label of its own falls back to the entity's multilingual (\"mul\") value, returned under the requested code."
    • removedInput schema / properties / languages / items / minLength
      Removed value: -1
    • addedInput schema / properties / languages / items / pattern
      Added value: +"^\\s*(?:[A-Za-z]{2,8}(?:[-_][A-Za-z0-9]{1,9})*\\s*)?$"
    • removedInput schema / properties / languages / minItems
      Removed value: -1
  2. 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": [
      +      "entities",
      +      "found",
      +      "notFound",
      +      "languages"
      +    ]
      +  },
      +  {
      +    "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: `invalid_ids`: One or more IDs in the array are not valid Q-IDs or P-IDs. Other values are possible when a failure originates below the handler.",
      +          "examples": [
      +            "invalid_ids"
      +          ],
      +          "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: -[
      -  "entities",
      -  "found",
      -  "notFound",
      -  "languages"
      -]
  3. Changed1 schema field changed
    • changedInput schema / properties / languages / description
      Previous value: -"BCP 47 language codes for returned labels and descriptions (e.g., [\"en\", \"de\", \"fr\"])."New value: +"BCP 47 language codes for returned labels and descriptions (e.g., [\"en\", \"de\", \"fr\"]). A language with no label of its own falls back to the entity's multilingual (\"mul\") value, returned under the requested code."
  4. First observed

TDQS

Score is being calculated.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.