Skip to main content
Glama
Pedra MCP Server

Pedra MCP Server

Official
by pedra-ai

Correct perspective

pedra_correct_perspective

Straighten vertical lines in photos taken with a tilted camera without adjusting light or color. Returns the corrected image URL, with optional saving to a property gallery.

Instructions

Straighten vertical lines in a photo shot with a tilted camera, without enhancing light or color. Use pedra_enhance_and_correct_perspective to do both. Returns the corrected image URL. Pass propertyId to save the result into that property's gallery instead of only returning a URL.

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": {
      "imageUrl": "<imageUrl>"
    },
    "name": "pedra_correct_perspective"
  }
}

Input 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.
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. Addedv0.7.0

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=false and destructiveHint=false; the description adds the meaningful behavior that the result is persisted into a property gallery when propertyId is supplied, and states the return value (corrected image URL). It stops short of disclosing credit cost or whether the source image is modified, which would round out the mutation profile.

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 ordered by importance: what it does, which tool does more, then what comes back. No filler and the limiting scope clause is front-loaded.

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?

There is no output schema, and the description correctly states the return value as a corrected image URL, plus explains gallery persistence. Given 100% schema coverage and annotations covering the safety profile, little is missing; only cost/credit expectations are 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%, including detailed notes on imageUrl sources, name, and preserveAspectRatio, so the schema carries the parameter burden. The description restates propertyId's save-to-gallery effect, which is useful reinforcement but adds no syntax or format detail beyond the schema text.

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 — straightening vertical lines in a tilted-camera photo — and immediately bounds the scope with 'without enhancing light or color.' That negative clause lets an agent tell it apart from pedra_enhance_and_correct_perspective without opening either schema.

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?

Explicitly names the sibling tool and the condition that selects it ('Use pedra_enhance_and_correct_perspective to do both'), so the choice between the two is unambiguous. The final sentence also routes the caller to propertyId when persistence is desired, versus a URL-only result.

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