Skip to main content
Glama

Обрезать PDF

crop_pdf

Обрезает страницы PDF. Без box — убирает белые поля автоматически. file_url: публичный URL PDF-файла. box: область [x0, y0, x1, y1] долями видимой страницы (0–1, от левого верхнего угла), например [0, 0, 1, 0.5] — верхняя половина. Содержимое за краем остаётся в файле — для скрытия данных используйте redact_pdf. pages: номера страниц (с 1) или "all".

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>"
    },
    "name": "crop_pdf"
  }
}

Input Schema

NameRequiredDescriptionDefault
boxNo
pagesNoall
file_urlYes

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.4/5.0
Behavior4/5

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

Annotations cover the safety profile (readOnlyHint=false, destructiveHint=false, idempotentHint=false, openWorldHint=true), and the description adds genuinely non-obvious behavior: content outside the crop edge is retained in the file, and file_url must be a public URL (relevant to the openWorld hint). It does not discuss error handling or whether the original file is altered or returned, which is a minor remaining gap.

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?

Purpose and default behavior are front-loaded in the first sentence, followed by a tight one-line-per-parameter block with no filler. The parameter-list formatting is slightly choppy but every line carries load-bearing information.

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?

An output schema exists, so return values needn't be described; with that in mind the entry covers purpose, default behavior, coordinate semantics, and the key destructive/misuse caveat. Only edge cases such as out-of-range page numbers or invalid box values are left unaddressed.

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?

Schema description coverage is 0%, and the description fully compensates: file_url is defined as a public PDF URL, box is defined with coordinate order [x0,y0,x1,y1], fractional units of the visible page, origin at top-left, plus a worked example. pages is defined as 1-based numbers or the string "all", matching the anyOf union in the schema.

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?

Opens with a specific verb+resource ('Обрезает страницы PDF') and immediately states the default behavior (no box = automatic white-margin cropping). It also names a sibling it is not (redact_pdf) for the adjacent data-hiding use case, so an agent can tell it apart from the other PDF/image tools without opening a schema.

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 a concrete usage condition ('без box — убирает белые поля автоматически') and an explicit exclusion routing to redact_pdf when the goal is hiding data rather than trimming. It does not address when to prefer crop_image or edit_pdf, but the resource name makes that distinction largely self-evident.

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.