Skip to main content
Glama

run_geospatial_script

Execute custom Python geospatial scripts in a sandbox with rasterio, numpy, and shapely to process Earth observation data. Returns status, stdout, stderr, and exported variables as JSON.

Instructions

Execute an arbitrary agent-generated Python geospatial processing script. The sandbox comes pre-loaded with rasterio, numpy (as np), shapely, and standard mathematical tools.

Args: script_code: Valid Python code string to execute.

Returns: JSON string with script execution status, stdout, stderr, and exported variables.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
script_codeYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4/5.0
Behavior3/5

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

With no annotations, the description carries the burden of disclosing behavior. It usefully mentions the sandbox environment, pre-loaded libraries, and JSON response containing status, stdout, stderr, and exported variables. However, it omits safety and limitation details for arbitrary code execution, such as sandbox restrictions, timeouts, or filesystem/network access.

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 compact and front-loaded with the main purpose. The Args and Returns sections are concise and directly useful, with no filler.

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?

For a one-parameter arbitrary-code tool, the environment and return contract cover most operational needs, and an output schema exists for return details. The main gap is the lack of explicit sandbox limitations, but the description is otherwise reasonably complete.

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 compensate. It does: script_code is defined as 'Valid Python code string to execute,' and the preloaded libraries give concrete context about what the code can use. It does not explain the export mechanism precisely, but the single parameter is sufficiently clarified.

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?

States a specific verb and resource: 'Execute an arbitrary agent-generated Python geospatial processing script.' It effectively distinguishes this from sibling pipeline tools like run_pipeline and list_pipeline_recipes by emphasizing arbitrary agent-generated code rather than predefined recipes.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies this tool is for free-form Python execution, but it does not explicitly name alternatives or exclusion conditions. An agent must infer when to use run_geospatial_script versus run_pipeline or other sibling tools.

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