Terrain and routes
Elevation, profile and contour lines
Elevation of points, a profile along a path, or a DEM, hillshade, slope and contour lines for an area, worldwide at 30 m.
| REST | POST https://mcp.terra-lab.ai/v1/tools/get_elevation |
| MCP tool | get_elevation on https://mcp.terra-lab.ai/mcp |
| Group | Terrain and routes |
Request
curl -X POST https://mcp.terra-lab.ai/v1/tools/get_elevation \
-H "Authorization: Bearer $TERRALAB_API_KEY" \
-H "Content-Type: application/json" \
-d '{"mode":"point","points":["Annecy, France"]}'
import os
import requests
response = requests.post(
"https://mcp.terra-lab.ai/v1/tools/get_elevation",
headers={"Authorization": f"Bearer {os.environ['TERRALAB_API_KEY']}"},
json={
"mode": "point",
"points": ["Annecy, France"],
},
timeout=120,
)
response.raise_for_status()
print(response.json()["structuredContent"])
const response = await fetch('https://mcp.terra-lab.ai/v1/tools/get_elevation', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.TERRALAB_API_KEY}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"mode": "point",
"points": [
"Annecy, France"
]
}),
});
const data = await response.json();
console.log(data.structuredContent);
Other valid request bodies:
{"mode":"path","points":["Chamonix, France",{"latitude":45.8786,"longitude":6.8873,"name":"Aiguille du Midi"}]}
{"mode":"area","area":{"place":"Chamonix, France","radius_m":2000},"interval_m":50}
Parameters
A JSON object in the request body; in an MCP client, the arguments of the tool call.
| Name | Type | Required | Description |
|---|---|---|---|
mode | string | No | point: elevation of each point; path: profile along the points; area: DEM, hillshade and slope GeoTIFFs, plus contour lines and slope statistics for small areas. One of "point", "path", "area". Default "point". |
points | array of string or object | No | For point and path: points or place names. The place the user asks about, not the user's own location. 1 to 100 items. |
samples | integer | No | For path: number of samples along the path. From 10 to 500. Default 200. |
area | object | No | For area: The area: a bbox, or a place (name, address or coordinates) with an optional radius in metres. The place the user asks about, not the user's own location. |
area.bbox | array of number | No | [west, south, east, north] in decimal degrees (WGS 84). Exactly 4 items. |
area.place | string or object | No | A place name or address, or a point. |
area.radius_m | number | No | Radius around the place in metres. From 1 to 100000. |
interval_m | number | No | For area: vertical interval between contour lines, in metres. From 1 to 1000. Default 20. |
Response
structuredContent holds the result, content the same result as text for a model, and isError is true when the tool refused the request or failed; then structuredContent.code, message and hint say what to change.
{
"structuredContent": {
"sources": [{ "name": "...", "licence": "...", "url": "..." }],
"downloads": [{ "label": "...", "format": "...", "url": "...", "name": "..." }]
},
"content": [{ "type": "text", "text": "..." }],
"isError": false
}
Every result lists its sources with their licence. File results come as downloads: each link builds its file when opened.
Errors
A missing key answers 401, an empty balance 402, too many calls 429. A call that fails or finds nothing is not counted. See Errors and rate limits.
Description for agents
The text the server gives an agent to decide when to call this tool:
Use this when the user asks how high a place is (altitude, height above sea level), wants an elevation profile or the climb between places (a hike, a ride or a road up a mountain: elevation gain and loss, highest and lowest points, cross-section), or asks about the terrain of an area, anywhere in the world: a DEM, relief or hillshade GIS file, contour lines (topographic lines) and how steep or flat it is (slope). Place names work directly, for example a town and a summit. Reads the values from Copernicus DEM, a 30 m surface model of the whole world, and returns the numbers, a profile chart, the path or contours on a map and files. mode "point": up to 100 points. mode "path": 2 or more points, sampled into at most 500 samples. mode "area": a bbox, a place or a place with a radius, of any size: returns the DEM clipped to the area as a GeoTIFF (30 m, coarser for very large areas), a hillshade GeoTIFF and a slope GeoTIFF, which open directly in QGIS; for areas up to about 10 x 10 km it also returns contour lines (interval_m between lines; Shapefile, GeoJSON, KML) and slope statistics, so one call answers how steep a site is. Not for routes or travel times. Needs a place, coordinates or an area: to explain what a DEM, a DSM or contour lines are, answer without this tool. Never use the user's current location unless they type it. Give the place as the user names it (place name, address or coordinates): this tool locates it, so find_places is not needed first. Download links build their file when opened; no file is saved. Never pass these links to open_gis_file.
Updated 2026-10-27