Skip to main content
Glama

Set an article’s hero image

set_article_hero
DestructiveIdempotent

Set the image at the top of an article, and its alt text (what it shows, for a reader who cannot see it), as a save does: an uploaded image’s media id (upload_image, upload_image_from_url, or media_catalog), or null to take it off; or, for a data story, a chart the site draws as the hero (its figures shown as a table under it). One or the other: a picture replaces a chart. Audited with the key and the tool. Dry run by default.

Input Schema

NameRequiredDescriptionDefault
altNoIts alt text. Left out, the alt text it has is kept while the image stays the same, and none is set for a new one. A chart’s goes in `chart.alt`.
chartNoA data story’s chart, drawn by the site as the hero: three images (1600×900, and 4:3 and 1:1 for search engines), stored as uploads under the article’s licence (CC BY 4.0, credited to Verified Handles), with the figures shown as a table under it. Saving the same spec again keeps its images; a corrected figure draws new ones.
articleYesThe article: its id (list_articles), its address ("/news/<slug>", "/guides/<slug>" or the full URL), or its slug alone.
dry_runNotrue (the default): write nothing — show the change and the exact request it would send. false: make the change.
summaryNoWhy, in a few plain words, kept with the revision in the article’s history. Never an internal tracking ID.
media_idNoThe image’s media id, or null for none. Not with `chart`.

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 declare destructiveHint=true, idempotentHint=true and readOnlyHint=false; the description adds genuinely non-obvious behavior on top: the call is audited against the key and tool, and it is a dry run by default. It also explains the replacement semantics (a picture displaces a chart). It doesn't say what happens to the previously set image's media asset when replaced with null.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The purpose is front-loaded, but it is delivered as one very long semicolon-chained sentence mixing the image case, the chart case, the exclusivity rule, auditing and dry-run. Splitting into short sentences would make the key decision (image vs chart) easier to scan.

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?

For a destructive, multi-modal mutation tool with a rich nested chart schema and an output schema (so return values need no explanation), the description covers both modes, removal, sourcing of the media id, audit behavior and the dry-run default. Nothing an agent needs before invoking it is missing.

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 the baseline is 3; the description earns above baseline by naming the source tools for media_id and by stating the mutual-exclusion constraint between media_id and chart, which the schema alone only implies via 'Not with `chart`'. Alt-text handling nuances remain in the schema rather than the description.

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 specific verb and resource (set an article's hero image) and immediately enumerates the two possible payloads — a media id or a chart spec — so the agent knows exactly what the tool mutates. It is clearly distinct from sibling set_entry_image/set_entry_gallery by scoping to articles, and from upload_image by describing the hero assignment rather than the upload.

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 to upload_image, upload_image_from_url or media_catalog to obtain a media id, and states the exclusivity rule ('One or the other: a picture replaces a chart'). It also explains null as removal. It stops short of naming a sibling to use instead for entry-level images or stating prerequisites (e.g. article must be a draft).

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.