Skip to main content
Glama

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.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
codeYes
timeout_secondsNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/5

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

The description reveals key behaviors: code execution, persistent variables between calls, stdout capture, and return of the last expression's repr. It does not mention potential risks like destructive operations or error handling, but given the absence of annotations, it covers the core behavioral traits adequately.

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 extremely concise, using a brief introductory sentence followed by bullet-like points. Every sentence adds value, with no redundancy. Information is front-loaded, making the purpose immediately clear.

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 complexity (arbitrary code execution, persistent state), the description covers the return value and stdout capture. An output schema exists but is not shown; the description explains how output is returned. Minor missing details include handling of timeouts and potential side effects, but overall it is sufficiently complete for an AI agent to use correctly.

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 description adds meaning for the 'code' parameter by explaining how to get output (last expression repr) and that stdout is captured. However, it offers no additional semantic for 'timeout_seconds', and the input schema has 0% description coverage, so the description only partially compensates. A note on timeout behavior would improve clarity.

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 executes Python code in a persistent ArcPy session, specifying the action and resource. It distinguishes from siblings like 'run_gp_tool' by emphasizing general-purpose usage for any ArcPy task, making the purpose unambiguous.

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 provides good guidance on when to use the tool: for any ArcPy operation, especially when state persistence is needed. It lists specific use cases like geoprocessing and automation. However, it does not explicitly mention when not to use it or suggest alternatives (e.g., 'run_gp_tool' for simple tool execution), which would strengthen guidance.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/thaparSAAB14/ARCclaude'

If you have feedback or need assistance with the MCP directory API, please join our Discord server