Skip to main content
Glama
IBM
by IBM

stac_find_pairs

Finds spatially overlapping satellite image pairs from two date ranges for change detection analysis, such as flood damage or urban growth.

Instructions

Find before/after scene pairs for change detection.

Searches two date ranges and matches scenes by spatial overlap, useful for detecting changes between time periods (e.g., flood damage, urban growth, deforestation, seasonal vegetation change).

Args: bbox: Bounding box [west, south, east, north] in EPSG:4326 before_range: Before date range "YYYY-MM-DD/YYYY-MM-DD" after_range: After date range "YYYY-MM-DD/YYYY-MM-DD" collection: STAC collection (default: sentinel-2-l2a). Options: sentinel-2-l2a, sentinel-2-c1-l2a, landsat-c2-l2, sentinel-1-grd, cop-dem-glo-30 max_cloud_cover: Maximum cloud cover percentage 0-100 (default: 20). Ignored for non-optical collections (sentinel-1-grd, cop-dem-glo-30). catalog: Catalog name (default: earth_search). Options: earth_search, planetary_computer, usgs output_mode: Response format - "json" (default) or "text"

Returns: JSON with matched scene pairs sorted by overlap percentage

Tips for LLMs: - Best for change detection workflows: find pairs, then download the same bands for before/after scenes and compare - For flood mapping: use sentinel-1-grd (SAR sees through clouds) with before_range = dry season, after_range = flood event - For vegetation change: use sentinel-2-l2a, then compute NDVI for each scene in the pair - Higher overlap_percent means better spatial coverage for comparison - Follow up with stac_download_bands or stac_compute_index on each scene in the pair

Example: pairs = await stac_find_pairs( bbox=[0.8, 51.8, 1.0, 51.95], before_range="2024-01-01/2024-03-31", after_range="2024-07-01/2024-09-30" )

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
bboxYes
catalogNo
collectionNo
after_rangeYes
output_modeNojson
before_rangeYes
max_cloud_coverNo
Behavior4/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It describes the output format (JSON with matched pairs sorted by overlap percentage), notes that max_cloud_cover is ignored for non-optical collections, and explains the default values for collection, catalog, and output_mode. It lacks details on rate limits, authentication, or potential side effects, but these are not critical for a read-only search tool.

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 well-organized with clear sections (main description, Args, Returns, Tips for LLMs, Example). It is concise yet comprehensive, front-loading the purpose and use case. Every sentence adds value, and the 'Tips for LLMs' section is particularly useful without being verbose.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool has 7 parameters (3 required), no output schema, and no annotations, the description provides complete context: parameter explanations, output format, practical use-case guidance, and an example. It adequately prepares an agent to use the tool correctly in a change detection workflow.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema description coverage is 0%, yet the 'Args' section in the description provides detailed explanations for every parameter: bbox format, date format for ranges, collection options, max_cloud_cover range and behavior, catalog options, and output_mode options. It also includes the default for max_cloud_cover and clarifies that it is ignored for non-optical collections. This adds substantial meaning beyond the raw 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 defines the tool's purpose: 'Find before/after scene pairs for change detection.' It explains the mechanism (searches two date ranges, matches by spatial overlap) and gives concrete use cases (flood damage, urban growth, deforestation, seasonal vegetation change). This clearly distinguishes it from sibling tools like stac_search or stac_compute_index.

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 'Tips for LLMs' section provides explicit guidance on when to use the tool (change detection workflows) and offers specific use-case recipes (flood mapping with sentinel-1-grd, vegetation change with sentinel-2-l2a). It also suggests follow-up tools (stac_download_bands, stac_compute_index). However, it does not explicitly state when not to use this tool or mention alternative tools for non-change-detection needs.

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/IBM/chuk-mcp-stac'

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