arcpy_execute
Run ArcPy scripts within a persistent session to perform GIS geoprocessing, data editing, and map automation tasks.
Instructions
Execute Python code in the persistent ArcPy session.
arcpy is already imported. Variables persist between calls, so you can
build up state across multiple invocations. If the last statement is a
bare expression its repr is returned (like a REPL). stdout is captured.
Use this for anything ArcPy can do: geoprocessing, arcpy.da cursors, arcpy.mp map automation, raster algebra, arcpy.Describe, etc.
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": {
"code": "<code>"
},
"name": "arcpy_execute"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| code | Yes | ||
| timeout_seconds | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |