Skip to main content
Glama

Add a picture to a draft

add_draft_image

Stores one picture for a draft and returns its key and the body line to put where it should show: description. Give the picture as an https address (url), which Entry reads once and keeps a copy of, or as base64 (data, at most 2 MB). PNG, JPEG, GIF or WebP, at most 2 MB; EXIF and location are removed. Addresses that are private or blocked are refused. The owner's plan limits a post's pictures (3 on Free, 30 on Pro, counting pictures added and not yet used). The picture is in the post once a save writes the line in the body; one never used is deleted after a day. Embeds (an X post, a GitHub repository, a YouTube or Vimeo video or a video file) need no tool: write on a line of its own. Requires the drafts:write scope. Publishing, unpublishing and changes to the live profile are made only by the owner, in Entry.

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": {
      "entryId": "<entryId>",
      "draftId": "<draftId>"
    },
    "name": "add_draft_image"
  }
}

Input Schema

NameRequiredDescriptionDefault
altNoThe picture's description (alt text), read aloud by screen readers. Only used to write the returned line. At most 300 characters.
urlNoAn https address of the picture. Give this or data.
dataNoThe picture's bytes, base64 (a data: URL is accepted). At most 2 MB once decoded. Give this or url.
captionNoA caption shown under the picture. Only used to write the returned line. At most 200 characters.
draftIdYesThe draft's id (starts with drf_), as returned by list_drafts or create_draft.
entryIdYesThe Entry's id (starts with ent_), as returned by list_entries.

Output Schema

NameRequiredDescriptionDefault
codeNoOnly when the call failed (isError): the error code, e.g. conflict, forbidden, not_found, validation_failed, rate_limited.
imageNoThe stored picture: its key, the body line, its size and type.
detailsNoOnly when the call failed: conflict has revision, forbidden has requiredScope, rate_limited has retryAfter (seconds), validation_failed has problems; a refused page bundle has errors (code, path, detail, fix for each) and a stale page revision has revision.
messageNoOnly when the call failed: what went wrong and what to do.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.6/5.0
Behavior4/5

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

Goes well beyond the annotations: it discloses EXIF/location stripping, private/blocked address refusal, the 3/30 picture plan cap, the one-day garbage collection of unused pictures, the fact that the picture only enters the post once a save writes the line, and the `drafts:write` scope requirement. The only tension is that it describes fetching a remote https resource while `openWorldHint` is false, though the fetch is server-side and not a direct contradiction.

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?

Purpose, alternatives and the returned line are front-loaded before the constraints, and nearly every sentence carries operational information. It is a dense single paragraph, though, and the closing sentence about publishing being owner-only is tangential to storing an image.

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 write tool with six parameters and an existing output schema, the description covers formats, size limits, privacy scrubbing, quota, lifecycle of unused images, and auth scope — everything needed to invoke it correctly without trial and error.

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 already 100%, so the baseline is 3; the description still adds the either/or semantics of `url` vs `data` ("Give the picture as an https address (url) ... or as base64 (data, at most 2 MB)") and clarifies that `alt` and `caption` only shape the returned line. It stops short of naming `entryId`/`draftId`, but the schema covers those fully.

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?

Opens with a specific verb and resource ("Stores one picture for a draft") and states the return value (key plus the `![description](image:<key>)` body line), so the agent knows exactly what the tool produces. It is clearly distinguishable from sibling write tools such as `upload_page_file` or `update_draft`.

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

Usage Guidelines5/5

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

Explicitly routes the agent: use this for pictures, but for embeds (X post, GitHub repo, YouTube/Vimeo/video file) "need no tool: write ![](address) on a line of its own." It also states that publishing and live-profile changes are out of scope and must be done by the owner in Entry, which prevents misuse.

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.