Skip to main content
Glama
Social Fetch MCP

Social Fetch MCP

Official

Get Wikidata SPARQL query result

wikipedia_wikidata_query_run
Read-onlyIdempotent

Run a read-only SPARQL query against Wikidata to retrieve entity data as JSON bindings or ASK answers, enabling factual lookups for research and question answering.

Instructions

Get a read-only Wikidata SPARQL query result as bindings or an ASK answer. Requires sparql. Returns a list.

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": {
      "sparql": "<sparql>",
      "context": "<context>",
      "llm_model": "<llm_model>"
    },
    "name": "wikipedia_wikidata_query_run"
  }
}

Input Schema

NameRequiredDescriptionDefault
formatNoResult format. Only `json` is served.json
sparqlYesRequired. Read-only SPARQL query. `INSERT`, `DELETE`, `LOAD`, `CLEAR`, `DROP`, `CREATE`, `ADD`, `MOVE`, `COPY` and `WITH` are refused.
contextYesDescribe the user's underlying goal in one sentence, not the tool you are calling.
llm_modelYesThe exact model identifier you (the assistant) are running as, taken from your system prompt or environment (for example "claude-opus-4-8" or "gpt-5.2"). Used for analytics only. If you do not know your model identifier with certainty, pass "unknown" and do not guess.
conversation_idNoEcho the conversation_id from the server's previous response. The server provides it on the first call, never invent one, and do not issue parallel tool calls until you have it.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.1

TDQS

B3.4/5.0
Behavior3/5

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

Annotations already declare readOnlyHint, idempotentHint, openWorldHint and destructiveHint=false, so the safety profile is covered. The description adds that results come back as bindings or an ASK answer, which is useful context, but the closing 'Returns a list' is imprecise and mildly conflicts with the ASK/boolean case, so the added behavioral clarity is partial.

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?

Three short sentences, front-loaded with the core action and the required parameter. The final 'Returns a list' is the one sentence that does not fully earn its place, since it is vague and sits awkwardly against the earlier mention of an ASK answer.

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

Completeness3/5

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

With no output schema, the description carries the burden of describing the return value, and it does so only loosely ('bindings or an ASK answer... a list'). For a SPARQL tool the agent still lacks any sense of the binding row shape or error/empty-result behavior, though the read-only contract and required parameter are covered.

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

Parameters3/5

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

Schema description coverage is 100%, so the schema already documents `sparql`, `format`, `context`, `llm_model` and `conversation_id`, including the refused write keywords. The description only repeats that `sparql` is required and adds no new parameter meaning, which is the correct baseline of 3 when the schema does the heavy lifting.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a specific verb and resource ('Get a read-only Wikidata SPARQL query result') and names the two possible result shapes (bindings or ASK answer). It does not distinguish itself from siblings such as wikipedia_wikidata_entity_get or wikipedia_wikidata_search_list, which is the only thing keeping it from a 5.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Usage is only implied: 'Requires `sparql`' and 'read-only' signal that this is for SELECT/ASK-style queries rather than entity lookups, but there is no explicit when-to-use/when-not or routing to an alternative sibling. An agent must infer the boundary between this and the structured Wikidata getters.

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

Deploy Server

Other Tools