Skip to main content
Glama

insert_image

Insert an image onto a live PowerPoint slide from a file path, URL, or base64 data, with optional slide targeting and point-based position or size control.

Instructions

Inserts an image onto a slide using Office.js setSelectedDataAsync with CoercionType.Image. Accepts a file path, URL, or raw base64 data. Optionally target a specific slide (the view stays there so the user sees the insert; call show_slide first per the view etiquette) and control position/size in points.

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": {
      "source": "<source>",
      "sourceType": "<sourceType>"
    },
    "name": "insert_image"
  }
}

Input Schema

NameRequiredDescriptionDefault
topNoVertical position in points
leftNoHorizontal position in points (1 point = 1/72 inch)
colorNoHex color to tint SVG images (e.g. "#FF5733"). Only applies to SVG sources. Works best with mono/outline icons.
slideNoSlide number, 1-based (slide 1 = first slide), to navigate to before inserting. If omitted, inserts on the currently active slide.
widthNoImage width in points
heightNoImage height in points
sourceYesFile path, URL, or base64 image data depending on sourceType
sourceTypeYesHow to interpret source: "file" reads from disk, "url" fetches from network, "base64" uses data directly
presentationIdNoTarget presentation ID from list_presentations. Optional when only one presentation is connected.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv0.7.1
    • addedInput schema / properties / slide
      Added value: +{
      +  "description": "Slide number, 1-based (slide 1 = first slide), to navigate to before inserting. If omitted, inserts on the currently active slide.",
      +  "maximum": 9007199254740991,
      +  "minimum": 1,
      +  "type": "integer"
      +}
    • removedInput schema / properties / slideIndex
      Removed value: -{
      -  "description": "Zero-based slide index to navigate to before inserting. If omitted, inserts on the currently active slide.",
      -  "maximum": 9007199254740991,
      -  "minimum": 0,
      -  "type": "integer"
      -}
  2. First observedv0.6.0

TDQS

A4.2/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does disclose the underlying mechanism (setSelectedDataAsync / CoercionType.Image) plus a notable side effect — the view navigates to and remains on the target slide. Gaps remain: no mention of return value, failure behavior for unreachable URLs or missing files, or how insertion interacts with an existing selection.

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

Conciseness5/5

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

Two tight sentences, front-loaded with what the tool does, then the optional behaviors. The parenthetical about view etiquette earns its space by conveying a real side effect.

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?

For a 9-parameter mutation tool with no annotations and no output schema, the description covers source types, optional slide targeting, positioning units, and presentation scoping is delegated to the schema. Only error/return behavior is left unaddressed.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema already documents every parameter including the sourceType enum and SVG-only color. The description adds mainly the high-level framing of source kinds and points-based positioning, which is baseline-level reinforcement rather than new semantics.

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 ('Inserts an image onto a slide') and enumerates the accepted source kinds (file path, URL, raw base64), which cleanly separates it from sibling insertion tools such as insert_table, add_chart, or insert_paragraph.

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?

Gives real usage context: slide targeting is optional, the view stays on the target slide, and the agent should call show_slide first per the view etiquette. It stops short of naming alternatives (e.g., edit_slide_xml or execute_officejs) or stating when this tool should not be chosen.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.