Skip to main content
Glama

Replace images

replace_images_from_search
Destructive

Replace many image nodes at once: for each {node_id, query} patch, search Pexels, upload the top match to the site's CDN, and patch the node's src + alt — all in ONE tool call, batched into ONE new draft version. Use this after create_site_from_template to swap every placeholder image at once instead of doing 2N sequential calls (find_images + upload_image (with url) per image). Build the patches array from the manifest's image_nodes (each entry has a suggested_query you can use directly, override when the brief calls for something more specific). Up to 20 images per call. Each patch's node_id must exist in the current fixture; missing nodes are reported as skipped (not fatal — other patches still apply).

Input Schema

NameRequiredDescriptionDefault
patchesYesArray of image-replacement patches. Each item: a node_id from the site's manifest plus a Pexels query. Tool searches, uploads, and patches all in ONE round-trip. Each node_id (and field) may appear at most once. Up to 20 images per call (Pexels rate budget).
site_idYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.7/5.0
Behavior5/5

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

Annotations already flag destructiveHint/openWorldHint/idempotentHint=false, but the description adds substantial context beyond them: all patches land in ONE new draft version (not a live publish), missing node_ids are reported as skipped rather than fatal, and there is a hard cap of 20 images per call driven by the Pexels rate budget. These are exactly the mutation-safety and failure-semantics details an agent needs.

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-loaded with the core action and the one-call benefit, then the alternatives, then the input-construction guidance and limits. Dense and nearly every sentence earns its place, though it is a long single paragraph that could be broken up for faster scanning.

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?

No output schema, but the description covers the essentials for a destructive batch mutation: draft-version isolation, skipped-node reporting, and per-call cap. It could say more about the response shape when some patches are skipped, but nothing critical to correct invocation 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?

With only 50% schema coverage, the description carries weight by explaining how to build patches from manifest image_nodes and when to override the suggested_query. The 20-item cap and the 'node_id (and field) may appear at most once' uniqueness rule are stated. It stops short of restating the orientation/field semantics, which the schema itself documents well, so it adds value without duplicating everything.

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 compound verb chain (search Pexels, upload to CDN, patch src + alt) on a specific resource (many image nodes at once) and explicitly distinguishes itself from the sibling sequence find_images + upload_image. An agent can tell exactly what this tool does that no sibling does.

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?

Gives an explicit trigger ('use this after create_site_from_template to swap every placeholder image'), names the alternative it replaces ('2N sequential calls (find_images + upload_image (with url) per image)'), and explains how to source inputs from the manifest's image_nodes and suggested_query. When-to-use and when-to-use-the-other-option are both covered.

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.

Resources