# replace_image

Swaps the bitmap of an existing image element while keeping its frame, position and effects (batchUpdate replaceImage). The new picture comes from image_url or image_path with exactly the same validation/upload/cleanup rules as create_image. replace_method: center_inside (default — scales to fit inside the frame, keeping aspect) or center_crop (fills the frame, cropping the overflow).

Agent View of the PolicyLayer registry record for `replace_image`. HTML page: https://policylayer.com/tools/a1-x-tech-mcp-google-slides/replace-image

## Facts

- Tool: `replace_image`
- Server: Mcp Google Slides (`@a1-x-tech/mcp-google-slides`) — https://policylayer.com/tools/a1-x-tech-mcp-google-slides.md
- Install: `npx -y @a1-x-tech/mcp-google-slides`
- Homepage: https://github.com/A1-x-Tech/mcp-google-slides
- Risk category: Write (Medium risk)
- Registry record: grade F, identity unverified
- Server rate-limited: no
- Parameters: 5 (2 required)
- Recommended policy verdict: Rate-limited

## Parameters

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `image_url` | string | no | Public https URL of the new PNG/JPEG/GIF (exactly one of image_url / image_path). |
| `image_path` | string | no | Absolute local path of the new image (exactly one of image_url / image_path). |
| `replace_method` | string | no | How the new image fills the old frame (default center_inside). |
| `image_object_id` | string | yes | The existing image element's object id (type "image" in list_slides). |
| `presentation_id` | string | yes | The presentation id — the long id from the URL (docs.google.com/presentation/d/<presentationId>/edit) or from create_presentation output. |

Parameters from the server's own tool schema.

## Example call (MCP tools/call, JSON-RPC 2.0)

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "replace_image",
    "arguments": {
      "image_object_id": "<image_object_id>",
      "presentation_id": "<presentation_id>"
    }
  }
}
```

## Why replace_image is rated Medium

Modifies existing image content reversibly without deletion; agent could deface presentations but changes are undoable.

From the tool's own definition: "Swaps the bitmap of an existing image element, modification via batchUpdate"

## Use case

AI agents use replace_image to create or update resources in Mcp Google Slides, usually the action step of a workflow, after the agent has gathered context. Every call changes real data in your Mcp Google Slides environment.

## Recommended policy (PolicyLayer)

Verdict: **Rate-limited**. Enforced by the PolicyLayer MCP gateway (https://policylayer.com/mcp-gateway) before a call reaches Mcp Google Slides:

```json
{
  "version": "1",
  "default": "deny",
  "tools": {
    "replace_image": {
      "limits": [
        {
          "counter": "replace_image_rate",
          "window": "minute",
          "max": 30,
          "scope": "grant"
        }
      ]
    }
  }
}
```

## Other tools on Mcp Google Slides (25)

- `delete_object` — Destructive — https://policylayer.com/tools/a1-x-tech-mcp-google-slides/delete-object.md
- `edit_table` — Destructive — https://policylayer.com/tools/a1-x-tech-mcp-google-slides/edit-table.md
- `manage_comments` — Destructive — https://policylayer.com/tools/a1-x-tech-mcp-google-slides/manage-comments.md
- `batch_update` — Execute — https://policylayer.com/tools/a1-x-tech-mcp-google-slides/batch-update.md
- `raw_request` — Execute — https://policylayer.com/tools/a1-x-tech-mcp-google-slides/raw-request.md
- `get_page` — Read — https://policylayer.com/tools/a1-x-tech-mcp-google-slides/get-page.md
- `get_presentation` — Read — https://policylayer.com/tools/a1-x-tech-mcp-google-slides/get-presentation.md
- `get_speaker_notes` — Read — https://policylayer.com/tools/a1-x-tech-mcp-google-slides/get-speaker-notes.md
- `get_thumbnail` — Read — https://policylayer.com/tools/a1-x-tech-mcp-google-slides/get-thumbnail.md
- `list_layouts` — Read — https://policylayer.com/tools/a1-x-tech-mcp-google-slides/list-layouts.md
- `list_slides` — Read — https://policylayer.com/tools/a1-x-tech-mcp-google-slides/list-slides.md
- `add_slide` — Write — https://policylayer.com/tools/a1-x-tech-mcp-google-slides/add-slide.md
- `create_image` — Write — https://policylayer.com/tools/a1-x-tech-mcp-google-slides/create-image.md
- `create_presentation` — Write — https://policylayer.com/tools/a1-x-tech-mcp-google-slides/create-presentation.md
- `create_shape` — Write — https://policylayer.com/tools/a1-x-tech-mcp-google-slides/create-shape.md
- `create_table` — Write — https://policylayer.com/tools/a1-x-tech-mcp-google-slides/create-table.md
- `duplicate_slide` — Write — https://policylayer.com/tools/a1-x-tech-mcp-google-slides/duplicate-slide.md
- `export_presentation` — Write — https://policylayer.com/tools/a1-x-tech-mcp-google-slides/export-presentation.md
- `insert_text` — Write — https://policylayer.com/tools/a1-x-tech-mcp-google-slides/insert-text.md
- `move_slides` — Write — https://policylayer.com/tools/a1-x-tech-mcp-google-slides/move-slides.md
- `replace_text` — Write — https://policylayer.com/tools/a1-x-tech-mcp-google-slides/replace-text.md
- `set_speaker_notes` — Write — https://policylayer.com/tools/a1-x-tech-mcp-google-slides/set-speaker-notes.md
- `set_text` — Write — https://policylayer.com/tools/a1-x-tech-mcp-google-slides/set-text.md
- `update_text_style` — Write — https://policylayer.com/tools/a1-x-tech-mcp-google-slides/update-text-style.md
- `update_transform` — Write — https://policylayer.com/tools/a1-x-tech-mcp-google-slides/update-transform.md

## For agents

This record is a snapshot. Live verdicts and the full registry:

- Check every server in your MCP config at once: `npx -y policylayer stack`
- Vet a server before you add it: install the mcp-precheck skill — `npx skills add https://policylayer.com` (skill text: https://policylayer.com/skill.md)
- Query the registry over MCP: endpoint `https://api.policylayer.com/mcp` — tools `check_mcp_server`, `check_mcp_stack`, `check_tool`, `search_registry`, `get_change_events`

---

Source: the PolicyLayer MCP registry — one continuously verified record per MCP server. Full record: https://policylayer.com/registry?q=a1-x-tech-mcp-google-slides · API: https://policylayer.com/registry/api · Policy library: https://policylayer.com/policies/a1-x-tech-mcp-google-slides
