Skip to main content
Glama
pedra-ai

Pedra MCP Server

Official
by pedra-ai

Edit via prompt

pedra_edit_via_prompt

Edit an image using a natural-language instruction like "paint the walls sage green" and get back the edited image URL, or save it directly into a Pedra property gallery.

Instructions

Edit an image from a natural-language instruction (e.g. "paint the walls sage green"). Returns the edited image URL. Pass propertyId to save the result into that property's gallery instead of only returning a URL.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameNoOptional name for the original photo (e.g. its file name), up to 200 characters. Only used with propertyId: if the photo isn't in that property yet, it's saved there under this name in the same call and returned as source.name. A photo already in the property keeps its name. Never shown on the image.
promptYesNatural-language description of the edit to apply.
imageUrlYesSource image: a public https:// URL, a data: URI, or an absolute path to a local image file on this computer (the file is read and inlined automatically). If the photo is on the user's device and can't be read from here (e.g. it's on their phone), get a link from pedra_create_upload_link.
propertyIdNoOptional id of the Pedra property (from pedra_list_properties) this photo belongs to. When set, the result is saved into that property's gallery — visible and editable from the app — instead of only being returned as a URL.
preserveAspectRatioNoBy default the output comes back at whatever size the AI model produces, which may not match the input's aspect ratio or resolution. Set to true to get the result at the exact width and height of the input image (center-cropped to the original aspect ratio, never stretched). Defaults to false.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changedv0.6.0
    • addedInput schema / properties / name
      Added value: +{
      +  "description": "Optional name for the original photo (e.g. its file name), up to 200 characters. Only used with propertyId: if the photo isn't in that property yet, it's saved there under this name in the same call and returned as source.name. A photo already in the property keeps its name. Never shown on the image.",
      +  "maxLength": 200,
      +  "type": "string"
      +}
    • addedInput schema / properties / preserveAspectRatio
      Added value: +{
      +  "description": "By default the output comes back at whatever size the AI model produces, which may not match the input's aspect ratio or resolution. Set to true to get the result at the exact width and height of the input image (center-cropped to the original aspect ratio, never stretched). Defaults to false.",
      +  "type": "boolean"
      +}
    • addedInput schema / properties / propertyId
      Added value: +{
      +  "description": "Optional id of the Pedra property (from pedra_list_properties) this photo belongs to. When set, the result is saved into that property's gallery — visible and editable from the app — instead of only being returned as a URL.",
      +  "type": "string"
      +}
  2. Changed1 schema field changedv0.5.1
    • changedInput schema / properties / imageUrl / description
      Previous value: -"Source image: a public https:// URL, a data: URI, or an absolute path to a local image file (the file is read and inlined automatically)."New value: +"Source image: a public https:// URL, a data: URI, or an absolute path to a local image file on this computer (the file is read and inlined automatically). If the photo is on the user's device and can't be read from here (e.g. it's on their phone), get a link from pedra_create_upload_link."
  3. Changed1 schema field changedv0.1.2
    • changedInput schema / properties / imageUrl / description
      Previous value: -"URL (or data: URL) of the source image."New value: +"Source image: a public https:// URL, a data: URI, or an absolute path to a local image file (the file is read and inlined automatically)."
  4. First observedv0.1.0

TDQS

A3.8/5.0
Behavior4/5

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

Annotations only flag it as a non-read-only, open-world operation; the description adds real behavioral context beyond that — it returns an edited image URL and, when propertyId is set, persists the result into a gallery and may also save the source photo. It still omits cost/credit consumption and any failure or rate-limit behavior.

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 compact sentences, front-loaded with what the tool does and the return value, with the optional propertyId behavior clearly appended. No filler.

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 correctly states the return value (edited image URL) and covers the key optional side effect of propertyId. It is nearly complete, though it says nothing about credit/cost or limits, which matters given the sibling pedra_credits tool.

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 all five parameters in detail; the description's mention of propertyId largely restates the schema. Baseline 3 is appropriate since the schema carries the parameter semantics.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description gives a specific verb+resource ('Edit an image') plus a concrete example instruction, so an agent can tell it apart from narrower siblings like pedra_enhance or pedra_remove_object. It does not, however, explicitly contrast itself with those preset-style editing tools, so it stops short of a 5.

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

Usage Guidelines3/5

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

Usage is implied (free-form natural-language editing) and it usefully explains when to pass propertyId versus not. But it never names alternatives such as the preset edits (pedra_enhance, pedra_furnish, pedra_remove_object), leaving the agent to infer which editing tool to pick.

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