Skip to main content
Glama

Add an image or PDF figure

add_image
DestructiveIdempotent

Adds an image (PNG or JPEG) or a PDF figure to a project as a file, from a file the person attached in this conversation (file) or from a public https address (url). Returns the file's path and the \includegraphics line that places it. Image data never needs to be written as text.

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": {
      "project_id": "<project_id>"
    },
    "name": "add_image"
  }
}

Input Schema

NameRequiredDescriptionDefault
urlNoA public https address of a PNG, JPEG or PDF, when the image is on the web.
fileNoA file the person attached in the conversation.
pathNoWhere to put it, e.g. figures/results.png. Optional: by default the project's figures folder and the file's own name.
project_idYesThe project's id, from list_projects.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.2/5.0
Behavior3/5

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

Annotations already declare destructiveHint=true, idempotentHint=true, and openWorldHint=true, so the safety profile is known. The description adds genuinely useful return-value context (the file path and the \includegraphics line) but never explains what is destructive — e.g., whether writing to an existing path overwrites it — which is the main behavioral unknown for a mutating tool.

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?

Three short sentences, front-loaded with the action and formats, then the input modes, then the return value. Every sentence carries information an agent needs; nothing is redundant.

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?

With no output schema, the description appropriately states what is returned, and it covers both accepted input sources and the optional path override. The remaining gap is overwrite/conflict behavior for an existing target path, which matters given destructiveHint=true.

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, but the description adds the meaningful framing that file and url are alternative sources rather than both being required. The default-path behavior mentioned in the prose is already documented in the schema, so no further credit there.

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?

The description states a concrete verb and resource (adds an image or PDF figure to a project) and enumerates the accepted formats (PNG, JPEG, PDF). The clause 'Image data never needs to be written as text' implicitly steers the agent away from the sibling write_file for binary content, so it is distinguishable from its neighbors.

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?

It clearly explains the two source modes: an attachment from the current conversation (file) versus a public https address (url). It gives solid context for when each input applies, but names no exclusions and does not explicitly route to alternatives such as write_file or add_reference.

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