Get Map Image
The Get Map Image tool renders a static map image from an ArcGIS MapServer. Use this tool whenever the deliverable is a picture of a map, rather than the underlying features or attributes. The tool does not return the image itself. It returns a temporary URL to the exported image, along with the image's width, height, extent, and scale.
Tool name
get_map_image
Tool alias
Get Map Image
Objective
Render a static map image from an ArcGIS MapServer service by wrapping the underlying Export Map REST API, with control over extent, image size, format, layer visibility, attribute filtering, and time extent.
Usage guidance
get_map_image wraps the ArcGIS REST API Export Map operation. Use it when the deliverable is a picture of a map—PNG or JPG for screen, PDF for print, SVG for vector editing in tools such as Adobe Illustrator. If you need feature attributes or geometry instead, use Query Data.
The response contains a URL (href) to the exported image, not the raw image data. To display or save the map, the client opens or downloads the image from that URL. The URL is temporary, so do not store it for later use.
Common workflows
Quick visual previews of one or more layers.
Reprojecting output to a different coordinate system by using
imageSR—for example, Web Mercator → Lambert Conformal Conic.Filtering layers with SQL
WHEREclauses before rendering.High-DPI exports to PDF for print.
Vector exports to SVG for downstream design work.
Rotated map frames.
First-class parameters
The most commonly used Export Map options are first-class parameters of the tool:
bboxandbboxSR—The geographic extent to render and its spatial reference.layersandlayerMode—Which layers to draw and how layers that are not listed inlayersare handled (filterorappend).format—Output format (png,jpg,pdf,svg, and so on).dpi—Output resolution.widthandheight—Output canvas size in pixels.imageSR—Spatial reference for the output image (use to reproject).transparent—Whether the background should be transparent.spatialFilter—Geometry-based filtering applied to the rendered features.timeExtent—Time slice to render for time-aware layers.
Power-user parameters
Less common Export Map options are not first-class fields. Instead, pass them verbatim through the passthrough object, which is merged directly into the underlying REST request. These include:
rotation, mapScale, dynamicLayers, datumTransformations, clipping, gdbVersion, historicMoment, selectionDefinitions, and the various range, parameter, and time-option payloads (layerRangeValues, mapRangeValues, layerParameterValues, layerTimeOptions).
Constraints
Important:
MapServer endpoints only
get_map_image works against ArcGIS MapServer services only. URLs that point at FeatureServer, ImageServer, GPServer, or VectorTileServer endpoints will fail. If you are unsure of the endpoint type, run Describe Item on the organization item or inspect the URL suffix.
Confirm field names with
describe_layerbefore filtering. Before constructing SQLWHEREclauses to filter layers, run Describe Layer against each target layer to confirm field names and data types. The wrong field name is the most common reason an export "succeeds" but draws an empty map.Aspect ratio behavior.
widthandheightdefine the output canvas. If thebboxaspect ratio does not match, the server expands the requested extent to fit; it does not stretch the geometry. Use theextentreturned in the response—not the originally requestedbbox—for any subsequent spatial calculations.
When to use
The user wants a visual rendering of a map—static picture for a screenshot, document, or print job.
The agent needs to produce an image for a downstream tool (a slide deck, a PDF report, a vector design file).
When not to use
The user wants feature attributes, records, or geometry. Use Query Data instead.
The target is not a MapServer endpoint (FeatureServer, ImageServer, GPServer, VectorTileServer). Use the appropriate tool for that service type.
Sample prompts to test the tool
Send any of the prompts below to your MCP-compatible AI client to verify that get_map_image is working correctly. The prompts are grouped by which input or feature each one exercises—from spatial reference and image format through layer filtering, time extent, and the passthrough escape hatch for power-user parameters.
Note:
These prompts are for illustration only. Before you use them, modify them to match the data published in your ArcGIS Enterprise environment.
Spatial reference (bboxSR / imageSR)
Export a map of the contiguous U.S. with states and highways, reproject the output to WKID 102004 (USA Contiguous Lambert Conformal Conic).
Give me the U.S. states map with
bboxSRin WGS84 (4326) butimageSRin Web Mercator (3857).Export the SampleWorldCities World layer with
bboxSR=4326andimageSR=54030(Robinson).
Image format
Export California counties as a PDF for printing.
Give me a JPG of Texas with cities—no transparency needed.
Export the U.S. Northeast (NY, NJ, CT, MA, RI, VT, NH) as an SVG so I can edit it in Illustrator.
Render the USA map as a PNG8 to keep file size small.
Size and DPI
Export a print-ready 300 DPI map of the Pacific Northwest at 2400×3000 pixels.
Give me a quick 96 DPI thumbnail of the U.S., 600×400 pixels.
Export a wide banner of the continental U.S., 4000×1200, at 200 DPI.
Transparency
Export only the U.S. state capitals (
CITIESwhereCAPITAL='Y') as a transparent PNG so I can overlay them on my own basemap.Export the U.S. states map with
transparent=false—solid background.Export the SampleWorldCities Continent layer as a transparent GIF.
Layer filtering (layers + where)
Map all U.S. cities with population over 1,000,000 (
POP2000 > 1000000).Show only South Atlantic states (
SUB_REGION = 'S Atl') with their counties.Render Texas with only city-class places, excluding towns and CDPs (
CLASS = 'city' AND ST = 'TX').From the School Boundaries service, show only school districts in California.
Show the U.S. with only the
HIGHWAYSlayer visible—hide states, cities, counties.
layerMode (filter vs append)
filtermode: from SampleWorldCities, show only the Cities layer filtered to capitals.appendmode: keep SampleWorldCities' default visibility but additionally filter Cities toCAPITAL='Y'.
Extent variations
Export a tight extent around the Bay Area (
xmin=-123, ymin=37, xmax=-121.5, ymax=38.5) showing cities and highways.Export the full continental U.S. extent (
-125, 24, -66, 50) at 1600×900.Export a global extent (
-180, -90, 180, 90) of the SampleWorldCities World layer.
Spatial filter
Export U.S. cities within California's polygon using a
spatialFilterwithesriSpatialRelWithin.Show schools that intersect a bounding box around Los Angeles County.
Time extent
- Try a
timeExtentfrom 2000-01-01 to 2010-01-01 on the USA service.
Passthrough (advanced)
Export California rotated 45° clockwise (use
passthrough.rotation).Force a fixed
mapScaleof 1:5,000,000 when exporting the Midwest.Clip the U.S. export to a custom polygon around the Four Corners region using
passthrough.clipping.Use
dynamicLayersinpassthroughto re-symbolize the STATES layer with a custom renderer.
Combined and stress tests
Export a 4096×4096 PNG32 at 300 DPI of the U.S. with states + highways + cities over 500K population, reprojected to WKID 102004, transparent background.
Export the smallest possible map: 1×1 pixel, JPG, 1 DPI, full U.S. extent.