Skip to main content
Glama
mcp-local-reference

mcp-local-reference

crop_local_figure

Crop a rectangular figure region from a local PDF page into an image, using coordinates found with list_local_figures.

Instructions

Crop a rectangular region from any local PDF page as an image.

    Use ``list_local_figures`` first to find figure locations.

    Args:
        file_path: Path to the PDF (absolute, ~-relative, or relative to LOCAL_PDF_DIR).
        page: Page number (0-indexed).
        x0: Left edge of the crop box (PDF points).
        y0: Top edge of the crop box (PDF points).
        x1: Right edge of the crop box (PDF points).
        y1: Bottom edge of the crop box (PDF points).
        dpi: Rendering resolution (default 300).
    

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_path": "<file_path>",
      "page": "<page>",
      "x0": "<x0>",
      "y0": "<y0>",
      "x1": "<x1>",
      "y1": "<y1>"
    },
    "name": "crop_local_figure"
  }
}

Input Schema

NameRequiredDescriptionDefault
x0Yes
x1Yes
y0Yes
y1Yes
dpiNo
pageYes
file_pathYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.1/5.0
Behavior3/5

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

With no annotations, the description carries the full behavioral burden. It usefully discloses local-only scope, PDF-point coordinates, 0-indexed pages, and dpi rendering, but does not state the return form, error behavior for invalid boxes, or any output details.

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?

The description is front-loaded with purpose, followed by a short usage instruction and a compact parameter list. Every sentence supports invocation or disambiguation, with no wasted wording.

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 seven-parameter tool with no annotations and no output schema, the description covers purpose, workflow, and every parameter well. It is not fully complete because the return value and failure behavior are not described.

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%, yet the description documents all seven parameters, including path resolution rules, page indexing, PDF-point coordinate meaning for x0/y0/x1/y1, and dpi resolution. This adds substantial meaning beyond the bare schema titles.

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 states a specific verb and resource: crop a rectangular region from a local PDF page as an image. It distinguishes a local-PDF crop from other library operations, but does not explicitly contrast it with the sibling crop_figure tool.

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 gives clear workflow guidance to use list_local_figures first to find figure locations. It does not state when to use crop_figure instead or mention exclusions, so it stops short of full alternative routing.

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