Skip to main content
Glama
mcp-local-reference

mcp-local-reference

crop_figure

Extract a rectangular region from a PDF page as an image using page and bounding-box coordinates; locate figures with list_figures first.

Instructions

Crop a rectangular region from a PDF page and return it as an image.

    Use ``list_figures`` first to discover figure locations, then call
    this tool with the bounding-box coordinates.

    Args:
        item_key: The Zotero item key.
        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": {
      "item_key": "<item_key>",
      "page": "<page>",
      "x0": "<x0>",
      "y0": "<y0>",
      "x1": "<x1>",
      "y1": "<y1>"
    },
    "name": "crop_figure"
  }
}

Input Schema

NameRequiredDescriptionDefault
x0Yes
x1Yes
y0Yes
y1Yes
dpiNo
pageYes
item_keyYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.7/5.0
Behavior3/5

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

No annotations are supplied, so the description carries the full burden. It does disclose the return type (an image), the PDF-point coordinate system, 0-indexed pages, and a 300 dpi default, which is helpful. It omits output image format, behavior when coordinates fall outside the page or the page index is invalid, and any requirement that the item be indexed or the PDF present.

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 purpose is front-loaded in one sentence, and the Args block is compact. The parameter list repeats names already in the schema, but each line adds a unit or indexing convention, so it earns its space. Slight redundancy in restating the default dpi of 300.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 6-required-parameter tool with no annotations and no output schema, the definition covers the core call path adequately. It leaves open the image format returned, error behavior for invalid pages or out-of-bounds boxes, and how it relates to crop_local_figure, which are the remaining gaps an agent would hit in practice.

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

Parameters4/5

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

Schema description coverage is 0%, so the description must carry parameter meaning, and it does: page is 0-indexed, x0/y0/x1/y1 are PDF points and map to left/top/right/bottom edges, and dpi is rendering resolution defaulting to 300. This meaningfully exceeds the bare typed schema. It still gives no valid ranges or bounds for coordinates or dpi.

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 opens with a concrete verb+resource: crop a rectangular region from a PDF page and return it as an image. That is unmistakable. It does not, however, distinguish itself from the sibling crop_local_figure, so an agent cannot tell from the text which cropping tool applies to a Zotero item versus a local file.

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 an explicit workflow prerequisite: run list_figures first to discover figure locations, then pass the bounding-box coordinates to this tool. That is genuine when-to-use guidance. It stops short of naming an alternative such as crop_local_figure or stating when a manual crop is preferred over an existing figure extraction.

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