Skip to main content
Glama

Set or clear an entry’s image

set_entry_image
Destructive

Put an image on an entry — one already on the site (media_id, from media_catalog or get_entry) or a Wikimedia Commons file (commons_token, from search_commons_images) — or take the image off (clear: true). A new image starts with no link; link sets the address the image opens on the entry page instead of the full-screen viewer ("" clears it), which needs Link images. A live edit, audited. Setting the image yourself takes it from the Wikidata sync. Dry run by default. To ask a reviewer instead, use propose_entry_change.

Input Schema

NameRequiredDescriptionDefault
linkNoAn absolute https:// (or http://) address the image links to instead of opening the full-screen viewer; "" for no link. Needs Link images.
clearNo
entryYesThe entry: its VHID (11 digits), its short name (as in verifiedhandles.org/<short>), or its Wikidata QID (Q42).
dry_runNotrue (the default): write nothing — show the change and the exact request it would send. false: make the change.
summaryNoWhy you made this edit, in a few plain words; shown in the entry’s public history. At most 200 characters. Never an internal tracking ID (a backlog or ticket number); a VHID is fine.
media_idNo
commons_tokenNo
idempotency_keyNoOptional: a key you choose (1–255 printable ASCII, e.g. a UUID), sent as the write’s Idempotency-Key. Calling again with the same key and the same change within 24 hours answers the first call’s result (replayed: true) and writes nothing; the same key with another change is refused (422).
base_revision_idNoThe revision you read (get_entry → editing.baseRevisionId). If the entry has changed since, the edit is refused as a conflict. Left out, the current revision is used.

Output Schema

NameRequiredDescriptionDefault
noteNoA dry run: what to do next to make the change, in words.
resultNoA real run: the route’s own answer, where the tool adds facts of its own beside it.
confirmNoA dry run of a change that needs it: the exact target to send back as `confirm` with dry_run: false.
dry_runNotrue: a dry run, which wrote nothing. Absent from a real run.
replayedNoA real run with an idempotency_key already used for this change: the first call’s answer, given back; nothing was written now.
would_sendNoA dry run: the exact request the real run would send (`method`, `path`, any `headers` such as an Idempotency-Key, and its `body`, `form` or `query`), or the requests, in order.
may_edit_liveNoA dry run of a live edit: whether this key’s account may edit this entry live.
refused_becauseNoA dry run the real run would be refused for: why, in words.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already flag the write profile (readOnlyHint=false, destructiveHint=true), but the description adds non-obvious behavior: dry run is the default, edits are live and audited, and self-setting the image removes it from Wikidata sync. It doesn't state what happens on conflicting arguments (media_id + commons_token) or permission requirements, so not a 5.

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?

Front-loads the core action and its two sources before branching into link/clear semantics, then closes with the default-dry-run note and the alternative tool. Dense with parentheticals but every clause carries information; only mild compression would improve it.

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

Completeness4/5

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

With an output schema present, return values need no explanation, and conflict/idempotency behavior is covered by base_revision_id and idempotency_key schema descriptions. Remaining gap is the interaction between the mutually exclusive image-source arguments and what happens if none are supplied.

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 67%, and the description compensates for the undescribed params: it explains media_id and commons_token origins, clear:true semantics, and that link sets a click-through address ('' clears it) requiring Link images. It leaves the mutual exclusivity of media_id/commons_token/clear implicit and adds nothing on entry, dry_run, or summary already documented in the schema.

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?

States a precise verb+resource ('Put an image on an entry … or take the image off') and enumerates the two input routes (media_id from media_catalog/get_entry, commons_token from search_commons_images) plus the clear flag. An agent can distinguish this from set_entry_gallery, upload_image, or propose_entry_change without opening 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?

Explicitly routes the agent: use media_catalog/get_entry for existing site media, search_commons_images for Commons files, and propose_entry_change 'to ask a reviewer instead.' It gives clear context but does not draw the boundary against adjacent siblings like set_entry_gallery or upload_image/upload_image_from_url.

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.