Skip to main content
Glama

Редактор PDF

edit_pdf

Редактор PDF: за один вызов кладёт на страницы любое число объектов — текст, подпись (рукописным шрифтом или картинкой), картинку, закрашивание с удалением текста под ним, пометки, фигуры — и меняет строки существующего текста. Одна текстовая подпись в одном месте — проще через sign_pdf; поиск и удаление персональных данных — redact_pdf. file_url: публичный URL PDF-файла. objects: список объектов по порядку (последний — сверху). Координаты — доли видимой страницы (0–1, от левого верхнего угла), box — [x0, y0, x1, y1], размеры шрифта и линий — в пунктах. У каждого объекта page (с 1) и type: text — box, text (переносится по ширине box), size (12), font sans|serif|mono, bold, italic, color "#RRGGBB"; signature — box и lines (["Иванов И. И."], рукописный шрифт) или image_url (картинка подписи); image — box, image_url (PNG, JPG, WEBP); whiteout — закрасить: текст под ним удаляется из файла; color (по умолчанию чёрный, "#FFFFFF" — белый); highlight, rect, ellipse, check, cross — box, color, width, fill; line, arrow, ink — points [[x, y], ...], color, width; replace_text — заменить строку: box и baseline исходной строки, x начала, text (пустой — удалить строку). Подпись через API не входит в лимит подписей сайта.

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": {
      "file_url": "<file_url>",
      "objects": "<objects>"
    },
    "name": "edit_pdf"
  }
}

Input Schema

NameRequiredDescriptionDefault
objectsYes
file_urlYes

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.2/5.0
Behavior2/5

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

The description is genuinely informative about side effects beyond the annotations: whiteout removes the underlying text from the file, replace_text with empty text deletes a line, and API signatures do not consume the site's signature quota. However, annotations declare destructiveHint=false and idempotentHint=false while the description explicitly states the tool removes text from the file — an agent trusting the annotation would not expect in-file deletion. The disclosure itself is good, but it conflicts with the declared safety profile, which is a material inconsistency.

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

Conciseness4/5

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

The lead sentence plus sibling routing come first, followed by the file_url/objects conventions and a type-by-type catalogue — a sensible top-down order with no filler. It is dense and long, but almost every clause carries operative information that the 0%-coverage schema omits; a little more line-break structure per object type would make it easier to scan.

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 mutation tool with no schema descriptions, the definition covers coordinates, ordering, per-type fields, defaults and quota effects, and an output schema exists so return values need not be described. Remaining gaps are modest: whether the original file is overwritten or a new copy is produced, and how errors/size limits are reported.

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

Parameters5/5

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

With 0% schema description coverage this description must carry everything, and it does: file_url is a public PDF URL; objects is an ordered list (last on top) with per-object page (1-based) and type; coordinates are page fractions 0–1 from the top-left; box is [x0,y0,x1,y1]; font sizes and line widths are in points; every object type (text, signature, image, whiteout, highlight/rect/ellipse/check/cross, line/arrow/ink, replace_text) enumerates its fields, defaults and formats such as colour '#RRGGBB'. This is close to a full substitute for a missing schema description.

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 opens with a concrete verb and resource: an editor that places any number of objects (text, signature, image, whiteout, marks, shapes) on pages and rewrites existing text lines in a single call. It also names the neighbouring cases it is not for ('Одна текстовая подпись… проще через sign_pdf'; redaction via redact_pdf), so it is distinguishable from the many PDF siblings without opening schemas.

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?

Explicit routing is given: single hand-written signature in one place → sign_pdf; finding/removing personal data → redact_pdf. The 'за один вызов' phrasing tells the agent this is the batch option, which is exactly the when-to-use guidance an agent needs among ~45 PDF siblings.

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.