Skip to main content
Glama
muend

arcgis-mcp-bridge

set_map_extent_from_layer

Set a layout map frame's camera extent to match a specific layer's extent, focusing the map on a dataset, study area, or analysis result before export.

Instructions

Set a layout map frame extent to match a named layer using mf.getLayerExtent and mf.camera.setExtent. Use this before exporting a layout so the final map focuses on a dataset, study area, boundary, or analysis result. This changes the map frame camera and saves the .aprx project when save=true.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
paramsYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.6.3
    • changedInput schema / $defs / SetMapExtentFromLayerInput / properties / aprx_path / description
      Previous value: -"Absolute .aprx path."New value: +"Absolute path to the saved ArcGIS Pro .aprx project file. The path must be inside a configured PathGuard allowed root. Tools operate on the saved project file, not a live open ArcGIS Pro session."
  2. Changed5 schema fields changedv1.0.1
    • addedInput schema / $defs / SetMapExtentFromLayerInput / description
      Added value: +"Set a map frame extent to match the extent of a named layer."
    • addedInput schema / $defs / SetMapExtentFromLayerInput / properties / layer_name / description
      Added value: +"Name of the layer whose extent will be used to update the selected map frame. The layer must exist in the map connected to that frame."
    • changedInput schema / $defs / SetMapExtentFromLayerInput / properties / layout_name / description
      Previous value: -"Layout name; None targets the first layout."New value: +"Name of the layout inside the .aprx project. Use None to target the first layout returned by ArcGIS Pro."
    • changedInput schema / $defs / SetMapExtentFromLayerInput / properties / map_frame / description
      Previous value: -"Map frame name; None targets the first frame."New value: +"Name of the map frame inside the selected layout. Use None to target the first map frame in that layout."
    • addedInput schema / $defs / SetMapExtentFromLayerInput / properties / save / description
      Added value: +"When true, save the .aprx project after applying the layout or map frame change. Use false for temporary changes before export."
  3. First observedv1.0.0

TDQS

A4/5.0
Behavior3/5

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

No annotations are provided, so the description bears full responsibility. It discloses that the tool changes the map frame camera and optionally saves the project. However, it does not discuss permissions, reversibility, or failure scenarios, leaving gaps.

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 three sentences, each serving a distinct purpose: action statement, usage guidance, and behavioral effect. It is compact and front-loaded with the essential information, with no superfluous content.

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?

Given the tool's five parameters and the presence of an output schema, the description covers the core purpose and typical use case. It could mention prerequisites or error conditions, but it is sufficient for most scenarios.

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?

The input schema already provides detailed descriptions for all parameters, including defaults and constraints. The description adds a brief mention of the save parameter and the internal functions used, but this does not significantly enhance understanding beyond 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?

The description clearly states the tool sets a layout map frame extent to match a named layer, using specific functions. It distinguishes from siblings like set_map_scale or zoom_to_layer by focusing on layer-based extent. The context of use before export is explicit.

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?

The description advises using this before exporting a layout to focus on a dataset or area, providing clear context. It does not explicitly list when not to use it or name alternatives, but the intended use case is well stated.

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

Deploy Server

Other Tools