# TerraLab documentation > Index of the TerraLab docs for agents: [llms.txt](https://terra-lab.ai/docs/llms.txt). Every docs page is also served as markdown: add .md to its URL. TerraLab makes QGIS plugins that bring AI into your GIS projects, an MCP server and REST API that give AI agents and code geodata for any place, and free GIS tools in the browser. One account covers the plugins and the API. ## QGIS plugins AI inside QGIS, on your own layers. The AI runs on TerraLab servers: no GPU, no Python setup. - [Install and sign in](https://terra-lab.ai/docs/plugins/install) The plugin manager, the QGIS version each plugin needs, the browser sign-in. - [AI Agent](https://terra-lab.ai/docs/plugins/ai-agent) A GIS task done in your project from one sentence. - [AI Segmentation](https://terra-lab.ai/docs/plugins/ai-segmentation) Objects in imagery turned into polygons, from a click or a word. - [AI Edit](https://terra-lab.ai/docs/plugins/ai-edit) An aerial image changed from a plain-language instruction. - [Account, plans and billing](https://terra-lab.ai/docs/plugins/account) Free plans, Pro, invoices, cancellation and your data. - [Troubleshooting](https://terra-lab.ai/docs/plugins/troubleshooting) Each plugin message and its fix. ## MCP server and API 41 geodata tools for Claude, ChatGPT, Cursor and any agent, or for your code over HTTPS. Every result names its sources and licences. - [Quickstart](https://terra-lab.ai/docs/quickstart) A first call in under five minutes. - [Connect an agent](https://terra-lab.ai/docs/mcp) The command or link for Claude, ChatGPT, Claude Code, Codex, Cursor and VS Code. - [Authentication](https://terra-lab.ai/docs/authentication) API keys for code, OAuth sign-in for agents. - [MCP tools](https://terra-lab.ai/docs/mcp/tools) Every tool with its parameters and response, also callable over HTTP. ## Free GIS tools - [Free GIS web tools](https://terra-lab.ai/docs/free-tools) Converters, viewers, coordinates, elevation, isochrones and more, in the browser with no account. ## Help - [Pricing and free calls](https://terra-lab.ai/docs/pricing) 100 calls included every month, then pay per call. - [Errors and rate limits](https://terra-lab.ai/docs/errors) Every error code and what to do. - [Data sources and licences](https://terra-lab.ai/docs/data-sources) Where the data comes from. - [Support](https://terra-lab.ai/docs/support) Who answers and what to send. ## For AI agents Every page is also served as markdown: add `.md` to its URL, or send `Accept: text/markdown`. The index of all pages is [/docs/llms.txt](https://terra-lab.ai/docs/llms.txt), and every page in one file is [/docs/llms-full.txt](https://terra-lab.ai/docs/llms-full.txt). Source: https://terra-lab.ai/docs · Updated 2026-11-23 --- # QGIS plugins > Index of the TerraLab docs for agents: [llms.txt](https://terra-lab.ai/docs/llms.txt). Every docs page is also served as markdown: add .md to its URL. TerraLab makes three QGIS plugins. AI Agent carries out a GIS task from one written message, AI Segmentation turns imagery into vector polygons, and AI Edit changes what an image shows. The AI runs on TerraLab servers, so any computer that runs QGIS is enough: no graphics card, no Python setup. ## Which plugin to use | You want to | Plugin | Free every month | | --- | --- | --- | | Get a task done in your project: find data, run processing, style layers, build the layout | [AI Agent](https://terra-lab.ai/docs/plugins/ai-agent) | 5 tasks | | Outline buildings, trees, cars or any object in imagery as polygons | [AI Segmentation](https://terra-lab.ai/docs/plugins/ai-segmentation) | 1.5 km² (Automatic) and 20 cloud objects (Semi-Auto) | | Show a change on an aerial image: a project, trees, a flood, a clean site plan | [AI Edit](https://terra-lab.ai/docs/plugins/ai-edit) | 3 images | The three work together: AI Agent can hand imagery to AI Segmentation or AI Edit when they are installed, and the polygons of AI Segmentation or the images of AI Edit are ordinary QGIS layers the agent can process. ## Get started 1. [Install and sign in](https://terra-lab.ai/docs/plugins/install): from the QGIS plugin manager, with a free account, in about a minute. 2. Open the plugin's page above and follow its first steps. 3. When you need more, see [Account, plans and billing](https://terra-lab.ai/docs/plugins/account) for Pro, the Pack and team licences. If something goes wrong, [Plugin troubleshooting](https://terra-lab.ai/docs/plugins/troubleshooting) lists each message and its fix. ## Common to the three plugins - **One account** for the three plugins, the [MCP server](https://terra-lab.ai/docs/mcp) and the API. - **QGIS 3 and QGIS 4**, on Windows, macOS and Linux. - **The TerraLab toolbar and menu**: each installed plugin adds its button to the TerraLab toolbar and its entry to the **TerraLab** menu, next to the QGIS **Plugins** menu. - **Your data stays yours**: never sold. Each plugin page says what it sends and keeps. - **12 interface languages** or more, following the QGIS language by default. ## Plugins or MCP server The plugins work inside QGIS, on your own layers and project. The [MCP server](https://terra-lab.ai/docs/mcp) brings TerraLab data and GIS files to an AI assistant such as Claude or ChatGPT, outside QGIS; its files then open in QGIS. Both use the same account. For quick jobs in the browser, the [free GIS tools](https://terra-lab.ai/docs/free-tools) need no account at all. Source: https://terra-lab.ai/docs/plugins · Updated 2026-11-23 --- # Install and sign in > Index of the TerraLab docs for agents: [llms.txt](https://terra-lab.ai/docs/llms.txt). Every docs page is also served as markdown: add .md to its URL. Install a TerraLab plugin from the QGIS plugin manager, then sign in once in your browser. It takes about a minute and needs no card. ## Requirements | Plugin | QGIS | System | | --- | --- | --- | | AI Agent | 3.28 or later | Windows, macOS or Linux, with an internet connection | | AI Segmentation | 3.22 or later | Windows, macOS or Linux, with an internet connection | | AI Edit | 3.22 or later | Windows, macOS or Linux, with an internet connection | No GPU and no Python package to install: the models run on TerraLab servers. Semi-Auto on My computer is the one exception: the first time, it installs its Python packages and downloads its model once. ## Install 1. In QGIS, open **Plugins**, **Manage and Install Plugins**. 2. Search for **AI Agent by TerraLab**, **AI Segmentation** or **AI Edit**. 3. Click **Install**. The search can also list plugins with similar names, such as QGIS Agent or QGIS AI Agent. They are not TerraLab plugins. Ours say **by TerraLab**. The same plugins can be downloaded as a zip from plugins.qgis.org: [AI Agent](https://plugins.qgis.org/plugins/AI_Agent/), [AI Segmentation](https://plugins.qgis.org/plugins/AI_Segmentation/), [AI Edit](https://plugins.qgis.org/plugins/AI_Edit/). In QGIS, **Install from ZIP** installs that file. ## Sign in 1. Open the plugin panel from its button on the TerraLab toolbar or from the **TerraLab** menu. AI Agent also opens with `Ctrl+Shift+K`, AI Edit with `Ctrl+Alt+E`. 2. Click **Sign in**. Your browser opens terra-lab.ai. 3. Sign in or create a free account, confirm, and go back to QGIS. If QGIS does not pick it up, type the code your browser shows in the plugin. The account links itself and the free allowance shows in the panel. One account covers the three plugins, the [MCP server](https://terra-lab.ai/docs/mcp) and the API. Usage and plans are on your [dashboard](https://terra-lab.ai/dashboard). ## Update QGIS lists available updates under **Plugins**, **Manage and Install Plugins**, **Upgradeable**. Install them there; your sign-in is kept. Updates bring fixes first, so install them before you report a problem. ## Sign out or switch account Sign out from the account section of the plugin's settings. Signing in again with another account moves the plugin to that account's plan. ## Uninstall In **Plugins**, **Manage and Install Plugins**, **Installed**, select the plugin and click **Uninstall Plugin**. Your account, plan and history stay on TerraLab. AI Segmentation's local model, if you installed it, stays in `~/.qgis_ai_segmentation` until you delete that folder or click **Remove AI files** before you uninstall. ## When something goes wrong - A `DLL load failed` error on Windows: see [DLL load failed while importing _C](https://terra-lab.ai/blog/dll-load-failed-while-importing-c-qgis). - QGIS installed with Flatpak on Linux: see [No module named pip](https://terra-lab.ai/blog/qgis-flatpak-no-module-named-pip). - Sign-in, proxy, certificate or usage messages: see [Plugin troubleshooting](https://terra-lab.ai/docs/plugins/troubleshooting). - Anything else: write to [support](https://terra-lab.ai/docs/support). Source: https://terra-lab.ai/docs/plugins/install · Updated 2026-11-23 --- # Account, plans and billing > Index of the TerraLab docs for agents: [llms.txt](https://terra-lab.ai/docs/llms.txt). Every docs page is also served as markdown: add .md to its URL. One free TerraLab account signs you in to the three QGIS plugins, the [MCP server](https://terra-lab.ai/docs/mcp) and the API. You manage plans, invoices and your data from the [dashboard](https://terra-lab.ai/dashboard). ## Plans Each plugin has a free plan, with no card and no time limit, and a Pro plan. The Pack gives AI Agent Pro, AI Segmentation Pro and AI Edit Pro on one subscription. | Plugin | Free every month | Pro every month | | --- | --- | --- | | [AI Agent](https://terra-lab.ai/docs/plugins/ai-agent) | 5 tasks | 200 tasks, higher effort levels and Autopilot | | [AI Segmentation](https://terra-lab.ai/docs/plugins/ai-segmentation) | 1.5 km² (Automatic) and 20 cloud objects (Semi-Auto) | 50 km² (Automatic) and 500 cloud objects (Semi-Auto) | | [AI Edit](https://terra-lab.ai/docs/plugins/ai-edit) | 3 images at 2K | 100 images at 2K or 4K | Semi-Auto on your own computer has no counter on any plan. Prices, in your currency and excluding VAT, are on the [pricing page](https://terra-lab.ai/pricing). Every Pro plan covers commercial use; AI Agent Free is for personal, non-commercial use. Allowances renew on the same day each month, counted from the day you signed up or subscribed. Nothing carries over, and you are never billed for going over: the plugin stops at the limit and shows the reset date. The figures above are those of new subscriptions; an older plan keeps the allowance it was sold with, and the plugin panel and the dashboard show your own. ## Quota and usage limits Each plan has a monthly quota, also called an allowance or a limit: the figures in the table above. When you exceed it: - **The plugin stops at the limit** and says so ("You used your last task", "You used your Automatic allowance for this month", "Monthly limit reached"), with the date your quota renews. Nothing is billed beyond it. - **AI Segmentation** counts each mode on its own: when Automatic is used up, Semi-Auto still works, and Semi-Auto on **My computer** has no limit at all. - **The quota renews** on the same day each month, counted from the day you signed up or subscribed. Unused allowance does not carry over. - **To get more**: move to Pro, take the Pack for the three plugins, or ask for a larger volume through the Business form on the [pricing page](https://terra-lab.ai/pricing). For a script that reads the plugin API, a refused request answers `403` with a `code`: `QUOTA_EXCEEDED` when a plan's monthly limit is reached, `FREE_DETECTIONS_EXHAUSTED` when the free Automatic allowance of AI Segmentation is used, and `TRIAL_EXHAUSTED` when the free AI Edit images are used. Most answers also carry `used` and `limit`. Fixes for each message: [Plugin troubleshooting](https://terra-lab.ai/docs/plugins/troubleshooting). ## Start Pro 1. Click **Upgrade** or **Get Pro** in the plugin panel, or choose a plan on the [pricing page](https://terra-lab.ai/pricing). 2. Pick monthly or yearly. A year is billed at the price of 11 months. 3. Pay by card. VAT is added at checkout where it applies; a business in the EU with a VAT number is reverse-charged. The plugin switches to Pro within a few seconds; no new sign-in is needed. > [!NOTE] > AI Agent Pro starts with a 7-day free trial. A card is required, and nothing is charged if you cancel before the trial ends. The other plugins start Pro at once. **Students** get AI Agent Pro, and the other plans, at half price on monthly billing, renewable each year of study: see [the student offer](https://terra-lab.ai/student). ## Manage, cancel and invoices Open [Dashboard, Settings](https://terra-lab.ai/dashboard/settings), **Plan and billing**: - **Invoices**: every payment issues an invoice, emailed and downloadable there at any time. - **Payment method**: change the card. - **Change plan**: moving to a lower plan takes effect at the end of the period you have already paid for. - **Cancel**: one click. You keep Pro until the end of the period you paid for, then return to the free plan. Nothing is deleted. A failed payment pauses Pro until it goes through; the plugin panel and the dashboard show a card to fix it. ## Refunds and withdrawal A consumer in the EU can withdraw within 14 days of a purchase from [Dashboard, Withdrawal](https://terra-lab.ai/dashboard/withdrawal): the plan ends at once and the refund is processed within 14 days. A business buyer cancels instead. Outside that window, subscription fees are not refunded, except case by case, for example after a technical defect on our side. The [terms](https://terra-lab.ai/terms) set the full rules. ## Teams and companies Pro is for one person. For a team, TerraLab Business gives each person their own licence on one invoice, paid by card, bank transfer or purchase order. AI Segmentation and AI Edit also sell larger volumes for one project, valid 12 months, and AI Segmentation can run on your own servers. Ask through the Business form on the [pricing page](https://terra-lab.ai/pricing). A plan works on a limited number of computers at a time. If the plugin says your plan already runs on its maximum number of computers, sign out on a computer you no longer use, or write to [support](https://terra-lab.ai/docs/support). ## Your data From [Dashboard, Settings](https://terra-lab.ai/dashboard/settings): - **History**: on Pro, choose how long your plugin history is kept, from none to until you delete it. On the free plan it is kept until you delete it. - **Download my data**: a file with your account, usage and history, and links to your stored images valid 24 hours. One export per hour. - **Delete my account**: type your email to confirm. The plugins stop at once and a paid plan stops renewing, without refund of the time paid. Deletion takes effect after 15 days, during which **Cancel the deletion** brings everything back. Invoices are kept only as long as the law requires. How each plugin handles your imagery and requests: the Privacy section of [AI Agent](https://terra-lab.ai/docs/plugins/ai-agent), [AI Segmentation](https://terra-lab.ai/docs/plugins/ai-segmentation) and [AI Edit](https://terra-lab.ai/docs/plugins/ai-edit), and the [privacy policy](https://terra-lab.ai/privacy-policy). Source: https://terra-lab.ai/docs/plugins/account · Updated 2026-11-23 --- # AI Agent > Index of the TerraLab docs for agents: [llms.txt](https://terra-lab.ai/docs/llms.txt). Every docs page is also served as markdown: add .md to its URL. AI Agent is a QGIS plugin that carries out a GIS task in the project you have open, from one written message. It finds the data, runs the processing, styles the layers and builds the layout, then checks the rendered map before it answers. Every change it makes can be undone. ## Before you start - QGIS 3.28 or later, on Windows, macOS or Linux, with an internet connection. - The plugin installed and signed in: see [Install and sign in](https://terra-lab.ai/docs/plugins/install). - A project open in QGIS. It can be empty: the agent can add the data itself. ## Run a task 1. Open the panel with `Ctrl+Shift+K`, the **AI Agent** button on the TerraLab toolbar, or **Plugins**, **AI Agent**. 2. Type what you want in the message box, for example: "Show the buildings of Sommières that stand in a flood zone, styled by height, and make an A4 layout." Press `Enter` to send. 3. Follow the run. The **Plan** card lists the steps and ticks them off; each step shows the tool it used and its result. When a step needs your approval, a card asks before it runs. 4. Read the answer, then keep the result, ask for a change in the same chat, or undo it from **Map history**. The agent already sees your layers, their fields, the coordinate system and the map extent, so you can name a layer as it appears in the Layers panel. You can also start from the map: right-click the canvas and choose **Ask AI Agent about this view** or **Ask AI Agent about the selected feature(s)**. ## What it can do - **Your data**: any layer QGIS opens (GeoPackage, Shapefile, GeoTIFF, CSV, PostGIS, WMS, WFS and more), and files you attach. - **Open data**: it finds and downloads datasets for your area, such as OpenStreetMap, Overture, Copernicus, IGN, USGS or NASA, each with its licence. - **Processing**: the QGIS Processing toolbox and the algorithms of the plugins you have installed, run in sequence on your layers. - **Map making**: symbology, labels, print layouts in any QGIS paper size, exported to PDF, PNG, JPG, TIF or SVG, and Word or HTML reports. - **Editing**: features and attributes of editable layers. - **The other TerraLab plugins**: it can hand imagery to [AI Segmentation](https://terra-lab.ai/docs/plugins/ai-segmentation) or [AI Edit](https://terra-lab.ai/docs/plugins/ai-edit) when they are installed. It cannot see or use other applications on your computer, and it has no offline mode. ## Attach files, layers and links Click the paperclip to **Add files from your computer**, **Attach a layer of this project** or pick one of the **Data sources**. Type `@` in the message box to pick a layer or a source by name. Pasted links, coordinates and geometries become cards the agent reads with your message. Documents are accepted too (PDF, Word, PowerPoint, Excel, text, Markdown, HTML, XML), for example a specification to follow. ## Control what it changes The permission chip under the message box sets how often the agent asks before it acts: | Level | Asks before | | --- | --- | | Ask first | Every change | | Balanced (default) | Deleting, overwriting, installing, or reaching an unknown website | | Autopilot (Pro) | Nothing: it runs the whole task. Turning it on asks you to confirm once | The effort slider (Low, Medium, High) sets how far the agent goes on a hard task. It starts at Low on each new chat. Medium and High are part of Pro. ## Undo with Map history Before the first change of a request, AI Agent saves a checkpoint of your project. Open **Map history** (`Ctrl+Shift+X`) to go back to any earlier point, or press `Ctrl+Shift+Backspace` to undo the last request. > [!NOTE] > Map history restores the project: layers, styles, layouts and edits. Files the agent wrote to disk stay on disk, and a temporary layer that was not saved may not come back. ## Chats, memory and settings - **Chat history** (the clock icon) lists your chats per project, with search. - **Memory**: the agent saves short notes about how you work and reuses them. Turn it off or edit the notes in **Settings**, **Memory**. - **Settings** (the gear icon): language, response style (Concise, Balanced, Detailed), typing suggestions, notifications and sounds, your name and job, and on Pro, a short text about you and standing instructions. - **Voice dictation**: press `Ctrl+Shift+D` and speak; the text lands in the message box for you to read before you send it. ## Keyboard shortcuts | Action | Shortcut | | --- | --- | | Open or close the panel | `Ctrl+Shift+K` | | Send | `Enter` (new line: `Shift+Enter`) | | Stop the run | `Esc` twice | | Map history | `Ctrl+Shift+X` | | Undo the last request | `Ctrl+Shift+Backspace` | | Voice dictation | `Ctrl+Shift+D` | `Ctrl+Shift+K` can be changed in **Settings**, **Keyboard Shortcuts** in QGIS. On macOS, `Ctrl` is `Cmd`. ## Tasks, free plan and Pro A task is one message you send, however many steps the agent takes. A task that fails on our side is given back. | Plan | Tasks a month | Also included | | --- | --- | --- | | Free | 5 | Low effort, Ask first and Balanced. Personal, non-commercial use | | Pro | 200 | Medium and High effort, Autopilot, history retention choice, commercial use | Pro starts with a 7-day free trial. The allowance renews on the same day each month; the panel shows the count once 3 tasks are left, and **Settings**, **Usage** shows it at any time. Prices are on the [pricing page](https://terra-lab.ai/pricing). See [Account, plans and billing](https://terra-lab.ai/docs/plugins/account). ## Limits - One message holds up to 200,000 characters and 24 attachments. - A run can last up to one hour and 600 tool calls; a run with no answer for 10 minutes stops. - You can queue up to 5 messages while a run is going: the agent reads them at its next step. ## Privacy A task sends your request, its attachments, your saved instructions and memory notes, the earlier messages of the chat, the results of the QGIS actions the agent runs, and a description of the open project (file name, extent, coordinate system, and the names, fields and extent of the layers that matter). The agent servers are in the EU. Chats are kept as your history setting says and are never used to train AI. The switch **Help improve AI Agent** in **Settings**, **Privacy** turns off usage statistics. Details: [privacy policy](https://terra-lab.ai/privacy-policy). ## Troubleshooting - **"Not connected to TerraLab, so nothing was sent"**: check your connection, then send again. Behind a proxy, set it in QGIS **Settings**, **Options**, **Network**. - **"The AI agent got stuck on the same step"**: rephrase the request or name the layer and field it should use. - **"This conversation is too long"**: start a **New chat**; the project keeps its state. - **"You used your last task"**: your tasks reset on the date shown, or move to Pro. - Anything else: [Plugin troubleshooting](https://terra-lab.ai/docs/plugins/troubleshooting), or **Send feedback** in the panel header. ## Learn more - [AI Agent for QGIS: the complete guide](https://terra-lab.ai/blog/ai-agent-complete-guide): first request, examples and five real tasks. - [The AI Agent benchmark](https://terra-lab.ai/blog/ai-agent-qgis-plugin-geospatial-benchmark). - [Product page](https://terra-lab.ai/ai-agent). Source: https://terra-lab.ai/docs/plugins/ai-agent · Updated 2026-11-23 --- # AI Segmentation > Index of the TerraLab docs for agents: [llms.txt](https://terra-lab.ai/docs/llms.txt). Every docs page is also served as markdown: add .md to its URL. AI Segmentation is a QGIS plugin that turns imagery into vector polygons with its own detection models, tuned for aerial and satellite images. Click one object to get its outline, or name what you want, such as "buildings", "trees" or "solar panels", and get every match in a zone. It replaces tracing by hand. ## Two modes | | Semi-Auto | Automatic | | --- | --- | --- | | You do | Click an object, get its outline | Draw a zone, name an object, get every match | | Runs | **My computer**: on your computer, offline. **Cloud AI**: on TerraLab servers | On TerraLab servers, no graphics card needed | | Counted in | My computer: nothing, free and unlimited. Cloud AI: cloud objects saved | km² of the zones you run | | Best for | A few objects, or objects of an unusual shape | Every object of one kind over an area | ## Before you start - QGIS 3.22 or later, on Windows, macOS or Linux. - An imagery layer: an orthophoto, a drone or satellite image (GeoTIFF, JPG, PNG) or an online basemap (WMS, XYZ tiles). - The plugin installed and signed in: see [Install and sign in](https://terra-lab.ai/docs/plugins/install). Semi-Auto on **My computer** also works without an account. The image needs a position and a projected coordinate system, in metres. A layer in degrees (such as EPSG:4326) must be reprojected first, a scanned map with no position must go through the QGIS Georeferencer, and a rotated raster must be warped. The panel says which one applies. Drawn basemaps such as OpenStreetMap are not imagery and are refused. ## Find every object in a zone (Automatic) 1. Open the panel from the **AI Segmentation** button on the TerraLab toolbar, or **Plugins**, **AI Segmentation**, and choose **Automatic**. 2. Pick the imagery layer. 3. Draw the zone: click at least 3 points on the map, then double-click or click the first point to close it. The panel shows its size in km². 4. Type the object in one or two words, for example `building`, `tree`, `car` or `solar panel`, or pick it from the **Library**. A word in another language or with a typo is understood. For an unusual object, draw an example box around one of them as well. 5. Click **Detect objects**. The button shows the area and the estimated time; tiles appear on the map as they are done. 6. Review the result in three steps: - **Keep**: the confidence slider (30% by default) and the minimum and maximum size in m² hide what you do not want. - **Correct**: fix a polygon with the AI or by hand: move corners, add, split, merge or delete (right-click, `Del`, or right-drag a box to delete everything inside). - **Shapes**: right angles for buildings, fill holes, round corners, simplify, expand or contract. 7. Click **Export** to write one vector layer. The **Precision** setting under **Advanced settings** finds smaller objects with a finer grid; it does not change the km² counted. ## Outline objects one by one (Semi-Auto) 1. In the panel, choose **Semi-Auto**, pick the imagery layer, then the engine: **Cloud AI** (no install) or **My computer** (installs once, see below). 2. Click an object on the map. Left-click adds a point inside it, right-click marks a point to leave out. The outline updates after each click. 3. Press `S` or **Save polygon** to keep it, then click the next object. 4. Press `Enter` or **Export polygon to a layer** to write every saved polygon to one layer. `Ctrl+Z` undoes the last point, `Esc` clears the current object. ## The result Export writes GeoPackage (with its style), GeoJSON, Shapefile or KML. Each polygon carries these fields: | Field | Content | | --- | --- | | `det_id` | Detection number | | `class` | The object you asked for, or `manual` for Semi-Auto | | `confidence` | Model confidence, 0 to 1 | | `area_m2` | Area in m² | | `perimeter_m` | Perimeter in metres | GeoJSON and KML are written in EPSG:4326, and Shapefile shortens field names to 10 characters. Every finished Automatic run is also kept in **History**, grouped by day: restore it to the map at no cost, export it again or run it again. ## Semi-Auto on My computer The first time you pick **My computer**, the plugin sets up its own Python environment, separate from the QGIS one, and downloads its model. Plan about 10 minutes and 5 GB of free disk space. No graphics card is needed; Apple Silicon Macs use their GPU. - Files live in `~/.qgis_ai_segmentation`. Set the `AI_SEGMENTATION_CACHE_DIR` environment variable to put them on another disk. - **Remove AI files** in the plugin settings deletes them. - Not available with QGIS installed through Flatpak or Snap on Linux, or on Intel Macs with QGIS 4: use Cloud AI there. ## Free plan and Pro | Plan | Automatic | Semi-Auto, Cloud AI | Semi-Auto, My computer | | --- | --- | --- | --- | | Free | 1.5 km² a month, zones up to 3 km² | 20 cloud objects a month | Unlimited | | Pro | 50 km² a month | 500 cloud objects a month | Unlimited | Only saved objects count in Semi-Auto, never clicks. The allowance renews on the same day each month, and the panel shows what is left. Figures are those of new subscriptions: an older plan keeps the allowance it was sold with, and the panel shows your own. Prices are on the [pricing page](https://terra-lab.ai/pricing), and larger areas for one project are sold as AI Segmentation Business. See [Account, plans and billing](https://terra-lab.ai/docs/plugins/account). ## Limits - A free zone is cut to the km² you have left, and to 3 km² at most. - Large zones are split into tiles; a run cut by a lost connection resumes where it stopped. - Build overviews (pyramids) on large local rasters so the plugin reads them fast. ## Privacy Semi-Auto on **My computer** sends nothing you segment. **Cloud AI** sends a small square of imagery around each click to our servers in the EU. **Automatic** sends the tiles of the zone, the object you typed and your example boxes to our servers in the EU, and keeps the results for your history. On the free plan TerraLab may use them to measure detection quality; on Pro it never does. Details: [privacy policy](https://terra-lab.ai/privacy-policy). ## Troubleshooting - **"You used your Automatic allowance for this month"**: Semi-Auto on your computer keeps working, free; or wait for the reset date, or move to Pro. - **No matches in this zone**: try a more common word (`building` rather than `house`), draw an example box, or raise the precision. - **The layer is in degrees, has no position or is rotated**: reproject, georeference or warp it first, as the panel says. - **"Missing Visual C++ Redistributable"** or **"A required DLL failed to initialize"** on Windows: install the Microsoft Visual C++ Redistributable, restart, then click **Retry**. See [Plugin troubleshooting](https://terra-lab.ai/docs/plugins/troubleshooting). - **Report a problem** in the panel copies the logs for support. ## Learn more - [AI Segmentation: the complete guide](https://terra-lab.ai/blog/ai-segmentation-complete-guide). - [Detect building footprints in QGIS](https://terra-lab.ai/blog/detect-building-footprints-qgis). - [Product page](https://terra-lab.ai/ai-segmentation). Source: https://terra-lab.ai/docs/plugins/ai-segmentation · Updated 2026-11-23 --- # AI Edit > Index of the TerraLab docs for agents: [llms.txt](https://terra-lab.ai/docs/llms.txt). Every docs page is also served as markdown: add .md to its URL. AI Edit is a QGIS plugin that generates a new version of an area of your imagery from a written instruction: show a project before it is built, plant a street with trees, simulate a flood, or turn an orthophoto into a clean site plan. The result lands in QGIS as a georeferenced GeoTIFF on the same place and coordinate system as the source, marked as AI-generated. ## Before you start - QGIS 3.22 or later, on Windows, macOS or Linux, with an internet connection. - A raster layer to edit: an orthophoto, a satellite basemap (XYZ, WMS), or your own drone or satellite image (GeoTIFF, JPG, PNG). It must be visible in the Layers panel. - The plugin installed and signed in: see [Install and sign in](https://terra-lab.ai/docs/plugins/install). ## Make an edit 1. Open the panel with `Ctrl+Alt+E` (`Cmd+Alt+E` on macOS), the **AI Edit** button on the TerraLab toolbar, or the **TerraLab** menu. 2. Pick the image to edit. Only visible raster layers are listed. 3. Draw the zone: drag a box or click points on the map (`Enter` closes the shape, `Backspace` removes the last point). You can also use an existing zone, a selection or a polygon layer. 4. Write what the AI should change in the prompt box, for example "Replace the parking lot with a park with trees and paths", or pick a prompt from the **Library**. 5. Press **Generate** or `Enter`. The result appears as a new layer in the **AI-Edit** group, aligned with the source. ## Guide the edit - **Library**: ready prompts sorted by theme (urban, forestry, hydrology, cartography and more), with **Top picks**, **Recent**, **Favorites** and search. - **Mark up** (`Alt+M`): draw on the map with a pencil, lines, arrows or circles to point at a spot, then name the marks in the prompt ("put a pond inside the magenta circle"). Marks guide the edit and are removed from the result. - **References**: add images to copy a style or an object from, taken from a project layer, the map view or a file on your computer (PNG, JPG, WebP, TIFF and more, up to 50 MB each). Visible layers above the edited image are sent as references too. - **Quality**: **Detailed (2K)** or **Maximum (4K)**. The menu shows the ground resolution this gives on your zone. Each edit counts as one image, whatever the quality. ## Work with the result - **Versions**: each result adds a version (V1, V2...) next to the **Original**. Start the next edit from any version, or use **Try again** for a new variation of the same prompt, or **Same edit elsewhere** for another zone. - **Compare** (`Alt+B`): drag a swipe line between the result and the original. - **Vectorize** (`Alt+V`): turn a flat-colour result, such as a land cover map or a site plan, into polygons, one class per colour. Adjust colour tolerance, simplification and minimum polygon size, then save the layer. ## Where the files go Each result is a GeoTIFF named `ai_edit__v.tif`, saved in the first folder that applies: 1. The output folder set in **AI Edit Settings**. 2. An `ai_edit_outputs` folder next to your saved project. 3. `Documents/AI Edit` in your home folder. Every file is tagged as AI-generated in its metadata, with the note "Synthetic imagery generated by AI. Not survey data or ground truth." The prompt is not written into the file. ## Free plan and Pro | Plan | Images a month | Quality | | --- | --- | --- | | Free | 3 | Detailed (2K) | | Pro | 100 | Detailed (2K) and Maximum (4K) | A generation that fails or is refused is not counted. Unused images do not carry over; the allowance renews on the same day each month and the panel shows what is left. Prices are on the [pricing page](https://terra-lab.ai/pricing). See [Account, plans and billing](https://terra-lab.ai/docs/plugins/account). ## Limits - AI Edit draws images. It does not measure, count or answer questions, and it returns a raster, not a vector file: to outline objects, use [AI Segmentation](https://terra-lab.ai/docs/plugins/ai-segmentation). - A zone must be at least 50 pixels wide on screen. A very large zone keeps only broad shapes: zoom in for detail. - A zone outside the image comes back blank. Zones that cross the 180° meridian or lie close to the poles are refused. - The result is a simulation, not a measurement: never use it as survey data. ## Privacy A generation sends the zone rendered from your image, with its marks, your prompt and your references, along with the zone's location and coordinate system. The image model runs on a third-party service that may process it outside the EU. Inputs and results are stored on EU infrastructure for your history until you delete them, or at the age you choose on Pro. Details: [privacy policy](https://terra-lab.ai/privacy-policy). ## Troubleshooting - **"This prompt is not allowed"** or **"blocked by a safety filter"**: rephrase the prompt. You are not charged. - **"Our image servers are busy right now"**: wait a moment and try again. You are not charged. - **"Image too large"**: draw a smaller zone or pick a lower quality. - **"Monthly limit reached"**: your images come back on your monthly reset date, or move to Pro. - **"Cannot reach the server"** or **"Proxy connection failed"**: see [Plugin troubleshooting](https://terra-lab.ai/docs/plugins/troubleshooting). ## Learn more - [AI Edit: the complete guide](https://terra-lab.ai/blog/ai-edit-complete-guide). - [Turn a satellite image into a site plan](https://terra-lab.ai/blog/satellite-image-to-site-plan). - [Product page](https://terra-lab.ai/ai-edit). Source: https://terra-lab.ai/docs/plugins/ai-edit · Updated 2026-11-23 --- # Plugin troubleshooting > Index of the TerraLab docs for agents: [llms.txt](https://terra-lab.ai/docs/llms.txt). Every docs page is also served as markdown: add .md to its URL. The fixes below cover AI Agent, AI Segmentation and AI Edit. Find the message the plugin shows, then follow its fix. If nothing here helps, use **Report a problem** or **Send feedback** in the plugin and write to [support](https://terra-lab.ai/docs/support). ## Connection | Message | What to do | | --- | --- | | Cannot reach the server | Check your internet connection. On a company network, ask your IT team to allow `terra-lab.ai` and its subdomains. | | Request timed out | Try again. On a slow network, raise the timeout in QGIS **Settings**, **Options**, **Network**. | | Proxy connection failed, or a proxy password is asked | Set the proxy, with its user and password, in QGIS **Settings**, **Options**, **Network**, then restart QGIS. | | SSL certificate error, or "Your network inspects secure connections" | Your network re-signs secure connections. Ask your IT team to add its certificate to QGIS (**Settings**, **Options**, **Authentication**), or to exclude `terra-lab.ai` from inspection. | | The reply did not come from the service | A hotel or guest network shows a sign-in page first. Open any website in your browser, accept it, then try again. | | The service is temporarily unavailable, busy or waking up | Our side is restarting or busy. Wait a minute and try again; nothing is counted. | ## Sign-in | Problem | What to do | | --- | --- | | The browser does not open | QGIS copies the sign-in address: paste it in your browser. | | The browser says signed in but QGIS keeps waiting | Type the code your browser shows (6 characters, like `K7P-4QX`) in the plugin. | | This sign-in code has expired, or too many wrong codes | Click **Cancel**, then **Sign in** again to get a new code. | | Session expired, or Authentication failed | Click **Sign in** again. Your plan and history are kept. | | Your plan is no longer active | Restart the plan from [Dashboard, Settings](https://terra-lab.ai/dashboard/settings), or keep using the free plan. | | Your plan is already running on its maximum number of computers | Sign out of the plugin on a computer you no longer use, or write to [support](https://terra-lab.ai/docs/support). | One account signs in to all three plugins. To use another account, sign out from the plugin settings first. ## Usage limits When a monthly allowance is used up, the plugin says so and shows the date it renews. Nothing is billed beyond it. | Plugin | Message | Options | | --- | --- | --- | | AI Agent | You used your last task | Wait for the reset date, or move to Pro | | AI Segmentation | You used your Automatic allowance for this month | Semi-Auto on your computer keeps working, free; or move to Pro | | AI Segmentation | You saved your cloud objects for this month | Switch Semi-Auto to **My computer**, or move to Pro | | AI Edit | Monthly limit reached | Wait for the reset date, or move to Pro | A message saying the free plan was already used by other accounts on this computer means the free allowance of that computer is taken. Sign in with the account you used first, or move to Pro. Plans: [Account, plans and billing](https://terra-lab.ai/docs/plugins/account). ## Install and Windows errors - **`DLL load failed`, "A required DLL failed to initialize" or "Missing Visual C++ Redistributable"**: install the latest Microsoft Visual C++ Redistributable (x64), restart the computer, then click **Retry** in the plugin. More in [DLL load failed while importing _C](https://terra-lab.ai/blog/dll-load-failed-while-importing-c-qgis). - **An antivirus or IT policy blocks the install**: the plugin lists the folder to allow. Ask your IT team to allow it, then click **Retry**. - **The install folder is in OneDrive or Dropbox, or the path is too long**: move it with the `AI_SEGMENTATION_CACHE_DIR` environment variable to a local folder with a short path, such as `C:\terralab`. - **Out of disk space**: Semi-Auto on My computer needs about 5 GB free. Free space, or move the folder with `AI_SEGMENTATION_CACHE_DIR`. - **Package versions conflict**, or the install stops halfway: click **Install** again to repair it. The plugin's environment is separate from QGIS, so this never changes your QGIS. Only Semi-Auto on My computer installs anything. AI Agent, AI Edit and the cloud modes of AI Segmentation need no install beyond the plugin. ## Linux and macOS - **QGIS from Flatpak or Snap**: local Semi-Auto is not available there; use Cloud AI. If a plugin reports `No module named pip`, see [QGIS Flatpak: No module named pip](https://terra-lab.ai/blog/qgis-flatpak-no-module-named-pip). - **Intel Mac with QGIS 4**: local Semi-Auto is not available; use Cloud AI. ## Something else - Update the plugin: QGIS lists updates under **Plugins**, **Manage and Install Plugins**, **Upgradeable**. Many fixes ship there first. - Restart QGIS after an update or an install. - Write to [support](https://terra-lab.ai/docs/support) with the plugin name and version, your QGIS version and system, the message you saw and the time it happened. **Report a problem** in AI Segmentation and **Send feedback** in AI Agent attach the logs for you. Source: https://terra-lab.ai/docs/plugins/troubleshooting · Updated 2026-11-23 --- # Quickstart > Index of the TerraLab docs for agents: [llms.txt](https://terra-lab.ai/docs/llms.txt). Every docs page is also served as markdown: add .md to its URL. Two paths: call the REST API from code, or add the MCP server to an AI agent. Both use the same account and the same 100 free calls a month. ## Call the API from code ### Create an API key 1. Sign in at [terra-lab.ai/login](https://terra-lab.ai/login). An account is free and needs no card. 2. Open [Dashboard, MCP](https://terra-lab.ai/dashboard/mcp), then **Advanced**, **API keys**. 3. Name the key, accept the API terms and click **Create key**. 4. Copy the key now: it starts with `tlk_` and is shown only once. Keep it in an environment variable, never in your code: ```bash export TERRALAB_API_KEY="tlk_your_key_here" ``` ### Check the key `GET /v1/me` returns your account and the calls you have left this month. ```bash curl https://mcp.terra-lab.ai/v1/me \ -H "Authorization: Bearer $TERRALAB_API_KEY" ``` A `401` means the key is missing, mistyped or revoked. ### Make your first tool call Find the coordinates of an address with `find_places`: ```bash curl -X POST https://mcp.terra-lab.ai/v1/tools/find_places \ -H "Authorization: Bearer $TERRALAB_API_KEY" \ -H "Content-Type: application/json" \ -d '{"query":"12 rue de la Paix, Annecy"}' ``` ```python import os import requests response = requests.post( "https://mcp.terra-lab.ai/v1/tools/find_places", headers={"Authorization": f"Bearer {os.environ['TERRALAB_API_KEY']}"}, json={"query": "12 rue de la Paix, Annecy"}, timeout=120, ) response.raise_for_status() print(response.json()["structuredContent"]) ``` ```javascript const response = await fetch('https://mcp.terra-lab.ai/v1/tools/find_places', { method: 'POST', headers: { Authorization: `Bearer ${process.env.TERRALAB_API_KEY}`, 'Content-Type': 'application/json', }, body: JSON.stringify({ query: '12 rue de la Paix, Annecy' }), }); const data = await response.json(); console.log(data.structuredContent); ``` The answer is a JSON object: `structuredContent` holds the result with its `sources`, `content` the same result as text, and `isError` says whether the tool refused the request. ### Go further - Extract buildings and roads for an area with [extract_open_data](https://terra-lab.ai/docs/mcp/tools/extract_open_data). - Get elevation, a profile or contour lines with [get_elevation](https://terra-lab.ai/docs/mcp/tools/get_elevation). - Browse all 41 tools in [MCP tools](https://terra-lab.ai/docs/mcp/tools). ## Add TerraLab to an AI agent In Claude Code, one command: ```bash claude mcp add --transport http terralab https://mcp.terra-lab.ai/mcp ``` Then run `/mcp` in Claude Code and sign in to TerraLab. For Claude, ChatGPT, Cursor, Codex and VS Code, see [MCP server](https://terra-lab.ai/docs/mcp). Ask, for example: "Show the buildings within 500 m of Lyon Part-Dieu station and give me a GeoPackage." Source: https://terra-lab.ai/docs/quickstart · Updated 2026-10-27 --- # Connect an agent > Index of the TerraLab docs for agents: [llms.txt](https://terra-lab.ai/docs/llms.txt). Every docs page is also served as markdown: add .md to its URL. TerraLab is a remote MCP server over Streamable HTTP. One URL works in every agent: ```text https://mcp.terra-lab.ai/mcp ``` The first time, your agent asks you to sign in to TerraLab. Your free calls and balance show on [Dashboard, MCP](https://terra-lab.ai/dashboard/mcp). ## Claude Open the prefilled dialog: [add TerraLab to Claude](https://claude.ai/customize/connectors?modal=add-custom-connector&connectorName=TerraLab&connectorUrl=https%3A%2F%2Fmcp.terra-lab.ai%2Fmcp). Click **Add**, then **Connect**, and sign in to TerraLab. Or in Claude, open **Settings**, **Connectors**, **Add custom connector**, and paste the server URL. ## ChatGPT Open the [TerraLab app in ChatGPT](https://chatgpt.com/plugins/terralab), click **Add**, then start your message with `@TerraLab`. No TerraLab account is needed in ChatGPT today. Each ChatGPT user can make 200 calls a day; the count resets at 00:00 UTC. ## Claude Code Run this in your terminal: ```bash claude mcp add --transport http terralab https://mcp.terra-lab.ai/mcp ``` Then run `/mcp` in Claude Code and sign in to TerraLab. Ready-made GIS workflows come as a plugin: ```text /plugin marketplace add TerraLabAI/mcp /plugin install terralab@terralab-ai-apps ``` ## Codex ```bash codex mcp add terralab --url https://mcp.terra-lab.ai/mcp ``` Codex adds the server and opens the TerraLab sign-in in your browser. It then works in the CLI, the IDE extension and the app. The same entry in `~/.codex/config.toml`: ```toml [mcp_servers.terralab] url = "https://mcp.terra-lab.ai/mcp" ``` ## Cursor Open the install link: [add TerraLab to Cursor](cursor://anysphere.cursor-deeplink/mcp/install?name=terralab&config=eyJ1cmwiOiJodHRwczovL21jcC50ZXJyYS1sYWIuYWkvbWNwP3ZpYT1jdXJzb3IifQ%3D%3D). Cursor shows the server: click **Install**, then sign in when it asks. Or add a remote server in Cursor's MCP settings, in `.cursor/mcp.json`: ```json { "mcpServers": { "terralab": { "url": "https://mcp.terra-lab.ai/mcp" } } } ``` ## VS Code Open the install link: [add TerraLab to VS Code](vscode:mcp/install?%7B%22name%22%3A%22terralab%22%2C%22type%22%3A%22http%22%2C%22url%22%3A%22https%3A%2F%2Fmcp.terra-lab.ai%2Fmcp%3Fvia%3Dvscode%22%7D). Click **Install**, sign in to TerraLab, then ask Copilot in agent mode. Or in `.vscode/mcp.json`: ```json { "servers": { "terralab": { "type": "http", "url": "https://mcp.terra-lab.ai/mcp" } } } ``` ## Microsoft Copilot Studio In your agent, open **Tools**, **Add a tool**, **New tool**, **Model Context Protocol**. Paste the server URL, choose **OAuth 2.0** with the type **Dynamic discovery**, then **Create**. Create a new connection, sign in to TerraLab, and select **Add to agent**. ## Other agents Add a remote MCP server with the URL above in any agent that takes one; it opens the TerraLab sign-in. Gemini CLI: ```bash gemini mcp add --transport http -s user terralab https://mcp.terra-lab.ai/mcp ``` To teach any agent when and how to use the tools, give it `https://terra-lab.ai/skills.md`. ## With an API key An agent that cannot open a sign-in page can send a TerraLab API key instead. Create one on your [account page](https://terra-lab.ai/dashboard/mcp) (**Advanced**, **API keys**), then send it as a header with every request to the server URL: ```json { "mcpServers": { "terralab": { "url": "https://mcp.terra-lab.ai/mcp", "headers": { "Authorization": "Bearer tlk_..." } } } } ``` Calls made with a key count on the same account as your signed-in agents, with the same included calls and balance. Revoke a key on the same page: it stops working within a minute. Details: [Authentication](https://terra-lab.ai/docs/authentication). ## Tools The server exposes 41 tools. Each one has its page in [MCP tools](https://terra-lab.ai/docs/mcp/tools), with its parameters and response. The same tools are also callable over HTTP with an API key, under the same names and arguments. ChatGPT lists all 41. Claude and other agents get a shorter list of 19: the layer operations are listed in ChatGPT only (elsewhere `process_geometry` and `measure` do the same work), and `get_route`, `get_travel_times`, `get_satellite_index`, `french_parcels_in_area`, `zonal_statistics` and `get_forest_type` are left out of the list but stay callable by name. `search_docs` searches these docs, the TerraLab blog guides and product pages, in any language, so an agent can answer questions about TerraLab itself. It is free: it never counts against your calls or balance. - **Places**: [Find places and addresses](https://terra-lab.ai/docs/mcp/tools/find_places), [Convert coordinates](https://terra-lab.ai/docs/mcp/tools/convert_coordinates), [Measure distance, area, radius or buffer](https://terra-lab.ai/docs/mcp/tools/measure) - **Map data**: [Extract open map data for an area](https://terra-lab.ai/docs/mcp/tools/extract_open_data), [Open, map and convert GIS data](https://terra-lab.ai/docs/mcp/tools/open_gis_file), [Buffer, clip, join, count or filter features](https://terra-lab.ai/docs/mcp/tools/process_geometry) - **Terrain and routes**: [Elevation, profile and contour lines](https://terra-lab.ai/docs/mcp/tools/get_elevation), [Road route between places](https://terra-lab.ai/docs/mcp/tools/get_route), [Area reachable in a travel time](https://terra-lab.ai/docs/mcp/tools/get_travel_area), [Travel times between many places](https://terra-lab.ai/docs/mcp/tools/get_travel_times) - **Imagery and land**: [Satellite image of an area](https://terra-lab.ai/docs/mcp/tools/get_satellite_image), [Sentinel-2 index and change](https://terra-lab.ai/docs/mcp/tools/get_satellite_index), [Statistics of a raster per polygon](https://terra-lab.ai/docs/mcp/tools/zonal_statistics), [Forest type (natural, planted, plantation)](https://terra-lab.ai/docs/mcp/tools/get_forest_type), [Estimate the population of an area](https://terra-lab.ai/docs/mcp/tools/estimate_population) - **France**: [French cadastral parcel and zoning](https://terra-lab.ai/docs/mcp/tools/french_parcel), [French cadastral parcels and zoning in an area](https://terra-lab.ai/docs/mcp/tools/french_parcels_in_area), [French building heights](https://terra-lab.ai/docs/mcp/tools/french_building_heights), [Natural risks at an address or a point](https://terra-lab.ai/docs/mcp/tools/get_natural_risks) - **Data catalog**: [Find a dataset in the TerraLab catalogue](https://terra-lab.ai/docs/mcp/tools/find_datasets), [Extract a hosted dataset for an area](https://terra-lab.ai/docs/mcp/tools/extract_dataset), [Describe a cloud GeoParquet dataset](https://terra-lab.ai/docs/mcp/tools/inspect_dataset), [Count and sum a cloud GeoParquet per zone](https://terra-lab.ai/docs/mcp/tools/aggregate_dataset), [Ask TerraLab to add data it does not have](https://terra-lab.ai/docs/mcp/tools/request_data), [Search the TerraLab docs and guides](https://terra-lab.ai/docs/mcp/tools/search_docs) - **Layer operations**: [Straight-line distance between places](https://terra-lab.ai/docs/mcp/tools/measure_distance), [Area and perimeter of a shape](https://terra-lab.ai/docs/mcp/tools/measure_area), [Circle of a given radius around a place](https://terra-lab.ai/docs/mcp/tools/circle_around_place), [Buffer features by a distance](https://terra-lab.ai/docs/mcp/tools/buffer_features), [Merge (dissolve) features into one](https://terra-lab.ai/docs/mcp/tools/dissolve_features), [Keep the parts inside a second layer](https://terra-lab.ai/docs/mcp/tools/intersect_layers), [Remove the parts inside a second layer](https://terra-lab.ai/docs/mcp/tools/erase_with_layer), [Clip features to an area or a layer](https://terra-lab.ai/docs/mcp/tools/clip_features), [Simplify feature outlines](https://terra-lab.ai/docs/mcp/tools/simplify_features), [Centre point of each feature](https://terra-lab.ai/docs/mcp/tools/feature_centroids), [Add area and length to each feature](https://terra-lab.ai/docs/mcp/tools/add_area_and_length), [Count features inside each polygon](https://terra-lab.ai/docs/mcp/tools/count_in_polygons), [Nearest feature and its distance](https://terra-lab.ai/docs/mcp/tools/find_nearest_features), [Select features by location](https://terra-lab.ai/docs/mcp/tools/select_by_location), [Join attributes by location](https://terra-lab.ai/docs/mcp/tools/join_by_location), [Filter features by attribute](https://terra-lab.ai/docs/mcp/tools/filter_by_attribute) ## What to ask - "Find the coordinates of these 40 addresses and give me a CSV for QGIS." - "Extract the buildings and roads within 1 km of Annecy station as a GeoPackage." - "Elevation profile from Chamonix to the Aiguille du Midi." - "Which natural risks apply at 12 rue de la Paix, Annecy?" Answers show a map in the chat when the agent supports it, and give files that open in QGIS, ArcGIS or Google Earth. ## Troubleshooting - **TerraLab shows as connected in Claude but has no tools.** If you added it before October 26, 2026, remove the connector and add it again: Claude then offers the TerraLab sign-in. - **The agent says the free calls are used.** Top up on [Dashboard, MCP](https://terra-lab.ai/dashboard/mcp) or wait for the 1st of the month. See [Pricing and free calls](https://terra-lab.ai/docs/pricing). - **A tool answers with an error.** Its `message` and `hint` say what to change. See [Errors and rate limits](https://terra-lab.ai/docs/errors). Source: https://terra-lab.ai/docs/mcp · Updated 2026-11-23 --- # Authentication > Index of the TerraLab docs for agents: [llms.txt](https://terra-lab.ai/docs/llms.txt). Every docs page is also served as markdown: add .md to its URL. Every call needs a TerraLab account, except the two public documents: [`/v1/openapi.json`](https://mcp.terra-lab.ai/v1/openapi.json) and [`/v1/meta/pricing`](https://mcp.terra-lab.ai/v1/meta/pricing). The TerraLab app in ChatGPT is the other exception today: it needs no TerraLab account. There are three ways to get access: an API key for code, OAuth 2.1 for agents with a browser, and a 6-digit code for agents without one. ## API keys Use a key for scripts, back ends and notebooks, anything that cannot open a browser to sign in. 1. Sign in at [terra-lab.ai/login](https://terra-lab.ai/login). 2. Open [Dashboard, MCP](https://terra-lab.ai/dashboard/mcp), then **Advanced**, **API keys**. 3. Name the key, accept the API terms and click **Create key**. 4. Copy it at once. A key starts with `tlk_`, followed by 48 hexadecimal characters, and is shown only once: TerraLab stores a hash, never the key. Send it in the `Authorization` header: ```bash curl https://mcp.terra-lab.ai/v1/me \ -H "Authorization: Bearer $TERRALAB_API_KEY" ``` Keys do not expire, and an account holds up to 20 live keys. **Revoke** one from the same page when it leaks or a project ends: the next call with it answers `401`. Calls made with a key count against the account that created it. Keep keys out of source control, front-end code and screenshots. Read them from an environment variable or a secret manager. ## OAuth 2.1 for agents AI agents sign in instead of using a key. When an agent first calls `https://mcp.terra-lab.ai/mcp` without a token, the server answers `401` with a `WWW-Authenticate` header that points to its metadata, and the agent opens the TerraLab sign-in in your browser. You approve once; the agent then holds a token. | What | Value | | --- | --- | | Protected resource metadata | `https://mcp.terra-lab.ai/.well-known/oauth-protected-resource` | | Authorization server | `https://terra-lab.ai` | | Server metadata | `https://terra-lab.ai/.well-known/oauth-authorization-server` | | Grant | Authorization code with PKCE (`S256`), public clients | | Client registration | Dynamic registration, or a client ID metadata document | | Scope | `data` | | Access token lifetime | 1 hour, renewed with a refresh token valid 30 days | Most agents handle all of this themselves: you only paste the server URL. See [MCP server](https://terra-lab.ai/docs/mcp). An OAuth access token also works on the REST API, as a Bearer token in the same header. ## Agents without a browser Some agents run where no browser can open: a terminal on a server, a scheduled job, a chat that cannot follow a redirect. They register with your email instead, following the [auth.md](https://terra-lab.ai/auth.md) protocol. 1. The agent asks for the email of your TerraLab account. 2. It shows you a link and a 6-digit code. TerraLab never sends this code by email. 3. Open the link, sign in or sign up with that same email, check what the page says the agent will get, and type the code. 4. The agent is connected. It appears under **Connected apps** like any other. Confirm only a code from an agent you started yourself. If someone sends you a link or a code you did not ask for, press **Cancel**: confirming would let them use your account. | What | Value | | --- | --- | | Registration endpoint | `https://terra-lab.ai/agent/identity`, type `service_auth` | | Code lifetime | 10 minutes, 5 tries | | Registration lifetime | 1 hour | | Polling grant | `urn:workos:agent-auth:grant-type:claim` at `https://terra-lab.ai/oauth/token` | | Tokens | Same as OAuth: 1 hour access token, 30 day refresh token, scope `data` | The full request and answer shapes for agent builders are in [auth.md](https://terra-lab.ai/auth.md). ## Let an agent check your account A connected agent can read a short summary of the account it works for: the included calls left this month, the balance, and whether a top-up is needed. It never sees your email or your payment details. | What | Value | | --- | --- | | Endpoint | `GET https://terra-lab.ai/oauth/userinfo` with `Authorization: Bearer ` | | Accepted tokens | Any OAuth access token issued by TerraLab. An API key is refused. | | Without a valid token | `401` with a `WWW-Authenticate` header that points to `https://terra-lab.ai/.well-known/oauth-protected-resource` | ## Disconnect an agent [Dashboard, MCP](https://terra-lab.ai/dashboard/mcp) lists your **Connected apps**. **Disconnect** revokes that app's access: its next call answers `401` with `access_revoked`. Source: https://terra-lab.ai/docs/authentication · Updated 2026-11-15 --- # Team sign-in for Claude Team and Enterprise > Index of the TerraLab docs for agents: [llms.txt](https://terra-lab.ai/docs/llms.txt). Every docs page is also served as markdown: add .md to its URL. With team sign-in, the members of your Claude organization use TerraLab in Claude without signing in to TerraLab each time. Claude vouches for the member with a signed identity assertion, and TerraLab answers with an access token for that member's account. This is Enterprise Managed Auth, from the [MCP enterprise-managed authorization extension](https://modelcontextprotocol.io/extensions/auth/enterprise-managed-authorization). It needs a Claude Team or Enterprise plan and an Owner or Primary Owner of the Claude organization. Claude Pro and Free accounts, ChatGPT and other agents keep the normal sign-in described in [Authentication](https://terra-lab.ai/docs/authentication). ## What each side does | Who | Does what | Where | | --- | --- | --- | | Claude admin | Adds TerraLab, turns on managed authorization, copies the issuer URL | Claude admin settings | | TerraLab team owner | Pastes the issuer URL, turns team sign-in on, invites members by email | [Dashboard, MCP](https://terra-lab.ai/dashboard/mcp), **Team sign-in** | | Each member | Accepts the invitation once, signed in with the invited email | [Dashboard, MCP](https://terra-lab.ai/dashboard/mcp), **Team invitations** | The admin and the owner can be the same person. ## 1. Add TerraLab to your Claude organization In Claude, open **Admin settings**, **Connectors**, and add TerraLab with the server URL: ```text https://mcp.terra-lab.ai/mcp ``` Open the connector. In its **Authentication** section, click **Set up** on the **Managed authorization** row and choose **Claude-issued** under **Identity source**. Claude shows an **Issuer URL** of the form `https://identity.anthropic.com/issuers/`. Copy it exactly. ## 2. Create your TerraLab team 1. Sign in at [terra-lab.ai/login](https://terra-lab.ai/login) with the account that owns the team. 2. Open [Dashboard, MCP](https://terra-lab.ai/dashboard/mcp) and unfold **Team sign-in for Claude Team and Enterprise**. 3. Paste the issuer URL in **Trusted issuer URL**, tick **Turn on team sign-in** and click **Save**. 4. Copy the **Tenant ID** shown under the form and paste it in the **Tenant ID** field of Claude's managed authorization setup. It is optional but recommended: it ties Claude's assertions to your team. Without it, TerraLab picks the team the member accepted; it is required only when one email has accepted several teams that trust the same issuer. ## 3. Invite your members Add each member's email under **Members**: the address of their Claude account. Each member then signs in to terra-lab.ai with that email, opens [Dashboard, MCP](https://terra-lab.ai/dashboard/mcp) and clicks **Accept** under **Team invitations**. A member without a TerraLab account creates one by signing in. From then on, the member's Claude connects to TerraLab on its own and renews access every hour without asking. The acceptance step is deliberate: an issuer URL is not a secret, so TerraLab never lets a team act for an account that did not agree to join it. The invitation shows the issuer URL, and the acceptance holds for that issuer only. ## 4. Test the connection In Claude's managed authorization setup, click **Run test** under **Connection status**. A member who has not accepted yet gets `invalid_grant` with the reason in the description. ## Usage and billing Each member's calls count against that member's own TerraLab account: 100 free calls a month, then their balance. See [Pricing](https://terra-lab.ai/docs/pricing). ## Remove access | To | Do | | --- | --- | | Remove one member | **Remove** next to the email. Their access stops at the next call. | | Stop the whole team | Untick **Turn on team sign-in** and save. Every member's access stops at the next call. | | Leave a team | **Leave** under **Team invitations**. | Changing the issuer URL also ends every access issued under the old one, and every member must accept again. When someone leaves your Claude organization, Claude stops vouching for them at once; remove them here too. ## For identity providers An identity provider that issues ID-JAG assertions (for example Okta Cross App Access) works the same way: paste its issuer URL instead of Claude's. TerraLab finds the member by the `email` claim, so the provider must send it. | What | Value | | --- | --- | | Token endpoint | `https://terra-lab.ai/oauth/token` | | Grant | `urn:ietf:params:oauth:grant-type:jwt-bearer` | | Assertion `typ` | `oauth-id-jag+jwt`, signed ES256 or RS256 | | Assertion `aud` | `https://terra-lab.ai` | | Optional `aud_tenant` | Your team's Tenant ID | | Access token | 1 hour, no refresh token | Source: https://terra-lab.ai/docs/team-sign-in · Updated 2026-11-04 --- # WebMCP tools for browser agents > Index of the TerraLab docs for agents: [llms.txt](https://terra-lab.ai/docs/llms.txt). Every docs page is also served as markdown: add .md to its URL. WebMCP is a browser API that lets a web page hand tools to an AI agent running in the browser. The agent calls a tool with arguments and reads a structured answer, instead of reading the page and clicking through it. Every page of terra-lab.ai registers its tools through `document.modelContext.registerTool`, so an agent on the site can convert coordinates, read a page or call the Data API in one step. You do not need to install anything. When a browser has no WebMCP support, the site behaves as before and nothing is loaded. For an agent outside the browser (Claude, ChatGPT, Cursor, a script), connect the [MCP server](https://terra-lab.ai/docs/mcp) instead, or call its [tools](https://terra-lab.ai/docs/mcp/tools) over HTTP. ## Site tools | Tool | What it does | | --- | --- | | `list_terralab_products` | The QGIS plugins and services, with a one-line description and page for each. | | `get_terralab_pricing` | Free tiers and paid plans of the plugins, with the pricing page as the source. | | `get_qgis_plugin_install_links` | The plugin marketplace links and the install steps inside QGIS. | | `list_free_gis_tools` | The free tools of the site, with what each one does and its page. | | `read_terralab_page` | Any page of the site as markdown: product pages, docs, blog posts. | | `open_terralab_page` | Opens a page of the site in the tab the agent works in. | | `get_terralab_mcp_connection` | How to connect the MCP server and the REST API: URL, sign-in, OpenAPI document. | ## Free tools, no account These run in your browser or on the free public endpoints of the site. Nothing is counted. | Tool | What it does | | --- | --- | | `convert_coordinates` | Converts points between decimal degrees, degrees minutes seconds, UTM, MGRS, Lambert 93 and other EPSG systems, with the input format detected. | | `list_coordinate_systems` | Lists the systems `convert_coordinates` accepts, filtered by a word such as Lambert or UTM. | | `convert_vector_data` | Converts KML, CSV, GeoJSON, GPX or WKT text into another of these formats; Shapefile, KMZ and Excel outputs are saved as a download. | | `build_ogr2ogr_command` | Writes the GDAL `ogr2ogr` command for a conversion, a reprojection or a clip, for bash, PowerShell or cmd. | | `get_building_heights` | Height, floors and use of the buildings in a small area in France, from IGN BD TOPO. | | `get_isochrone` | The area reachable by car, bike or on foot from a point or a place within 1 to 60 minutes or a road distance, worldwide, with up to 4 bands and their km². | | `find_elevation` | Elevation of a point anywhere on Earth, by coordinates or place name, or the elevation profile of a line up to 500 km, from the Copernicus DEM. | | `get_building_footprints` | Building outlines in an area from Overture, OpenStreetMap, Microsoft and Google, with counts per source. | | `draw_radius_circles` | Geodesic circles of any radius around places or coordinates, with rings and areas; saves KML, GeoJSON, Shapefile or GPX. | | `measure_area` | Geodesic area and perimeter of polygons (GeoJSON, WKT or a list of points) in m², hectares and acres, with holes and roof area for a pitch. | | `measure_distance` | Straight-line (geodesic) distance along 2 to 200 points in metres, km, miles and nautical miles, with each leg and its bearing. | ## Data API tools, on your account When you are signed in to terra-lab.ai, the agent also gets the tools of the TerraLab Data API: the same tools as the [MCP server](https://terra-lab.ai/docs/mcp), such as `find_places`, `get_elevation`, `get_satellite_image`, `french_parcel`, `get_natural_risks` and `get_route`. The list is read from the server's live catalog, so a new tool shows up without a site change. Each tool is described in [MCP tools](https://terra-lab.ai/docs/mcp/tools). Calls go through the site with your session and count against your own account, like a call from any agent: free calls first, then your balance. They appear under connected apps on [your Data API page](https://terra-lab.ai/dashboard/mcp) as "Browser agent on terra-lab.ai". You accept the Data API terms once on that page before the first call; the agent cannot accept them for you. `request_data` files a data request with TerraLab, so it is not marked read-only. `get_satellite_image`, `get_satellite_index`, `extract_open_data` and `extract_dataset` can cost more than one call and ask the agent to confirm first. To turn browser agents off, revoke "Browser agent on terra-lab.ai" on that page: it stays off until you sign in again. See [Pricing and limits](https://terra-lab.ai/docs/pricing). Signed out, these tools answer with the sign-in link instead of running. ## Your account, read only | Tool | What it does | | --- | --- | | `get_my_terralab_account` | Your plugin plans and your Data API balance, when you are signed in. | No tool changes your account: none buys, subscribes, creates a key or deletes anything. ## Security - Tools are only visible to agents working on terra-lab.ai. Other sites and embedded frames cannot see or call them. - Tools that only read are marked `readOnlyHint`. The free tools return a link (`open_in_browser` or `edit_in_builder`) that opens the same result in the visible tool, and `open_terralab_page` shows it to you, so you can check what the agent did. Account and payment pages are never opened by a tool. Tools whose answer carries third-party text (open data, file contents) are marked `untrustedContentHint`, so the agent treats it as data, not instructions. - Data API calls use your existing session. No key or token is handed to the agent. - We record which tool was called, whether it worked and how long it took, never the arguments. ## Try it WebMCP is experimental in Chrome: an origin trial from Chrome 149 to 156, with shipping planned after that. 1. In Chrome, open `chrome://flags/#enable-webmcp-testing`, set it to **Enabled** and relaunch. 2. Open any page of terra-lab.ai, then DevTools, **Application**, **WebMCP**. The panel lists the registered tools, lets you run one with your own arguments, and logs every call an agent makes. 3. Ask an agent that supports WebMCP in your browser to use the site, for example to convert a list of coordinates or to read the pricing. Source: https://terra-lab.ai/docs/webmcp · Updated 2026-10-28 --- # MCP tools > Index of the TerraLab docs for agents: [llms.txt](https://terra-lab.ai/docs/llms.txt). Every docs page is also served as markdown: add .md to its URL. The [MCP server](https://terra-lab.ai/docs/mcp) gives your assistant 41 tools, sorted here by job. Each page lists the tool's parameters, its response and the text the server shows the agent. ### Places | Tool | What it gives | | --- | --- | | [Find places and addresses](https://terra-lab.ai/docs/mcp/tools/find_places) | Coordinates of an address or place name, the address at a point, or a list of up to 100 addresses placed on a map with a CSV for QGIS. | | [Convert coordinates](https://terra-lab.ai/docs/mcp/tools/convert_coordinates) | Coordinates converted between decimal degrees, degrees minutes seconds, UTM, MGRS, Lambert 93 or any EPSG code, with the format detected for you. | | [Measure distance, area, radius or buffer](https://terra-lab.ai/docs/mcp/tools/measure) | Geodesic distance and bearing between places, the length of a line, the area and perimeter of a polygon, or a circle or buffer around a shape. | ### Map data | Tool | What it gives | | --- | --- | | [Extract open map data for an area](https://terra-lab.ai/docs/mcp/tools/extract_open_data) | OpenStreetMap and Overture layers for any area: buildings, roads, addresses, points of interest, land use, water and more, as GIS files. | | [Open, map and convert GIS data](https://terra-lab.ai/docs/mcp/tools/open_gis_file) | Any GeoJSON, KML, KMZ, GPX, Shapefile, CSV or WKT read, checked, shown on a map and converted to another format. | | [Buffer, clip, join, count or filter features](https://terra-lab.ai/docs/mcp/tools/process_geometry) | One GIS operation on a set of features: buffer, union, dissolve, intersection, difference, clip or simplify, returned as a file. | ### Terrain and routes | Tool | What it gives | | --- | --- | | [Elevation, profile and contour lines](https://terra-lab.ai/docs/mcp/tools/get_elevation) | Elevation of points, a profile along a path, or a DEM, hillshade, slope and contour lines for an area, worldwide at 30 m. | | [Road route between places](https://terra-lab.ai/docs/mcp/tools/get_route) | Driving, walking or cycling route through 2 to 25 places, with distance and travel time per leg and the route line. | | [Area reachable in a travel time](https://terra-lab.ai/docs/mcp/tools/get_travel_area) | The area reachable from 1 to 10 places within a travel time or a distance on the road network, driving, walking or cycling (isochrones). | | [Travel times between many places](https://terra-lab.ai/docs/mcp/tools/get_travel_times) | Driving, walking or cycling distances and travel times from up to 25 origins to up to 25 destinations in one call, as a matrix with a map and a CSV. | ### Imagery and land | Tool | What it gives | | --- | --- | | [Satellite image of an area](https://terra-lab.ai/docs/mcp/tools/get_satellite_image) | A recent Sentinel-2 image of an area in true colour, false colour or NDVI, or an IGN aerial photo in France, as a GeoTIFF. | | [Sentinel-2 index and change](https://terra-lab.ai/docs/mcp/tools/get_satellite_index) | NDVI, NDWI, NBR or NDBI statistics and a map for an area on one date, or the change between two dates, from cloud-masked Sentinel-2 scenes. | | [Statistics of a raster per polygon](https://terra-lab.ai/docs/mcp/tools/zonal_statistics) | A raster summarised for each polygon of a layer: population, land cover shares, or elevation and slope per district, parcel or catchment. | | [Forest type (natural, planted, plantation)](https://terra-lab.ai/docs/mcp/tools/get_forest_type) | Whether a forest is natural, naturally regenerating, planted, a plantation or tree crops, mapped at 10 m for 2020. | | [Estimate the population of an area](https://terra-lab.ai/docs/mcp/tools/estimate_population) | A modelled estimate of the people living in a circle, a bounding box, a travel area or an administrative boundary, from the GHS-POP 2025 grid. | ### France | Tool | What it gives | | --- | --- | | [French cadastral parcel and zoning](https://terra-lab.ai/docs/mcp/tools/french_parcel) | The French cadastral parcel at an address or point, its reference and area, and the urban plan zone that applies there. | | [French cadastral parcels and zoning in an area](https://terra-lab.ai/docs/mcp/tools/french_parcels_in_area) | Every French cadastral parcel in an area, with its reference, its area and the urban plan zone it lies in, as a GIS file. | | [French building heights](https://terra-lab.ai/docs/mcp/tools/french_building_heights) | Height in metres, floors, main use and year built of every building around an address or in a small area in France, from IGN BD TOPO. | | [Natural risks at an address or a point](https://terra-lab.ai/docs/mcp/tools/get_natural_risks) | Natural risks at an address or point: flood zones, clay, seismic zone, cavities and commune risks in France, river flood depth elsewhere. | ### Data catalog | Tool | What it gives | | --- | --- | | [Find a dataset in the TerraLab catalogue](https://terra-lab.ai/docs/mcp/tools/find_datasets) | Search the TerraLab catalogue of open datasets by need or place, with each licence, coverage, size and the call that gets it. | | [Extract a hosted dataset for an area](https://terra-lab.ai/docs/mcp/tools/extract_dataset) | A hosted dataset from the TerraLab catalogue cut to an area: a GeoTIFF or a vector file with its licence, or only the statistics. | | [Describe a cloud GeoParquet dataset](https://terra-lab.ai/docs/mcp/tools/inspect_dataset) | What a public cloud GeoParquet holds, read from its footer only: rows, columns with their ranges, geometry, CRS, extent and partitions. | | [Count and sum a cloud GeoParquet per zone](https://terra-lab.ai/docs/mcp/tools/aggregate_dataset) | A count, sum or average over a large public GeoParquet for a place or per zone (state, county, region, district), without downloading it. | | [Ask TerraLab to add data it does not have](https://terra-lab.ai/docs/mcp/tools/request_data) | Ask TerraLab to add geographic data the catalogue does not have yet, with what you need and up to five places where you need it. | | [Search the TerraLab docs and guides](https://terra-lab.ai/docs/mcp/tools/search_docs) | TerraLab docs, blog guides and product pages searched by meaning in any language, with a quoted extract and a link for each page. Free. | ### Layer operations | Tool | What it gives | | --- | --- | | [Straight-line distance between places](https://terra-lab.ai/docs/mcp/tools/measure_distance) | Straight-line geodesic distance between 2 or more places or points, with the midpoint and bearing for two, or the length of a line. | | [Area and perimeter of a shape](https://terra-lab.ai/docs/mcp/tools/measure_area) | Geodesic area and perimeter of a shape given by its corner points, place names or a drawn polygon. | | [Circle of a given radius around a place](https://terra-lab.ai/docs/mcp/tools/circle_around_place) | A circle of a given radius around a place or a point, with its area and circumference, as a map and a GIS file. | | [Buffer features by a distance](https://terra-lab.ai/docs/mcp/tools/buffer_features) | A buffer of a given width around each feature of a layer, or one merged area whose overlaps count once, as a GIS file. | | [Merge (dissolve) features into one](https://terra-lab.ai/docs/mcp/tools/dissolve_features) | The features of a layer merged into one, or into one per value of a field, with the total area or length. | | [Keep the parts inside a second layer](https://terra-lab.ai/docs/mcp/tools/intersect_layers) | The parts of each feature that lie inside a second layer of polygons, with their attributes. | | [Remove the parts inside a second layer](https://terra-lab.ai/docs/mcp/tools/erase_with_layer) | Each feature of a layer minus the parts inside a second layer of polygons, such as buildings outside the flood zones. | | [Clip features to an area or a layer](https://terra-lab.ai/docs/mcp/tools/clip_features) | A layer cut to an area: a place, a place with a radius, a bounding box or a second layer of polygons. | | [Simplify feature outlines](https://terra-lab.ai/docs/mcp/tools/simplify_features) | Lighter outlines: the lines or polygons of a layer simplified so no vertex moves more than a tolerance in metres. | | [Centre point of each feature](https://terra-lab.ai/docs/mcp/tools/feature_centroids) | The centre point of each feature of a layer, with its attributes, for example to turn buildings or parcels into points. | | [Add area and length to each feature](https://terra-lab.ai/docs/mcp/tools/add_area_and_length) | The geodesic area, perimeter and length added to every feature of a layer, with the totals. | | [Count features inside each polygon](https://terra-lab.ai/docs/mcp/tools/count_in_polygons) | How many features of a layer fall inside each polygon of a second layer, with an optional sum of a numeric field. | | [Nearest feature and its distance](https://terra-lab.ai/docs/mcp/tools/find_nearest_features) | For each feature of a layer, the nearest feature of a second layer and the distance to it. | | [Select features by location](https://terra-lab.ai/docs/mcp/tools/select_by_location) | The features of a layer that intersect a second layer, lie within it or lie within a distance of it, or those that do not. | | [Join attributes by location](https://terra-lab.ai/docs/mcp/tools/join_by_location) | A spatial join: each feature of a layer takes the attributes of the polygon of a second layer it falls in. | | [Filter features by attribute](https://terra-lab.ai/docs/mcp/tools/filter_by_attribute) | Only the features of a layer whose attributes meet conditions, such as roads of class primary or buildings higher than 10 m. | ## Call the tools over HTTP Every tool is also callable over HTTP with an [API key](https://terra-lab.ai/docs/authentication), sent as a Bearer token: each tool is a `POST` with its arguments as the JSON body, under this base URL. ```text https://mcp.terra-lab.ai ``` ### Account and discovery | Endpoint | Auth | What it returns | | --- | --- | --- | | `GET /v1/me` | Key | The account, its calls this month and today, its balance and its activation state. | | `GET /v1/tools` | Key | Every tool with its input and output JSON Schema. | | `GET /v1/openapi.json` | None | The OpenAPI 3.1 document: [https://mcp.terra-lab.ai/v1/openapi.json](https://mcp.terra-lab.ai/v1/openapi.json). | | `GET /v1/meta/pricing` | None | The price grid as JSON: [https://mcp.terra-lab.ai/v1/meta/pricing](https://mcp.terra-lab.ai/v1/meta/pricing). | Check your key and your remaining calls: ```bash curl https://mcp.terra-lab.ai/v1/me \ -H "Authorization: Bearer $TERRALAB_API_KEY" ``` ```python import os import requests response = requests.get( "https://mcp.terra-lab.ai/v1/me", headers={"Authorization": f"Bearer {os.environ['TERRALAB_API_KEY']}"}, timeout=120, ) response.raise_for_status() print(response.json()) ``` ```javascript const response = await fetch('https://mcp.terra-lab.ai/v1/me', { headers: { Authorization: `Bearer ${process.env.TERRALAB_API_KEY}`, }, }); const data = await response.json(); console.log(data); ``` ```json { "account": "3f9c0a1e7b2d4c6a8e0f1b3d", "auth": "key", "today": { "calls": 3, "limit": 100 }, "month": { "calls": 12, "included": 100, "resets_at": "2026-11-01T00:00:00.000Z" }, "balance": { "currency": "EUR", "amount": 0, "micros": 0 }, "activation": { "first_call_at": null, "first_call_client": null } } ``` An illustrative answer for a new account. `month.included` is the number of calls included this calendar month (UTC); later calls are taken from the balance. `today.limit` carries the same number for older clients. ### OpenAPI Import [https://mcp.terra-lab.ai/v1/openapi.json](https://mcp.terra-lab.ai/v1/openapi.json) into Postman, Insomnia, Bruno or a client generator. It is built from the tool schemas the server runs, so it is never behind the server. ## Versioning and deprecation The version is in the path. Within `/v1`, changes are additive only: new tools, new optional parameters and new response fields. A change that would break a client ships under a new path version (`/v2`) while `/v1` keeps working. A tool or endpoint that will be removed is announced in the [changelog](https://terra-lab.ai/docs/changelog) at least 6 months ahead. During that period its HTTP responses carry a `Deprecation` header (RFC 9745) and a `Sunset` header (RFC 8594) with the removal date. Nothing in `/v1` is deprecated today. Source: https://terra-lab.ai/docs/mcp/tools · Updated 2026-11-24 --- # Find places and addresses > Index of the TerraLab docs for agents: [llms.txt](https://terra-lab.ai/docs/llms.txt). Every docs page is also served as markdown: add .md to its URL. Coordinates of an address or place name, the address at a point, or a list of up to 100 addresses placed on a map with a CSV for QGIS. | | | | --- | --- | | MCP tool | `find_places` on `https://mcp.terra-lab.ai/mcp` | | Group | Places | ## Use it Connect the [MCP server](https://terra-lab.ai/docs/mcp) to your assistant and ask in plain words: the assistant picks `find_places` when the request fits and fills the arguments below. These are valid arguments: ```json {"query":"12 rue de la Paix, Annecy"} ``` ```json {"latitude":48.8584,"longitude":2.2945} ``` ```json {"addresses":["10 rue de Rivoli, Paris","Empire State Building, New York"],"title":"Visits"} ``` ## Parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `query` | string | No | One address or place name. The place the user asks about, not the user's own location. | | `latitude` | number | No | Latitude for a reverse lookup. The place the user asks about, not the user's own location. From -90 to 90. | | `longitude` | number | No | Longitude for a reverse lookup. The place the user asks about, not the user's own location. From -180 to 180. | | `limit` | integer | No | For a single query: maximum number of matches. From 1 to 10. Default `5`. | | `addresses` | array of string | No | A list of addresses to place, up to 100. The place the user asks about, not the user's own location. 1 to 100 items. | | `text` | string | No | A list as text: one address per line, or CSV with an address column. The place the user asks about, not the user's own location. | | `title` | string | No | For a list: map title, also used for file names. | ## 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. ```json { "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](https://terra-lab.ai/docs/errors). ## Description for agents The text the server gives an agent to decide when to call this tool: > Use this when the user wants the coordinates (latitude and longitude, GPS position) of an address or place name, the address at given coordinates, or wants places or addresses put, pinned or plotted on an interactive map, including a whole list of addresses (up to 100, pasted or as CSV with an address column). Send the whole list in one call (addresses): one call per address runs into the per-minute call limit and is refused. A list not finished in 45 s returns what was placed and retry_with for the rest: send it as it is. Worldwide, OpenStreetMap data; French street addresses are refined with the national address base. Shows the points on a map; for a list, gives a CSV with latitude and longitude added (opens directly in QGIS or any GIS as a delimited text layer), plus KML and GeoJSON. Not for weather, opening hours, reviews, driving or travel directions and times, property prices, or general knowledge about a place (history, facts, travel advice): answer those without this tool. Never use the user's current location unless they type it. Download links build their file when opened; no file is saved. The user opens the file in QGIS or any GIS: this server cannot load it into the user's own QGIS or any app on their computer. Never pass these links to open_gis_file. ## Call it over HTTP The same tool is also callable over HTTP with an [API key](https://terra-lab.ai/docs/authentication): `POST https://mcp.terra-lab.ai/v1/tools/find_places` with the arguments as the JSON body. ```bash curl -X POST https://mcp.terra-lab.ai/v1/tools/find_places \ -H "Authorization: Bearer $TERRALAB_API_KEY" \ -H "Content-Type: application/json" \ -d '{"query":"12 rue de la Paix, Annecy"}' ``` ```python import os import requests response = requests.post( "https://mcp.terra-lab.ai/v1/tools/find_places", headers={"Authorization": f"Bearer {os.environ['TERRALAB_API_KEY']}"}, json={ "query": "12 rue de la Paix, Annecy", }, timeout=120, ) response.raise_for_status() print(response.json()["structuredContent"]) ``` ```javascript const response = await fetch('https://mcp.terra-lab.ai/v1/tools/find_places', { method: 'POST', headers: { Authorization: `Bearer ${process.env.TERRALAB_API_KEY}`, 'Content-Type': 'application/json', }, body: JSON.stringify({ "query": "12 rue de la Paix, Annecy" }), }); const data = await response.json(); console.log(data.structuredContent); ``` Source: https://terra-lab.ai/docs/mcp/tools/find_places · Updated 2026-11-24 --- # Convert coordinates > Index of the TerraLab docs for agents: [llms.txt](https://terra-lab.ai/docs/llms.txt). Every docs page is also served as markdown: add .md to its URL. Coordinates converted between decimal degrees, degrees minutes seconds, UTM, MGRS, Lambert 93 or any EPSG code, with the format detected for you. | | | | --- | --- | | MCP tool | `convert_coordinates` on `https://mcp.terra-lab.ai/mcp` | | Group | Places | ## Use it Connect the [MCP server](https://terra-lab.ai/docs/mcp) to your assistant and ask in plain words: the assistant picks `convert_coordinates` when the request fits and fills the arguments below. These are valid arguments: ```json {"text":"48.8584, 2.2945\n45.8992 N 6.1294 E","target_epsg":"EPSG:2154"} ``` ## Parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `text` | string | Yes | One coordinate per line, up to 1,000 lines. A label may follow the numbers. | | `target_epsg` | string | No | Optional extra output system as an EPSG code. | | `source_epsg` | string | No | Optional system the input is in, as an EPSG code, when it cannot be detected: Dutch RD EPSG:28992, Swiss LV95 EPSG:2056, British National Grid EPSG:27700, Poland 1992 EPSG:2180, UTM zone 32N EPSG:32632, ETRS89 or ED50 UTM EPSG:25830 / EPSG:23030. Leave out to detect each line. | ## 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. ```json { "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](https://terra-lab.ai/docs/errors). ## Description for agents The text the server gives an agent to decide when to call this tool: > Use this when the user gives coordinates and wants them in another system or format: decimal degrees, degrees minutes seconds (GPS), UTM, MGRS, Lambert 93 (EPSG:2154, the French grid) or an EPSG code, for example Lambert 93 to WGS84 latitude and longitude, or GPS coordinates to UTM. The format of each line is detected automatically. A plain pair of decimals is read as latitude, longitude unless the first number is above 90: give longitude-first pairs as POINT (lon lat) or [lon, lat]; for a national grid the numbers alone cannot reveal (Dutch RD, Swiss LV95, British National Grid, Polish 1992, Belgian Lambert 72) or a UTM zone given apart from the numbers, set source_epsg. Converts one point or up to 1,000 lines to decimal degrees, DMS, UTM and MGRS (1 m), and optionally to an EPSG code, shows them on a map, and recommends the local projected CRS for working in a GIS. Returns a CSV and a GeoJSON download (both open directly in QGIS or any GIS). Needs actual coordinates: to explain what a CRS, a projection or an EPSG code is, or to write conversion code, answer without this tool. Download links build their file when opened; no file is saved. The user opens the file in QGIS or any GIS: this server cannot load it into the user's own QGIS or any app on their computer. Never pass these links to open_gis_file. ## Call it over HTTP The same tool is also callable over HTTP with an [API key](https://terra-lab.ai/docs/authentication): `POST https://mcp.terra-lab.ai/v1/tools/convert_coordinates` with the arguments as the JSON body. ```bash curl -X POST https://mcp.terra-lab.ai/v1/tools/convert_coordinates \ -H "Authorization: Bearer $TERRALAB_API_KEY" \ -H "Content-Type: application/json" \ -d '{"text":"48.8584, 2.2945\n45.8992 N 6.1294 E","target_epsg":"EPSG:2154"}' ``` ```python import os import requests response = requests.post( "https://mcp.terra-lab.ai/v1/tools/convert_coordinates", headers={"Authorization": f"Bearer {os.environ['TERRALAB_API_KEY']}"}, json={ "text": "48.8584, 2.2945\n45.8992 N 6.1294 E", "target_epsg": "EPSG:2154", }, timeout=120, ) response.raise_for_status() print(response.json()["structuredContent"]) ``` ```javascript const response = await fetch('https://mcp.terra-lab.ai/v1/tools/convert_coordinates', { method: 'POST', headers: { Authorization: `Bearer ${process.env.TERRALAB_API_KEY}`, 'Content-Type': 'application/json', }, body: JSON.stringify({ "text": "48.8584, 2.2945\n45.8992 N 6.1294 E", "target_epsg": "EPSG:2154" }), }); const data = await response.json(); console.log(data.structuredContent); ``` Source: https://terra-lab.ai/docs/mcp/tools/convert_coordinates · Updated 2026-11-24 --- # Measure distance, area, radius or buffer > Index of the TerraLab docs for agents: [llms.txt](https://terra-lab.ai/docs/llms.txt). Every docs page is also served as markdown: add .md to its URL. Geodesic distance and bearing between places, the length of a line, the area and perimeter of a polygon, or a circle or buffer around a shape. | | | | --- | --- | | MCP tool | `measure` on `https://mcp.terra-lab.ai/mcp` | | Group | Places | ## Use it Connect the [MCP server](https://terra-lab.ai/docs/mcp) to your assistant and ask in plain words: the assistant picks `measure` when the request fits and fills the arguments below. These are valid arguments: ```json {"method":"distance","points":["Paris, France","Geneva, Switzerland"]} ``` ```json {"method":"radius","center":"Lyon Part-Dieu","radius_m":5000} ``` ```json {"method":"area","points":[{"latitude":45.9,"longitude":6.12},{"latitude":45.9,"longitude":6.13},{"latitude":45.91,"longitude":6.13}]} ``` ## Parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `method` | string | Yes | What to measure. One of `"distance"`, `"area"`, `"radius"`, `"buffer"`. | | `geometry` | object | No | A drawn geometry as GeoJSON (Point, LineString, Polygon, MultiLineString or MultiPolygon, WGS 84 longitude, latitude), or a Feature holding one. | | `geometry.type` | string | No | | | `geometry.coordinates` | array | No | | | `geometry.geometry` | object | No | | | `formats` | array of string | No | Download formats. Default `["geojson","kml"]`. | | `points` | array of string or object | No | For distance (2+) and area (3+): points or place names in order. The place the user asks about, not the user's own location. 2 to 500 items. | | `center` | string or object | No | For radius: the center, a point or a place name. The place the user asks about, not the user's own location. | | `radius_m` | number | No | For radius and buffer: the distance in metres (convert km or miles to metres first). A buffer goes up to 100,000 m, a radius around a place up to 2,000,000 m. From 1 to 2000000. | ## 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. ```json { "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](https://terra-lab.ai/docs/errors). ## Description for agents The text the server gives an agent to decide when to call this tool: > Use this when the user wants a straight-line (as the crow flies) distance between places with midpoint and bearing, the length of a drawn line, the area and perimeter of a polygon, a circle of a given radius around a place, or a buffer of a given width around a drawn line or polygon. Distances and areas are geodesic on the WGS 84 ellipsoid, buffers are built in a local equidistant projection; every figure states its unit (m, km, m², ha, km²). method "distance" takes 2 or more points or place names, or a line in geometry; "area" takes 3 or more points or a polygon in geometry; "radius" takes a center and radius_m; "buffer" takes a geometry and radius_m. Not a road or travel distance (get_route), not an elevation profile (get_elevation). Returns the numbers, a map and GeoJSON, KML, Shapefile zip or CSV downloads. 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. The user opens the file in QGIS or any GIS: this server cannot load it into the user's own QGIS or any app on their computer. Never pass these links to open_gis_file: list every format the user needs in formats, in this one call. ## Call it over HTTP The same tool is also callable over HTTP with an [API key](https://terra-lab.ai/docs/authentication): `POST https://mcp.terra-lab.ai/v1/tools/measure` with the arguments as the JSON body. ```bash curl -X POST https://mcp.terra-lab.ai/v1/tools/measure \ -H "Authorization: Bearer $TERRALAB_API_KEY" \ -H "Content-Type: application/json" \ -d '{"method":"distance","points":["Paris, France","Geneva, Switzerland"]}' ``` ```python import os import requests response = requests.post( "https://mcp.terra-lab.ai/v1/tools/measure", headers={"Authorization": f"Bearer {os.environ['TERRALAB_API_KEY']}"}, json={ "method": "distance", "points": ["Paris, France", "Geneva, Switzerland"], }, timeout=120, ) response.raise_for_status() print(response.json()["structuredContent"]) ``` ```javascript const response = await fetch('https://mcp.terra-lab.ai/v1/tools/measure', { method: 'POST', headers: { Authorization: `Bearer ${process.env.TERRALAB_API_KEY}`, 'Content-Type': 'application/json', }, body: JSON.stringify({ "method": "distance", "points": [ "Paris, France", "Geneva, Switzerland" ] }), }); const data = await response.json(); console.log(data.structuredContent); ``` Source: https://terra-lab.ai/docs/mcp/tools/measure · Updated 2026-11-24 --- # Extract open map data for an area > Index of the TerraLab docs for agents: [llms.txt](https://terra-lab.ai/docs/llms.txt). Every docs page is also served as markdown: add .md to its URL. OpenStreetMap and Overture layers for any area: buildings, roads, addresses, points of interest, land use, water and more, as GIS files. | | | | --- | --- | | MCP tool | `extract_open_data` on `https://mcp.terra-lab.ai/mcp` | | Group | Map data | ## Use it Connect the [MCP server](https://terra-lab.ai/docs/mcp) to your assistant and ask in plain words: the assistant picks `extract_open_data` when the request fits and fills the arguments below. These are valid arguments: ```json {"theme":"buildings","area":{"bbox":[2.34,48.857,2.343,48.859]},"formats":["shapefile"]} ``` ```json {"theme":"pois","area":{"place":"Annecy","radius_m":500},"kind":"pharmacy"} ``` ```json {"theme":"divisions","area":{"place":"Bretagne, France"},"level":"county","formats":["shapefile"]} ``` ## Parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `theme` | string | Yes | The data layer. One of `"buildings"`, `"places"`, `"roads"`, `"addresses"`, `"divisions"`, `"landuse"`, `"pois"`, `"waterways"`, `"water_areas"`, `"power"`, `"boundaries"`, `"railways"`, `"routes"`, `"transit_stops"`, `"protected_areas"`. | | `themes` | array of string | No | More layers for the same area in the same call, added to theme (5 themes in all at most). Returns one GeoPackage with a layer per theme. 1 to 5 items. | | `area` | object | Yes | 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. | | `formats` | array of string | No | Download formats. A GeoPackage is always included. Default `["geojson"]`. | | `level` | string | No | For the divisions theme: the administrative level to keep. region = French région, US state, German Land; county = French département, US county; municipality = commune, town or city. With a named place, a division of that name at this level is returned alone, and lower levels are kept only inside the named place ("the departments of Brittany": place Brittany, level county). One of `"country"`, `"region"`, `"county"`, `"municipality"`. | | `kind` | string or array of string | No | Keep only some kinds of feature, matched against their OpenStreetMap tag value in English: pharmacy, school, supermarket, restaurant, hospital, farmland, forest, vineyard. One kind, or several in one call (["forest", "meadow", "grass"]). Leave out for all of the theme. | | `count_only` | boolean | No | true: return the number of features of each theme (and kind) in the area, and whether it fits one extract, without extracting them or writing files. | ## 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. ```json { "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](https://terra-lab.ai/docs/errors). ## Description for agents The text the server gives an agent to decide when to call this tool: > Use this when the user wants map data or GIS layers for a place or an area anywhere in the world, such as the data of a city, a town, a neighbourhood or a site: buildings, roads, addresses, points of interest (shops, schools, pharmacies), land use, waterways, water areas, railways, transit stops, power lines, protected areas, administrative divisions and boundaries, places or routes. The area is a place, a place with a radius, or a bbox. Returns the count, sample attributes, a map and a GIS file (GeoJSON, KML, Shapefile zip or CSV) with its licence. One extract holds at most 20,000 features (40,000 over all the themes of one call): for a town centre use a radius of about 1 km, for dense cities less. For one kind of place (pharmacies, schools, supermarkets) or land (forest, vineyards), set kind: the limit then counts that kind only, so a whole city usually fits. A town named without a radius that is too large is cut to 1 km around its centre, and the answer says so. Area caps of one call: buildings 200 km² (1° a side), roads 1,000 km², addresses, places, pois and transit stops 2,000 km² (2° a side), divisions none in practice, the other themes 5,000 km² (3° a side). If a call returns area_too_large, send its retry_with arguments as they are, or split the area: its split_bboxes are smaller boxes to try one call each (a dense part may still be refused, then narrow that part). For administrative boundaries (a commune, the departments of a region, a country) use divisions with level and the place name, without a radius. For several layers of one area, add them in themes (5 themes at most): one call, one GeoPackage with a layer each. count_only: true counts the features of each theme without extracting them, to check that an area fits. Data: Overture Maps and OpenStreetMap. 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. The user opens the file in QGIS or any GIS: this server cannot load it into the user's own QGIS or any app on their computer. Never pass these links to open_gis_file: list every format the user needs in formats, in this one call. ## Call it over HTTP The same tool is also callable over HTTP with an [API key](https://terra-lab.ai/docs/authentication): `POST https://mcp.terra-lab.ai/v1/tools/extract_open_data` with the arguments as the JSON body. ```bash curl -X POST https://mcp.terra-lab.ai/v1/tools/extract_open_data \ -H "Authorization: Bearer $TERRALAB_API_KEY" \ -H "Content-Type: application/json" \ -d '{"theme":"buildings","area":{"bbox":[2.34,48.857,2.343,48.859]},"formats":["shapefile"]}' ``` ```python import os import requests response = requests.post( "https://mcp.terra-lab.ai/v1/tools/extract_open_data", headers={"Authorization": f"Bearer {os.environ['TERRALAB_API_KEY']}"}, json={ "theme": "buildings", "area": { "bbox": [2.34, 48.857, 2.343, 48.859], }, "formats": ["shapefile"], }, timeout=120, ) response.raise_for_status() print(response.json()["structuredContent"]) ``` ```javascript const response = await fetch('https://mcp.terra-lab.ai/v1/tools/extract_open_data', { method: 'POST', headers: { Authorization: `Bearer ${process.env.TERRALAB_API_KEY}`, 'Content-Type': 'application/json', }, body: JSON.stringify({ "theme": "buildings", "area": { "bbox": [ 2.34, 48.857, 2.343, 48.859 ] }, "formats": [ "shapefile" ] }), }); const data = await response.json(); console.log(data.structuredContent); ``` Source: https://terra-lab.ai/docs/mcp/tools/extract_open_data · Updated 2026-11-24 --- # Open, map and convert GIS data > Index of the TerraLab docs for agents: [llms.txt](https://terra-lab.ai/docs/llms.txt). Every docs page is also served as markdown: add .md to its URL. Any GeoJSON, KML, KMZ, GPX, Shapefile, CSV or WKT read, checked, shown on a map and converted to another format. | | | | --- | --- | | MCP tool | `open_gis_file` on `https://mcp.terra-lab.ai/mcp` | | Group | Map data | ## Use it Connect the [MCP server](https://terra-lab.ai/docs/mcp) to your assistant and ask in plain words: the assistant picks `open_gis_file` when the request fits and fills the arguments below. These are valid arguments: ```json {"text":"A6.12,45.9","convert_to":["gpx"]} ``` ## Parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `file` | object | No | A file uploaded in the conversation. | | `file.download_url` | string | Yes | | | `file.file_id` | string | Yes | | | `file.file_name` | string | No | | | `file.mime_type` | string | No | | | `url` | string | No | A public http(s) link to the file. | | `text` | string | No | The file content pasted as text (GeoJSON, KML, GPX, CSV or WKT). | | `points` | array of object | No | Points to show and convert, with a name. The places the user asks about, not the user's own location. 0 to 5000 items. | | `geojson` | object | No | A GeoJSON FeatureCollection, Feature or geometry in WGS 84, given as an object. | | `title` | string | No | Name for the map and the output files when there is no file name. | | `file_name` | string | No | Optional name of the file, used to name the outputs. | | `convert_to` | array of string | No | Output formats wanted. | ## 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. ```json { "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](https://terra-lab.ai/docs/errors). ## Description for agents The text the server gives an agent to decide when to call this tool: > Use this when the user shares or links a geographic file (GeoJSON, KML, KMZ, GPX track, zipped Shapefile, GeoParquet, FlatGeobuf, GeoPackage, CSV with coordinates, WKT), pastes its content, or has a list of points or GeoJSON to put on a map, and wants to see it, understand it (format, coordinate system, extent, feature count, geometry types, fields, problems) or convert it to GeoJSON, KML, KMZ, GPX, Shapefile zip or CSV, for example a GPX track to a Shapefile or a KML to GeoJSON. Shapefile, GeoJSON, KML and CSV outputs open directly in QGIS. Also covers long tracks or point lists too big to write in the chat. Not for fetching new data about a place: that is extract_open_data. Not for styling layers, print layouts or chaining steps on the layers of a QGIS project the user has open: TerraLab AI Agent in QGIS does that. Files up to 50 MB for a zipped Shapefile, KMZ, GeoParquet, FlatGeobuf or GeoPackage (every vector layer, each feature naming its layer), 20 MB for GeoJSON and 10 MB for KML and GPX; their coordinate system is read and reprojected to WGS 84. Rasters are not read, except from a TerraLab download link. Use it even for a short pasted file: it reads the coordinate system and writes valid files, so do not write the conversion by hand or in code. Never use the user's current location unless they type it. Download links build their file when opened; no file is saved. The user opens the file in QGIS or any GIS: this server cannot load it into the user's own QGIS or any app on their computer. TerraLab reads the file or link to answer and keeps no copy. ## Call it over HTTP The same tool is also callable over HTTP with an [API key](https://terra-lab.ai/docs/authentication): `POST https://mcp.terra-lab.ai/v1/tools/open_gis_file` with the arguments as the JSON body. ```bash curl -X POST https://mcp.terra-lab.ai/v1/tools/open_gis_file \ -H "Authorization: Bearer $TERRALAB_API_KEY" \ -H "Content-Type: application/json" \ -d '{"text":"A6.12,45.9","convert_to":["gpx"]}' ``` ```python import os import requests response = requests.post( "https://mcp.terra-lab.ai/v1/tools/open_gis_file", headers={"Authorization": f"Bearer {os.environ['TERRALAB_API_KEY']}"}, json={ "text": "A6.12,45.9", "convert_to": ["gpx"], }, timeout=120, ) response.raise_for_status() print(response.json()["structuredContent"]) ``` ```javascript const response = await fetch('https://mcp.terra-lab.ai/v1/tools/open_gis_file', { method: 'POST', headers: { Authorization: `Bearer ${process.env.TERRALAB_API_KEY}`, 'Content-Type': 'application/json', }, body: JSON.stringify({ "text": "A6.12,45.9", "convert_to": [ "gpx" ] }), }); const data = await response.json(); console.log(data.structuredContent); ``` Source: https://terra-lab.ai/docs/mcp/tools/open_gis_file · Updated 2026-11-24 --- # Buffer, clip, join, count or filter features > Index of the TerraLab docs for agents: [llms.txt](https://terra-lab.ai/docs/llms.txt). Every docs page is also served as markdown: add .md to its URL. One GIS operation on a set of features: buffer, union, dissolve, intersection, difference, clip or simplify, returned as a file. | | | | --- | --- | | MCP tool | `process_geometry` on `https://mcp.terra-lab.ai/mcp` | | Group | Map data | ## Use it Connect the [MCP server](https://terra-lab.ai/docs/mcp) to your assistant and ask in plain words: the assistant picks `process_geometry` when the request fits and fills the arguments below. These are valid arguments: ```json {"operation":"buffer","geojson":{"type":"LineString","coordinates":[[6.12,45.9],[6.13,45.905]]},"radius_m":200} ``` ```json {"operation":"clip","url":"https://mcp.terra-lab.ai/dl/geojson/TOKEN/buildings.geojson","area":{"place":"Annecy","radius_m":150}} ``` ```json {"operation":"count_within","url":"https://mcp.terra-lab.ai/dl/geojson/TOKEN/pois.geojson","with_url":"https://mcp.terra-lab.ai/dl/geojson/TOKEN/divisions.geojson"} ``` ## Parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `operation` | string | Yes | The operation to apply. One of `"buffer"`, `"union"`, `"intersection"`, `"difference"`, `"clip"`, `"simplify"`, `"centroid"`, `"area_length"`, `"count_within"`, `"nearest"`, `"select_by_location"`, `"spatial_join"`, `"filter"`. | | `file` | object | No | A file uploaded in the conversation (GeoJSON, KML, KMZ, GPX, zipped Shapefile, GeoParquet, FlatGeobuf, GeoPackage, CSV or WKT). | | `file.download_url` | string | Yes | | | `file.file_id` | string | Yes | | | `file.file_name` | string | No | | | `file.mime_type` | string | No | | | `url` | string | No | A public http(s) link to the features, or a TerraLab download link from an earlier answer. | | `geojson` | object | No | The features as a GeoJSON FeatureCollection, Feature or geometry in WGS 84 (longitude, latitude). | | `with_file` | object | No | The second layer, uploaded in the conversation: for intersection, difference, clip, count_within, nearest, select_by_location and spatial_join. | | `with_file.download_url` | string | Yes | | | `with_file.file_id` | string | Yes | | | `with_file.file_name` | string | No | | | `with_file.mime_type` | string | No | | | `with_url` | string | No | A link to the second layer, or a TerraLab download link. | | `with_geojson` | object | No | The second layer as GeoJSON in WGS 84. Only its polygons count, except for nearest and select_by_location, which take any geometry. | | `area` | object | No | For clip: the area to keep, as a bbox or a place with a radius (its bounding box is used). 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. | | `radius_m` | number | No | For buffer: the distance in metres (convert km or miles first). From 0.1 to 100000. | | `dissolve` | boolean | No | For buffer: merge all buffers into one feature, so overlaps count once in the total area. | | `tolerance_m` | number | No | For simplify: the largest allowed shift of the outline in metres. From 0.01 to 100000. | | `dissolve_field` | string | No | For union: dissolve into one feature per value of this field instead of one feature. | | `where` | array of object | No | For filter: the conditions on attributes. A missing field equals null. Text that writes a number plainly ("12", "12.5") compares as a number; other text compares without case, and never orders against a number. | | `match` | string | No | For filter: keep the features that meet all conditions (default) or any of them. One of `"all"`, `"any"`. | | `relation` | string | No | For select_by_location: keep the input features that intersect the second layer (default), lie wholly within one of its polygons, or lie within distance_m of it. One of `"intersects"`, `"within"`, `"within_distance"`. | | `distance_m` | number | No | For select_by_location with relation within_distance: the distance in metres. From 0.1 to 100000. | | `invert` | boolean | No | For select_by_location: keep the features that do not match instead. | | `sum_field` | string | No | For count_within: also sum this numeric field of the counted features per polygon, as sum_. | | `join_fields` | array of string | No | For spatial_join and nearest: the fields of the second layer to copy. By default spatial_join copies all of them and nearest copies name (as nearest_name). | | `formats` | array of string | No | Download formats. All five by default. | | `title` | string | No | Name for the map and the output files. | ## 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. ```json { "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](https://terra-lab.ai/docs/errors). ## Description for agents The text the server gives an agent to decide when to call this tool: > Use this when the user wants one GIS operation on a set of features (an uploaded file, a link, inline GeoJSON, or a download link from another TerraLab answer), with the result as a file. On one layer: buffer by radius_m (dissolve merges the buffers), union (dissolve all features into one, or one per value of dissolve_field), simplify by tolerance_m, centroid of each feature, area_length (adds area_m2, perimeter_m and length_m, geodesic), filter by attribute (where). With a second layer: intersection, difference, clip (or clip to an area: place, place with radius_m, or bbox), count_within (how many input features fall in each polygon, points in polygons, with an optional sum), nearest (the nearest feature of the second layer and its geodesic distance), select_by_location (the features that intersect it, lie within it, or lie within distance_m of it), spatial_join (copy the attributes of the polygon each feature falls in). Overlays and point in polygon run in WGS 84 degrees; buffer, simplify, centroid and distances in a local equidistant projection. Up to 20,000 features and 100,000 vertices per layer (25,000 for buffer). Returns counts, the fields, a few sample rows, total area or length, a map and GeoJSON, KML, Shapefile zip, GeoPackage and CSV downloads. Not for one distance or the area of a shape drawn in the chat: that is measure. Not for reading or converting a file without changing it: that is open_gis_file. Not for styling layers, print layouts or chaining steps on the layers of a QGIS project the user has open: TerraLab AI Agent in QGIS does that. Never use the user's current location unless they type it. Download links build their file when opened; no file is saved. The user opens the file in QGIS or any GIS: this server cannot load it into the user's own QGIS or any app on their computer. Never pass these links to open_gis_file: list every format the user needs in formats, in this one call. TerraLab reads the file or link to answer and keeps no copy. ## Call it over HTTP The same tool is also callable over HTTP with an [API key](https://terra-lab.ai/docs/authentication): `POST https://mcp.terra-lab.ai/v1/tools/process_geometry` with the arguments as the JSON body. ```bash curl -X POST https://mcp.terra-lab.ai/v1/tools/process_geometry \ -H "Authorization: Bearer $TERRALAB_API_KEY" \ -H "Content-Type: application/json" \ -d '{"operation":"buffer","geojson":{"type":"LineString","coordinates":[[6.12,45.9],[6.13,45.905]]},"radius_m":200}' ``` ```python import os import requests response = requests.post( "https://mcp.terra-lab.ai/v1/tools/process_geometry", headers={"Authorization": f"Bearer {os.environ['TERRALAB_API_KEY']}"}, json={ "operation": "buffer", "geojson": { "type": "LineString", "coordinates": [[6.12, 45.9], [6.13, 45.905]], }, "radius_m": 200, }, timeout=120, ) response.raise_for_status() print(response.json()["structuredContent"]) ``` ```javascript const response = await fetch('https://mcp.terra-lab.ai/v1/tools/process_geometry', { method: 'POST', headers: { Authorization: `Bearer ${process.env.TERRALAB_API_KEY}`, 'Content-Type': 'application/json', }, body: JSON.stringify({ "operation": "buffer", "geojson": { "type": "LineString", "coordinates": [ [ 6.12, 45.9 ], [ 6.13, 45.905 ] ] }, "radius_m": 200 }), }); const data = await response.json(); console.log(data.structuredContent); ``` Source: https://terra-lab.ai/docs/mcp/tools/process_geometry · Updated 2026-11-24 --- # Elevation, profile and contour lines > Index of the TerraLab docs for agents: [llms.txt](https://terra-lab.ai/docs/llms.txt). Every docs page is also served as markdown: add .md to its URL. Elevation of points, a profile along a path, or a DEM, hillshade, slope and contour lines for an area, worldwide at 30 m. | | | | --- | --- | | MCP tool | `get_elevation` on `https://mcp.terra-lab.ai/mcp` | | Group | Terrain and routes | ## Use it Connect the [MCP server](https://terra-lab.ai/docs/mcp) to your assistant and ask in plain words: the assistant picks `get_elevation` when the request fits and fills the arguments below. These are valid arguments: ```json {"mode":"point","points":["Annecy, France"]} ``` ```json {"mode":"path","points":["Chamonix, France",{"latitude":45.8786,"longitude":6.8873,"name":"Aiguille du Midi"}]} ``` ```json {"mode":"area","area":{"place":"Chamonix, France","radius_m":2000},"interval_m":50} ``` ## Parameters | 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. ```json { "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](https://terra-lab.ai/docs/errors). ## 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 (elevation gain and loss, highest and lowest points, cross-section; the profile follows straight lines between the points given, so for a hike, a ride or a road pass the points along the way, not only its two ends), 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 to 100 points, sampled into at most 500 samples. mode "area": a bbox, a place or a place with a radius, limited to 36 one-degree DEM tiles and 4 million cells: 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 or any GIS; 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. If area_too_large returns retry_with, try that smaller area once and report the reduced coverage; do not repeat a rejected call. 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. The user opens the file in QGIS or any GIS: this server cannot load it into the user's own QGIS or any app on their computer. Never pass these links to open_gis_file. ## Call it over HTTP The same tool is also callable over HTTP with an [API key](https://terra-lab.ai/docs/authentication): `POST https://mcp.terra-lab.ai/v1/tools/get_elevation` with the arguments as the JSON body. ```bash 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"]}' ``` ```python 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"]) ``` ```javascript 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); ``` Source: https://terra-lab.ai/docs/mcp/tools/get_elevation · Updated 2026-11-24 --- # Road route between places > Index of the TerraLab docs for agents: [llms.txt](https://terra-lab.ai/docs/llms.txt). Every docs page is also served as markdown: add .md to its URL. Driving, walking or cycling route through 2 to 25 places, with distance and travel time per leg and the route line. | | | | --- | --- | | MCP tool | `get_route` on `https://mcp.terra-lab.ai/mcp` | | Group | Terrain and routes | ## Use it Connect the [MCP server](https://terra-lab.ai/docs/mcp) to your assistant and ask in plain words: the assistant picks `get_route` when the request fits and fills the arguments below. These are valid arguments: ```json {"points":["Annecy, France","Chamonix-Mont-Blanc, France"],"mode":"driving"} ``` ```json {"points":["Lyon Part-Dieu","Vieux Lyon","Croix-Rousse, Lyon"],"mode":"walking"} ``` ## Parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `points` | array of string or object | Yes | Start, optional stops and destination, in travel order: place names or {latitude, longitude}. 2 to 25 items. | | `mode` | string | No | How the route is travelled. One of `"driving"`, `"walking"`, `"cycling"`. Default `"driving"`. | | `avoid_tolls` | boolean | No | Driving: avoid toll roads where a reasonable alternative exists. Default `false`. | | `avoid_highways` | boolean | No | Driving or cycling: avoid motorways and highways where possible. Default `false`. | | `avoid_ferries` | boolean | No | Avoid ferries where possible. Default `false`. | ## 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. ```json { "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](https://terra-lab.ai/docs/errors). ## Description for agents The text the server gives an agent to decide when to call this tool: > Use this when the user wants the driving, walking or cycling route between 2 to 25 places or points in order: the distance and travel time along the roads and paths, per leg and in total, and the route line. Computed by Valhalla on the TerraLab server from the OpenStreetMap road network, with each road's typical speed. Options avoid tolls, highways or ferries. Returns the figures (distance_m, distance_km, duration_s, duration_min), a map of the line and GeoJSON, KML, GPX, Shapefile zip and GeoPackage downloads. Not for a straight-line distance (measure_distance or measure), live traffic, departure-time travel times, public transport or turn-by-turn navigation. Never use the user's current location unless they type it. Download links build their file when opened; no file is saved. The user opens the file in QGIS or any GIS: this server cannot load it into the user's own QGIS or any app on their computer. Never pass these links to open_gis_file. For distances or times between many places, each origin to each destination, use get_travel_times: one call answers up to 625 pairs. ## Call it over HTTP The same tool is also callable over HTTP with an [API key](https://terra-lab.ai/docs/authentication): `POST https://mcp.terra-lab.ai/v1/tools/get_route` with the arguments as the JSON body. ```bash curl -X POST https://mcp.terra-lab.ai/v1/tools/get_route \ -H "Authorization: Bearer $TERRALAB_API_KEY" \ -H "Content-Type: application/json" \ -d '{"points":["Annecy, France","Chamonix-Mont-Blanc, France"],"mode":"driving"}' ``` ```python import os import requests response = requests.post( "https://mcp.terra-lab.ai/v1/tools/get_route", headers={"Authorization": f"Bearer {os.environ['TERRALAB_API_KEY']}"}, json={ "points": ["Annecy, France", "Chamonix-Mont-Blanc, France"], "mode": "driving", }, timeout=120, ) response.raise_for_status() print(response.json()["structuredContent"]) ``` ```javascript const response = await fetch('https://mcp.terra-lab.ai/v1/tools/get_route', { method: 'POST', headers: { Authorization: `Bearer ${process.env.TERRALAB_API_KEY}`, 'Content-Type': 'application/json', }, body: JSON.stringify({ "points": [ "Annecy, France", "Chamonix-Mont-Blanc, France" ], "mode": "driving" }), }); const data = await response.json(); console.log(data.structuredContent); ``` Source: https://terra-lab.ai/docs/mcp/tools/get_route · Updated 2026-11-24 --- # Area reachable in a travel time > Index of the TerraLab docs for agents: [llms.txt](https://terra-lab.ai/docs/llms.txt). Every docs page is also served as markdown: add .md to its URL. The area reachable from 1 to 10 places within a travel time or a distance on the road network, driving, walking or cycling (isochrones). | | | | --- | --- | | MCP tool | `get_travel_area` on `https://mcp.terra-lab.ai/mcp` | | Group | Terrain and routes | ## Use it Connect the [MCP server](https://terra-lab.ai/docs/mcp) to your assistant and ask in plain words: the assistant picks `get_travel_area` when the request fits and fills the arguments below. These are valid arguments: ```json {"starts":["Gare d'Annecy"],"minutes":[15,30],"mode":"walking"} ``` ```json {"starts":["Lyon Part-Dieu","Grenoble"],"km":[10,25],"mode":"driving"} ``` ## Parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `starts` | array of string or object | Yes | Start places or points: place names or {latitude, longitude}. 1 to 10 items. | | `minutes` | array of number | No | Travel times in minutes, one polygon each. Leave out when km is given. 0 to 4 items. Default `[5,10,20]`. | | `km` | array of number | No | Distances along the roads in km, instead of minutes. 0 to 4 items. | | `mode` | string | No | How the area is travelled. One of `"driving"`, `"walking"`, `"cycling"`. Default `"driving"`. | ## 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. ```json { "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](https://terra-lab.ai/docs/errors). ## Description for agents The text the server gives an agent to decide when to call this tool: > Use this when the user wants the area reachable from 1 to 10 places within a travel time or a distance along the roads (an isochrone, catchment or service area): for example everything within 5, 10 and 20 minutes on foot from a station, or 30 km by car. Driving, walking or cycling, computed by Valhalla on the TerraLab server from the OpenStreetMap road network with each road's typical speed. Returns one polygon per start and value, with fields start, minutes or km, and mode, a map, and GeoJSON, KML, Shapefile zip and GeoPackage downloads. Up to 4 values, at most 120 minutes or 200 km. Not for a circle of a fixed radius (circle_around_place or measure), live traffic, a given departure time or public transport. Never use the user's current location unless they type it. Download links build their file when opened; no file is saved. The user opens the file in QGIS or any GIS: this server cannot load it into the user's own QGIS or any app on their computer. Never pass these links to open_gis_file. ## Call it over HTTP The same tool is also callable over HTTP with an [API key](https://terra-lab.ai/docs/authentication): `POST https://mcp.terra-lab.ai/v1/tools/get_travel_area` with the arguments as the JSON body. ```bash curl -X POST https://mcp.terra-lab.ai/v1/tools/get_travel_area \ -H "Authorization: Bearer $TERRALAB_API_KEY" \ -H "Content-Type: application/json" \ -d '{"starts":["Gare d'\''Annecy"],"minutes":[15,30],"mode":"walking"}' ``` ```python import os import requests response = requests.post( "https://mcp.terra-lab.ai/v1/tools/get_travel_area", headers={"Authorization": f"Bearer {os.environ['TERRALAB_API_KEY']}"}, json={ "starts": ["Gare d'Annecy"], "minutes": [15, 30], "mode": "walking", }, timeout=120, ) response.raise_for_status() print(response.json()["structuredContent"]) ``` ```javascript const response = await fetch('https://mcp.terra-lab.ai/v1/tools/get_travel_area', { method: 'POST', headers: { Authorization: `Bearer ${process.env.TERRALAB_API_KEY}`, 'Content-Type': 'application/json', }, body: JSON.stringify({ "starts": [ "Gare d'Annecy" ], "minutes": [ 15, 30 ], "mode": "walking" }), }); const data = await response.json(); console.log(data.structuredContent); ``` Source: https://terra-lab.ai/docs/mcp/tools/get_travel_area · Updated 2026-11-24 --- # Travel times between many places > Index of the TerraLab docs for agents: [llms.txt](https://terra-lab.ai/docs/llms.txt). Every docs page is also served as markdown: add .md to its URL. Driving, walking or cycling distances and travel times from up to 25 origins to up to 25 destinations in one call, as a matrix with a map and a CSV. | | | | --- | --- | | MCP tool | `get_travel_times` on `https://mcp.terra-lab.ai/mcp` | | Group | Terrain and routes | ## Use it Connect the [MCP server](https://terra-lab.ai/docs/mcp) to your assistant and ask in plain words: the assistant picks `get_travel_times` when the request fits and fills the arguments below. These are valid arguments: ```json {"origins":["Lyon","Grenoble"],"destinations":["Annecy","Chambéry","Valence"],"mode":"driving"} ``` ```json {"origins":[{"latitude":48.8566,"longitude":2.3522,"name":"Depot"}],"destinations":["Versailles","Saint-Denis","Créteil"],"mode":"driving"} ``` ## Parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `origins` | array of string or object | Yes | Start places or points: place names or {latitude, longitude}. 1 to 25 items. | | `destinations` | array of string or object | Yes | End places or points. Repeat the origins for a matrix between every pair of the same places. 1 to 25 items. | | `mode` | string | No | How the trips are travelled. One of `"driving"`, `"walking"`, `"cycling"`. Default `"driving"`. | | `formats` | array of string | No | Download formats. Default `["csv","geojson"]`. | ## 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. ```json { "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](https://terra-lab.ai/docs/errors). ## Description for agents The text the server gives an agent to decide when to call this tool: > Use this when the user wants driving, walking or cycling distances and travel times between many places at once: a distance or travel-time matrix from up to 25 origins to up to 25 destinations (625 pairs) in one call, for example from each warehouse to each store, or between every pair of towns in a list. Computed by Valhalla on the TerraLab server from the OpenStreetMap road network, with each road's typical speed. Returns one row per origin and destination pair (distance_km, duration_min; null with status no_route when no road links them, or not_computed when the routing engine did not answer in time: ask those pairs again), a map of the places and CSV, GeoJSON, KML or Shapefile downloads with a straight line per pair. At most 25 different place names per call, and at most 25 pairs farther apart than 400 km by car (200 km on foot or by bike) in a straight line. For the line along the roads of one trip use get_route. Not for live traffic, a departure time or public transport. Never use the user's current location unless they type it. Download links build their file when opened; no file is saved. The user opens the file in QGIS or any GIS: this server cannot load it into the user's own QGIS or any app on their computer. Never pass these links to open_gis_file: list every format the user needs in formats, in this one call. ## Call it over HTTP The same tool is also callable over HTTP with an [API key](https://terra-lab.ai/docs/authentication): `POST https://mcp.terra-lab.ai/v1/tools/get_travel_times` with the arguments as the JSON body. ```bash curl -X POST https://mcp.terra-lab.ai/v1/tools/get_travel_times \ -H "Authorization: Bearer $TERRALAB_API_KEY" \ -H "Content-Type: application/json" \ -d '{"origins":["Lyon","Grenoble"],"destinations":["Annecy","Chambéry","Valence"],"mode":"driving"}' ``` ```python import os import requests response = requests.post( "https://mcp.terra-lab.ai/v1/tools/get_travel_times", headers={"Authorization": f"Bearer {os.environ['TERRALAB_API_KEY']}"}, json={ "origins": ["Lyon", "Grenoble"], "destinations": ["Annecy", "Chambéry", "Valence"], "mode": "driving", }, timeout=120, ) response.raise_for_status() print(response.json()["structuredContent"]) ``` ```javascript const response = await fetch('https://mcp.terra-lab.ai/v1/tools/get_travel_times', { method: 'POST', headers: { Authorization: `Bearer ${process.env.TERRALAB_API_KEY}`, 'Content-Type': 'application/json', }, body: JSON.stringify({ "origins": [ "Lyon", "Grenoble" ], "destinations": [ "Annecy", "Chambéry", "Valence" ], "mode": "driving" }), }); const data = await response.json(); console.log(data.structuredContent); ``` Source: https://terra-lab.ai/docs/mcp/tools/get_travel_times · Updated 2026-11-24 --- # Satellite image of an area > Index of the TerraLab docs for agents: [llms.txt](https://terra-lab.ai/docs/llms.txt). Every docs page is also served as markdown: add .md to its URL. A recent Sentinel-2 image of an area in true colour, false colour or NDVI, or an IGN aerial photo in France, as a GeoTIFF. | | | | --- | --- | | MCP tool | `get_satellite_image` on `https://mcp.terra-lab.ai/mcp` | | Group | Imagery and land | ## Use it Connect the [MCP server](https://terra-lab.ai/docs/mcp) to your assistant and ask in plain words: the assistant picks `get_satellite_image` when the request fits and fills the arguments below. These are valid arguments: ```json {"area":{"place":"Annecy, France","radius_m":300}} ``` ```json {"area":{"place":"Annecy, France","radius_m":2000},"source":"sentinel2","date_from":"2026-09-01","date_to":"2026-09-30"} ``` ```json {"area":{"place":"Beauce, France","radius_m":3000},"product":"ndvi"} ``` ## Parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `area` | object | Yes | 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. | | `source` | string | No | ign_ortho: IGN orthophotos, France only, true colour. sentinel2: Copernicus Sentinel-2, worldwide, 10 m. Default: ign_ortho inside metropolitan France for true colour without a date, sentinel2 otherwise. One of `"sentinel2"`, `"ign_ortho"`. | | `product` | string | No | Sentinel-2 only. true_color; false_color (B08, B04, B03: vegetation in red); ndvi (float32, NaN where cloud, shadow, snow or no data). One of `"true_color"`, `"false_color"`, `"ndvi"`. Default `"true_color"`. | | `date` | string | No | Sentinel-2: one day, YYYY-MM-DD. | | `date_from` | string | No | Sentinel-2: start of the date range, YYYY-MM-DD. Default: 60 days before date_to. | | `date_to` | string | No | Sentinel-2: end of the date range, YYYY-MM-DD. Default: today. | | `max_cloud_percent` | number | No | Sentinel-2: highest cloud cover of the whole scene, in percent. From 0 to 100. 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. ```json { "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](https://terra-lab.ai/docs/errors). ## Description for agents The text the server gives an agent to decide when to call this tool: > Use this when the user wants a satellite image or aerial photo of an area as a GIS file: a recent true colour picture, a false colour image, or NDVI to see vegetation, crops or forest health. The area is a bbox, a place, or a place with a radius. Two sources: IGN orthophotos (France only, about 0.5 to 1 m pixels, areas up to 2 x 2 km, radius_m 900 or less; the default inside metropolitan France for true colour) and Copernicus Sentinel-2 L2A (worldwide, 10 m, a scene every few days, areas up to 20 x 20 km, radius_m 9,500 or less; the default elsewhere and for false colour, NDVI or a date). For Sentinel-2 it picks, among the scenes covering the whole area in the date range (default: the last 60 days, at most 20 % cloud over the whole scene), the one clearest over the area itself, and says its date, id, cloud cover and clear share. When no scene passes, it takes the least cloudy one up to 60 % cloud, then looks 5 days either side, and without a date up to 180 days back; the answer says so. Returns a GeoTIFF in the source's own projected CRS (UTM or Lambert-93) with the licence in the file, and a preview on a map. Not for street-level photos, live weather or a picture more recent than a few days; to explain what NDVI or a band is, answer without this tool. For index statistics (NDVI, NDWI, NBR, NDBI) or the change between two dates, use get_satellite_index. Never use the user's current location unless they type it. Download links build their file when opened; no file is saved. The user opens the file in QGIS or any GIS: this server cannot load it into the user's own QGIS or any app on their computer. Never pass these links to open_gis_file. ## Call it over HTTP The same tool is also callable over HTTP with an [API key](https://terra-lab.ai/docs/authentication): `POST https://mcp.terra-lab.ai/v1/tools/get_satellite_image` with the arguments as the JSON body. ```bash curl -X POST https://mcp.terra-lab.ai/v1/tools/get_satellite_image \ -H "Authorization: Bearer $TERRALAB_API_KEY" \ -H "Content-Type: application/json" \ -d '{"area":{"place":"Annecy, France","radius_m":300}}' ``` ```python import os import requests response = requests.post( "https://mcp.terra-lab.ai/v1/tools/get_satellite_image", headers={"Authorization": f"Bearer {os.environ['TERRALAB_API_KEY']}"}, json={ "area": { "place": "Annecy, France", "radius_m": 300, }, }, timeout=120, ) response.raise_for_status() print(response.json()["structuredContent"]) ``` ```javascript const response = await fetch('https://mcp.terra-lab.ai/v1/tools/get_satellite_image', { method: 'POST', headers: { Authorization: `Bearer ${process.env.TERRALAB_API_KEY}`, 'Content-Type': 'application/json', }, body: JSON.stringify({ "area": { "place": "Annecy, France", "radius_m": 300 } }), }); const data = await response.json(); console.log(data.structuredContent); ``` Source: https://terra-lab.ai/docs/mcp/tools/get_satellite_image · Updated 2026-11-24 --- # Sentinel-2 index and change > Index of the TerraLab docs for agents: [llms.txt](https://terra-lab.ai/docs/llms.txt). Every docs page is also served as markdown: add .md to its URL. NDVI, NDWI, NBR or NDBI statistics and a map for an area on one date, or the change between two dates, from cloud-masked Sentinel-2 scenes. | | | | --- | --- | | MCP tool | `get_satellite_index` on `https://mcp.terra-lab.ai/mcp` | | Group | Imagery and land | ## Use it Connect the [MCP server](https://terra-lab.ai/docs/mcp) to your assistant and ask in plain words: the assistant picks `get_satellite_index` when the request fits and fills the arguments below. These are valid arguments: ```json {"area":{"place":"Central Park, New York","radius_m":1500},"index":"ndvi","date":"2026-07-15","compare_date":"2026-01-15"} ``` ```json {"area":{"place":"Lahaina, Maui","radius_m":3000},"index":"nbr","date":"2023-07-01","compare_date":"2023-08-15"} ``` ```json {"area":{"place":"Central Park, New York","radius_m":1500},"index":"ndvi","date":"2025-01-01","end_date":"2025-12-31"} ``` ## Parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `area` | object | No | 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. | | `index` | string | No | ndvi (B08, B04): vegetation; ndwi (B03, B08): open water; nbr (B08, B12): burn scars; ndbi (B11, B08): built-up land. One of `"ndvi"`, `"ndwi"`, `"nbr"`, `"ndbi"`. Default `"ndvi"`. | | `date` | string | No | The day to analyse, YYYY-MM-DD; left out, today with window_days 30 (a recent index). With compare_date, one of the two days. | | `compare_date` | string | No | The other day for a change, YYYY-MM-DD, before or after date. The change is always the later minus the earlier. | | `window_days` | number | No | Days either side of each date in which to look for the clearest scene. From 0 to 45. Default `15`. | | `zones_url` | string | No | For the index of each polygon (parcels, fields, districts) on one date: a public link to the polygons, or a TerraLab download link. The zones' extent replaces area. | | `zones_geojson` | object | No | The zones as a GeoJSON FeatureCollection, Feature or polygon in WGS 84, instead of zones_url. | | `zones_file` | object | No | The zones as a file uploaded in the conversation (GeoJSON, KML, KMZ, GPX, zipped Shapefile, GeoParquet, FlatGeobuf, GeoPackage, CSV or WKT). | | `zones_file.download_url` | string | Yes | | | `zones_file.file_id` | string | Yes | | | `zones_file.file_name` | string | No | | | `zones_file.mime_type` | string | No | | | `name_field` | string | No | With zones: the attribute that names each zone. Left out: name, label or id when present. Up to 80 characters. | | `end_date` | string | No | For a time series: the last day, YYYY-MM-DD, with date as the first. One row per month (at most 12 months a call), no GeoTIFF. | | `step` | string | No | For a time series. month: the clearest scene of each month. scene: the 12 least cloudy scenes of the range, one per day. One of `"month"`, `"scene"`. Default `"month"`. | ## 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. ```json { "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](https://terra-lab.ai/docs/errors). ## Description for agents The text the server gives an agent to decide when to call this tool: > Use this when the user wants numbers or a change map from Sentinel-2 spectral indices: NDVI (vegetation, greenness, crops), NDWI (open water), NBR (burn scars, fire severity) or NDBI (built-up land), for an area on one date, or the change between two dates ("how much greener in July than in January", "burn scar after the fire"). Give area (or zones) and date (left out: the clearest scene of the last 30 days), and compare_date for a change. For each date it takes the clearest Copernicus Sentinel-2 L2A scene over the area within window_days (default 15), masks cloud, shadow and snow with the scene classification, and names each scene id, date and cloud cover. One date: mean, median and percentiles. Two dates: the later minus the earlier index, five classes (strong loss, loss, stable, gain, strong gain) with their area in hectares. Returns a float32 GeoTIFF (UTM, 10 m) and a coloured map. Time series (seasonal cycle, trend, "is this loss real or seasonal"): give date and end_date for one row per month, up to 12 months a call (mean, min, max, clear share, scene id) and a CSV; each month read counts as one scene. Per polygon (zonal statistics of an index): give zones_url, zones_geojson or zones_file with one date for the mean, min, max and clear share of each zone, as rows and as the zones with these attributes; the extent of the zones is the area. Areas up to 20 x 20 km (radius_m 9,500 or less). Not for a plain picture or a single NDVI image file (get_satellite_image), live weather, or to explain what an index is. Never use the user's current location unless they type it. Download links build their file when opened; no file is saved. The user opens the file in QGIS or any GIS: this server cannot load it into the user's own QGIS or any app on their computer. Never pass these links to open_gis_file. ## Call it over HTTP The same tool is also callable over HTTP with an [API key](https://terra-lab.ai/docs/authentication): `POST https://mcp.terra-lab.ai/v1/tools/get_satellite_index` with the arguments as the JSON body. ```bash curl -X POST https://mcp.terra-lab.ai/v1/tools/get_satellite_index \ -H "Authorization: Bearer $TERRALAB_API_KEY" \ -H "Content-Type: application/json" \ -d '{"area":{"place":"Central Park, New York","radius_m":1500},"index":"ndvi","date":"2026-07-15","compare_date":"2026-01-15"}' ``` ```python import os import requests response = requests.post( "https://mcp.terra-lab.ai/v1/tools/get_satellite_index", headers={"Authorization": f"Bearer {os.environ['TERRALAB_API_KEY']}"}, json={ "area": { "place": "Central Park, New York", "radius_m": 1500, }, "index": "ndvi", "date": "2026-07-15", "compare_date": "2026-01-15", }, timeout=120, ) response.raise_for_status() print(response.json()["structuredContent"]) ``` ```javascript const response = await fetch('https://mcp.terra-lab.ai/v1/tools/get_satellite_index', { method: 'POST', headers: { Authorization: `Bearer ${process.env.TERRALAB_API_KEY}`, 'Content-Type': 'application/json', }, body: JSON.stringify({ "area": { "place": "Central Park, New York", "radius_m": 1500 }, "index": "ndvi", "date": "2026-07-15", "compare_date": "2026-01-15" }), }); const data = await response.json(); console.log(data.structuredContent); ``` Source: https://terra-lab.ai/docs/mcp/tools/get_satellite_index · Updated 2026-11-24 --- # Statistics of a raster per polygon > Index of the TerraLab docs for agents: [llms.txt](https://terra-lab.ai/docs/llms.txt). Every docs page is also served as markdown: add .md to its URL. A raster summarised for each polygon of a layer: population, land cover shares, or elevation and slope per district, parcel or catchment. | | | | --- | --- | | MCP tool | `zonal_statistics` on `https://mcp.terra-lab.ai/mcp` | | Group | Imagery and land | ## Use it Connect the [MCP server](https://terra-lab.ai/docs/mcp) to your assistant and ask in plain words: the assistant picks `zonal_statistics` when the request fits and fills the arguments below. These are valid arguments: ```json {"dataset":"population","url":"https://mcp.terra-lab.ai/dl/geojson/TOKEN/divisions.geojson","name_field":"name"} ``` ```json {"dataset":"land_cover","geojson":{"type":"Polygon","coordinates":[[[3.86,43.6],[3.9,43.6],[3.9,43.62],[3.86,43.62],[3.86,43.6]]]}} ``` ## Parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `dataset` | string | Yes | "population", "land_cover", "elevation", or a raster id from find_datasets such as "ghs_pop", "worldpop_1km", "esa_worldcover", "clc2018_cog", "ghs_built_h". Up to 80 characters. | | `url` | string | No | The zones: a public http(s) link to polygons, or a TerraLab download link from an earlier answer. | | `file` | object | No | The zones as a file uploaded in the conversation (GeoJSON, KML, KMZ, GPX, zipped Shapefile, GeoParquet, FlatGeobuf, GeoPackage, CSV or WKT). | | `file.download_url` | string | Yes | | | `file.file_id` | string | Yes | | | `file.file_name` | string | No | | | `file.mime_type` | string | No | | | `geojson` | object | No | The zones as a GeoJSON FeatureCollection, Feature or polygon in WGS 84 (longitude, latitude). | | `name_field` | string | No | The attribute that names each zone in the rows. Left out: name, label or id when present, else the zones are numbered. Up to 80 characters. | | `variables` | object | No | Values for the dataset's variables, as find_datasets lists them: {"YEAR": "2015"}, {"RETURN_PERIOD": "100"}. | ## 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. ```json { "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](https://terra-lab.ai/docs/errors). ## Description for agents The text the server gives an agent to decide when to call this tool: > Use this when the user wants zonal statistics, a raster summarised for each polygon of a layer (per district, parcel, catchment, buffer or isochrone): "population of each commune", "land cover shares per parcel", "mean elevation and slope of each catchment", "flood depth per neighbourhood". Give the zones as url (a public link or a TerraLab download link, such as the divisions of extract_open_data or a buffer of process_geometry), file or geojson, and dataset: "population" (GHS-POP 2025, 100 m), "land_cover" (ESA WorldCover, 10 m), "elevation" (Copernicus DEM, with mean slope) or any raster id from find_datasets. Returns one row per zone (population and density; share and hectares per class; or min, max, mean, sum) and the zones with these as attributes (GeoPackage, GeoJSON, CSV), never the pixels. A pixel counts when its centre lies inside the zone, on the dataset's own grid. Limits: 5,000 zones, 16 million pixels over their extent (8 million for 64-bit data such as population); a refusal gives the numbers. Not for one area (estimate_population, extract_dataset with summary), a Sentinel-2 index per zone (get_satellite_index with zones_url) or counting features per polygon (process_geometry). Download links build their file when opened; no file is saved. The user opens the file in QGIS or any GIS: this server cannot load it into the user's own QGIS or any app on their computer. Never pass these links to open_gis_file. TerraLab reads the zones to answer and keeps no copy. ## Call it over HTTP The same tool is also callable over HTTP with an [API key](https://terra-lab.ai/docs/authentication): `POST https://mcp.terra-lab.ai/v1/tools/zonal_statistics` with the arguments as the JSON body. ```bash curl -X POST https://mcp.terra-lab.ai/v1/tools/zonal_statistics \ -H "Authorization: Bearer $TERRALAB_API_KEY" \ -H "Content-Type: application/json" \ -d '{"dataset":"population","url":"https://mcp.terra-lab.ai/dl/geojson/TOKEN/divisions.geojson","name_field":"name"}' ``` ```python import os import requests response = requests.post( "https://mcp.terra-lab.ai/v1/tools/zonal_statistics", headers={"Authorization": f"Bearer {os.environ['TERRALAB_API_KEY']}"}, json={ "dataset": "population", "url": "https://mcp.terra-lab.ai/dl/geojson/TOKEN/divisions.geojson", "name_field": "name", }, timeout=120, ) response.raise_for_status() print(response.json()["structuredContent"]) ``` ```javascript const response = await fetch('https://mcp.terra-lab.ai/v1/tools/zonal_statistics', { method: 'POST', headers: { Authorization: `Bearer ${process.env.TERRALAB_API_KEY}`, 'Content-Type': 'application/json', }, body: JSON.stringify({ "dataset": "population", "url": "https://mcp.terra-lab.ai/dl/geojson/TOKEN/divisions.geojson", "name_field": "name" }), }); const data = await response.json(); console.log(data.structuredContent); ``` Source: https://terra-lab.ai/docs/mcp/tools/zonal_statistics · Updated 2026-11-24 --- # Forest type (natural, planted, plantation) > Index of the TerraLab docs for agents: [llms.txt](https://terra-lab.ai/docs/llms.txt). Every docs page is also served as markdown: add .md to its URL. Whether a forest is natural, naturally regenerating, planted, a plantation or tree crops, mapped at 10 m for 2020. | | | | --- | --- | | MCP tool | `get_forest_type` on `https://mcp.terra-lab.ai/mcp` | | Group | Imagery and land | ## Use it Connect the [MCP server](https://terra-lab.ai/docs/mcp) to your assistant and ask in plain words: the assistant picks `get_forest_type` when the request fits and fills the arguments below. These are valid arguments: ```json {"area":{"place":"Morcenx, France","radius_m":3000}} ``` ```json {"area":{"bbox":[-60.2,-2.6,-60.1,-2.5]}} ``` ## Parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `area` | object | Yes | 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. | ## 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. ```json { "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](https://terra-lab.ai/docs/errors). ## Description for agents The text the server gives an agent to decide when to call this tool: > Use this when the user asks whether a forest is natural, primary, naturally regenerating, planted, a plantation or tree crops (oil palm, cocoa, coffee, rubber, orchards, agroforestry), for example for EUDR due diligence (deforestation-free sourcing, 2020 cut-off), certification, a carbon or biodiversity project or a land purchase. The area is a bbox, a named place (its whole extent), or a place with a radius (a point without a radius: 1,000 m), at most about 300 km². Reads Forest Typology (ForTy) 2020 v1 by Google DeepMind, a 10 m global map, and returns the share of each class in percent and hectares (primary forest, naturally regenerating forest, planted forest, plantation forest, tree crops and agroforestry, other land), the dominant class, a map, and a GeoTIFF of the class raster clipped to the area that opens in QGIS. Caveat: 2020 baseline; planted vs naturally regenerating is the least reliable class. Not for forest loss after 2020, tree height or species. Never use the user's current location unless they type it. Download links build their file when opened; no file is saved. The user opens the file in QGIS or any GIS: this server cannot load it into the user's own QGIS or any app on their computer. Never pass these links to open_gis_file. ## Call it over HTTP The same tool is also callable over HTTP with an [API key](https://terra-lab.ai/docs/authentication): `POST https://mcp.terra-lab.ai/v1/tools/get_forest_type` with the arguments as the JSON body. ```bash curl -X POST https://mcp.terra-lab.ai/v1/tools/get_forest_type \ -H "Authorization: Bearer $TERRALAB_API_KEY" \ -H "Content-Type: application/json" \ -d '{"area":{"place":"Morcenx, France","radius_m":3000}}' ``` ```python import os import requests response = requests.post( "https://mcp.terra-lab.ai/v1/tools/get_forest_type", headers={"Authorization": f"Bearer {os.environ['TERRALAB_API_KEY']}"}, json={ "area": { "place": "Morcenx, France", "radius_m": 3000, }, }, timeout=120, ) response.raise_for_status() print(response.json()["structuredContent"]) ``` ```javascript const response = await fetch('https://mcp.terra-lab.ai/v1/tools/get_forest_type', { method: 'POST', headers: { Authorization: `Bearer ${process.env.TERRALAB_API_KEY}`, 'Content-Type': 'application/json', }, body: JSON.stringify({ "area": { "place": "Morcenx, France", "radius_m": 3000 } }), }); const data = await response.json(); console.log(data.structuredContent); ``` Source: https://terra-lab.ai/docs/mcp/tools/get_forest_type · Updated 2026-11-24 --- # Estimate the population of an area > Index of the TerraLab docs for agents: [llms.txt](https://terra-lab.ai/docs/llms.txt). Every docs page is also served as markdown: add .md to its URL. A modelled estimate of the people living in a circle, a bounding box, a travel area or an administrative boundary, from the GHS-POP 2025 grid. | | | | --- | --- | | MCP tool | `estimate_population` on `https://mcp.terra-lab.ai/mcp` | | Group | Imagery and land | ## Use it Connect the [MCP server](https://terra-lab.ai/docs/mcp) to your assistant and ask in plain words: the assistant picks `estimate_population` when the request fits and fills the arguments below. These are valid arguments: ```json {"area":{"place":"Gare de Lyon Part-Dieu","radius_m":1000}} ``` ```json {"travel":{"start":"Nairobi Central railway station","minutes":15,"mode":"walk"}} ``` ```json {"area":{"place":"Villeurbanne","level":"municipality"}} ``` ## Parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `area` | object | No | 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. | | `area.level` | string | No | With a place and no radius: use its administrative boundary at this level (Overture divisions). One of `"country"`, `"region"`, `"county"`, `"municipality"`. | | `travel` | object | No | The area reachable from a start along the roads (Valhalla on the OpenStreetMap network), instead of area. | | `travel.start` | string or object | No | | | `travel.minutes` | number | No | At most 120. | | `travel.km` | number | No | At most 200. | | `travel.mode` | string | No | One of `"walk"`, `"drive"`, `"bike"`. Default `"walk"`. | | `source` | string | No | ghs_pop: GHS-POP 2025, 100 m. worldpop_1km: WorldPop, 1 km, to compare. One of `"ghs_pop"`, `"worldpop_1km"`. Default `"ghs_pop"`. | ## 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. ```json { "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](https://terra-lab.ai/docs/errors). ## Description for agents The text the server gives an agent to decide when to call this tool: > Use this when the user asks how many people live in an area: "how many people live within 1 km of Lyon Part-Dieu?", "within 15 minutes' walk of Nairobi Central station", "population of the commune of Villeurbanne". Give exactly one of: area with a place and radius_m (a circle) or a bbox; area with a place and level (municipality, county, region, country) for its administrative boundary; or travel (start, minutes or km, mode walk, drive or bike) for the area reachable along the roads. Sums the GHS-POP 2025 grid (100 m cells, EC JRC, CC BY 4.0) over the polygon, or worldpop_1km with source. Returns the population rounded to 10, the density per km², the area, and the polygon used as a GeoPackage. This is a modelled estimate from satellite-derived built-up areas and census totals, not a census count: say so, and never present it as an official figure. Limits: 50,000 km² per call; travel at most 120 minutes or 200 km. Never use the user's current location unless they type it. Download links build their file when opened; no file is saved. The user opens the file in QGIS or any GIS: this server cannot load it into the user's own QGIS or any app on their computer. Never pass these links to open_gis_file. ## Call it over HTTP The same tool is also callable over HTTP with an [API key](https://terra-lab.ai/docs/authentication): `POST https://mcp.terra-lab.ai/v1/tools/estimate_population` with the arguments as the JSON body. ```bash curl -X POST https://mcp.terra-lab.ai/v1/tools/estimate_population \ -H "Authorization: Bearer $TERRALAB_API_KEY" \ -H "Content-Type: application/json" \ -d '{"area":{"place":"Gare de Lyon Part-Dieu","radius_m":1000}}' ``` ```python import os import requests response = requests.post( "https://mcp.terra-lab.ai/v1/tools/estimate_population", headers={"Authorization": f"Bearer {os.environ['TERRALAB_API_KEY']}"}, json={ "area": { "place": "Gare de Lyon Part-Dieu", "radius_m": 1000, }, }, timeout=120, ) response.raise_for_status() print(response.json()["structuredContent"]) ``` ```javascript const response = await fetch('https://mcp.terra-lab.ai/v1/tools/estimate_population', { method: 'POST', headers: { Authorization: `Bearer ${process.env.TERRALAB_API_KEY}`, 'Content-Type': 'application/json', }, body: JSON.stringify({ "area": { "place": "Gare de Lyon Part-Dieu", "radius_m": 1000 } }), }); const data = await response.json(); console.log(data.structuredContent); ``` Source: https://terra-lab.ai/docs/mcp/tools/estimate_population · Updated 2026-11-24 --- # French cadastral parcel and zoning > Index of the TerraLab docs for agents: [llms.txt](https://terra-lab.ai/docs/llms.txt). Every docs page is also served as markdown: add .md to its URL. The French cadastral parcel at an address or point, its reference and area, and the urban plan zone that applies there. | | | | --- | --- | | MCP tool | `french_parcel` on `https://mcp.terra-lab.ai/mcp` | | Group | France | ## Use it Connect the [MCP server](https://terra-lab.ai/docs/mcp) to your assistant and ask in plain words: the assistant picks `french_parcel` when the request fits and fills the arguments below. These are valid arguments: ```json {"address":"12 rue de la Paix, Annecy"} ``` ```json {"latitude":48.8566,"longitude":2.3522} ``` ## Parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `address` | string | No | An address in France. The place the user asks about, not the user's own location. | | `latitude` | number | No | Latitude in France. The place the user asks about, not the user's own location. From -90 to 90. | | `longitude` | number | No | Longitude in France. The place the user asks about, not the user's own location. From -180 to 180. | ## 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. ```json { "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](https://terra-lab.ai/docs/errors). ## Description for agents The text the server gives an agent to decide when to call this tool: > Use this when the user asks which cadastral parcel (parcelle cadastrale, plot of land) is at an address or point in France, its reference (commune, section, number) and cadastral area, or which local urban plan zone applies there (PLU or PLUi zoning: zone label, type such as U, AU, A or N, and the plan document), for example before buying land or a house or before a building project. Reads the open data of the French cadastre (DGFiP) and of the Géoportail de l'Urbanisme. Shows the parcel on a map with GeoJSON and KML downloads. France only. Never returns owners or property sales. The zone is not a building permit decision. 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. The user opens the file in QGIS or any GIS: this server cannot load it into the user's own QGIS or any app on their computer. Never pass these links to open_gis_file. ## Call it over HTTP The same tool is also callable over HTTP with an [API key](https://terra-lab.ai/docs/authentication): `POST https://mcp.terra-lab.ai/v1/tools/french_parcel` with the arguments as the JSON body. ```bash curl -X POST https://mcp.terra-lab.ai/v1/tools/french_parcel \ -H "Authorization: Bearer $TERRALAB_API_KEY" \ -H "Content-Type: application/json" \ -d '{"address":"12 rue de la Paix, Annecy"}' ``` ```python import os import requests response = requests.post( "https://mcp.terra-lab.ai/v1/tools/french_parcel", headers={"Authorization": f"Bearer {os.environ['TERRALAB_API_KEY']}"}, json={ "address": "12 rue de la Paix, Annecy", }, timeout=120, ) response.raise_for_status() print(response.json()["structuredContent"]) ``` ```javascript const response = await fetch('https://mcp.terra-lab.ai/v1/tools/french_parcel', { method: 'POST', headers: { Authorization: `Bearer ${process.env.TERRALAB_API_KEY}`, 'Content-Type': 'application/json', }, body: JSON.stringify({ "address": "12 rue de la Paix, Annecy" }), }); const data = await response.json(); console.log(data.structuredContent); ``` Source: https://terra-lab.ai/docs/mcp/tools/french_parcel · Updated 2026-11-24 --- # French cadastral parcels and zoning in an area > Index of the TerraLab docs for agents: [llms.txt](https://terra-lab.ai/docs/llms.txt). Every docs page is also served as markdown: add .md to its URL. Every French cadastral parcel in an area, with its reference, its area and the urban plan zone it lies in, as a GIS file. | | | | --- | --- | | MCP tool | `french_parcels_in_area` on `https://mcp.terra-lab.ai/mcp` | | Group | France | ## Use it Connect the [MCP server](https://terra-lab.ai/docs/mcp) to your assistant and ask in plain words: the assistant picks `french_parcels_in_area` when the request fits and fills the arguments below. These are valid arguments: ```json {"area":{"place":"Palais de l'Isle, Annecy","radius_m":1000},"formats":["geojson","csv"]} ``` ## Parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `area` | object | Yes | 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. | | `formats` | array of string | No | Download formats. Default `["geojson"]`. | ## 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. ```json { "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](https://terra-lab.ai/docs/errors). ## Description for agents The text the server gives an agent to decide when to call this tool: > Use this when the user asks for all the cadastral parcels (parcelles cadastrales) in an area of France, for example "the parcels within 1 km of Annecy old town" or "the plots and their PLU zones in this bbox": each parcel with its reference (commune, INSEE code, section, number), cadastral area and the local urban plan zone it lies in (PLU or PLUi: label, type U, AU, A or N, document). The area is a place with a radius (default 300 m, at most 1,000 m) or a bbox of at most 4 km². For the single parcel at one address or point, use french_parcel instead. Shows the parcels on a map with GeoJSON, KML, Shapefile zip or CSV downloads. France only. Never returns owners or property sales. 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. The user opens the file in QGIS or any GIS: this server cannot load it into the user's own QGIS or any app on their computer. Never pass these links to open_gis_file: list every format the user needs in formats, in this one call. ## Call it over HTTP The same tool is also callable over HTTP with an [API key](https://terra-lab.ai/docs/authentication): `POST https://mcp.terra-lab.ai/v1/tools/french_parcels_in_area` with the arguments as the JSON body. ```bash curl -X POST https://mcp.terra-lab.ai/v1/tools/french_parcels_in_area \ -H "Authorization: Bearer $TERRALAB_API_KEY" \ -H "Content-Type: application/json" \ -d '{"area":{"place":"Palais de l'\''Isle, Annecy","radius_m":1000},"formats":["geojson","csv"]}' ``` ```python import os import requests response = requests.post( "https://mcp.terra-lab.ai/v1/tools/french_parcels_in_area", headers={"Authorization": f"Bearer {os.environ['TERRALAB_API_KEY']}"}, json={ "area": { "place": "Palais de l'Isle, Annecy", "radius_m": 1000, }, "formats": ["geojson", "csv"], }, timeout=120, ) response.raise_for_status() print(response.json()["structuredContent"]) ``` ```javascript const response = await fetch('https://mcp.terra-lab.ai/v1/tools/french_parcels_in_area', { method: 'POST', headers: { Authorization: `Bearer ${process.env.TERRALAB_API_KEY}`, 'Content-Type': 'application/json', }, body: JSON.stringify({ "area": { "place": "Palais de l'Isle, Annecy", "radius_m": 1000 }, "formats": [ "geojson", "csv" ] }), }); const data = await response.json(); console.log(data.structuredContent); ``` Source: https://terra-lab.ai/docs/mcp/tools/french_parcels_in_area · Updated 2026-11-24 --- # French building heights > Index of the TerraLab docs for agents: [llms.txt](https://terra-lab.ai/docs/llms.txt). Every docs page is also served as markdown: add .md to its URL. Height in metres, floors, main use and year built of every building around an address or in a small area in France, from IGN BD TOPO. | | | | --- | --- | | MCP tool | `french_building_heights` on `https://mcp.terra-lab.ai/mcp` | | Group | France | ## Use it Connect the [MCP server](https://terra-lab.ai/docs/mcp) to your assistant and ask in plain words: the assistant picks `french_building_heights` when the request fits and fills the arguments below. These are valid arguments: ```json {"area":{"place":"10 place Bellecour, Lyon","radius_m":150}} ``` ```json {"area":{"bbox":[2.294,48.857,2.299,48.86]},"formats":["shapefile"]} ``` ## Parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `area` | object | Yes | 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. | | `formats` | array of string | No | Download formats. Default `["geojson"]`. | ## 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. ```json { "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](https://terra-lab.ai/docs/errors). ## Description for agents The text the server gives an agent to decide when to call this tool: > Use this when the user asks how tall the buildings are around an address or in a small area in France: height in metres per building, floors, main use, year built and ground altitude, from IGN BD TOPO. The area is a place with a radius (default 150 m, at most 2,000 m) or a bbox of at most 16 km². Shows the buildings on a map with a height summary (count, median, tallest) and GeoJSON, KML, Shapefile zip or CSV downloads. France only (mainland, Corsica and overseas departments). 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. The user opens the file in QGIS or any GIS: this server cannot load it into the user's own QGIS or any app on their computer. Never pass these links to open_gis_file: list every format the user needs in formats, in this one call. ## Call it over HTTP The same tool is also callable over HTTP with an [API key](https://terra-lab.ai/docs/authentication): `POST https://mcp.terra-lab.ai/v1/tools/french_building_heights` with the arguments as the JSON body. ```bash curl -X POST https://mcp.terra-lab.ai/v1/tools/french_building_heights \ -H "Authorization: Bearer $TERRALAB_API_KEY" \ -H "Content-Type: application/json" \ -d '{"area":{"place":"10 place Bellecour, Lyon","radius_m":150}}' ``` ```python import os import requests response = requests.post( "https://mcp.terra-lab.ai/v1/tools/french_building_heights", headers={"Authorization": f"Bearer {os.environ['TERRALAB_API_KEY']}"}, json={ "area": { "place": "10 place Bellecour, Lyon", "radius_m": 150, }, }, timeout=120, ) response.raise_for_status() print(response.json()["structuredContent"]) ``` ```javascript const response = await fetch('https://mcp.terra-lab.ai/v1/tools/french_building_heights', { method: 'POST', headers: { Authorization: `Bearer ${process.env.TERRALAB_API_KEY}`, 'Content-Type': 'application/json', }, body: JSON.stringify({ "area": { "place": "10 place Bellecour, Lyon", "radius_m": 150 } }), }); const data = await response.json(); console.log(data.structuredContent); ``` Source: https://terra-lab.ai/docs/mcp/tools/french_building_heights · Updated 2026-11-24 --- # Natural risks at an address or a point > Index of the TerraLab docs for agents: [llms.txt](https://terra-lab.ai/docs/llms.txt). Every docs page is also served as markdown: add .md to its URL. Natural risks at an address or point: flood zones, clay, seismic zone, cavities and commune risks in France, river flood depth elsewhere. | | | | --- | --- | | MCP tool | `get_natural_risks` on `https://mcp.terra-lab.ai/mcp` | | Group | France | ## Use it Connect the [MCP server](https://terra-lab.ai/docs/mcp) to your assistant and ask in plain words: the assistant picks `get_natural_risks` when the request fits and fills the arguments below. These are valid arguments: ```json {"address":"12 quai Saint-Antoine, 69002 Lyon"} ``` ```json {"latitude":24.45,"longitude":89.7,"risks":["flood"]} ``` ## Parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `address` | string | No | An address or place. The place the user asks about, not the user's own location. Up to 300 characters. | | `latitude` | number | No | From -90 to 90. | | `longitude` | number | No | From -180 to 180. | | `risks` | array of string | No | Keep only these risks. Leave out for all. 0 to 8 items. | ## 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. ```json { "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](https://terra-lab.ai/docs/errors). ## Description for agents The text the server gives an agent to decide when to call this tool: > Use this when the user asks about the natural risks of an address or a point: "is 12 quai Saint-Antoine, Lyon in a flood zone?", "clay shrink-swell hazard at this address", "100-year flood depth at 24.45, 89.70 in Sirajganj, Bangladesh". Give exactly one of: address, or latitude with longitude. In France (TerraLab copies of Géorisques files, refreshed weekly): flood zones of the 124 TRI, clay shrink-swell exposure, seismic zone and cavities within 500 m at the point; flood, radon, landslide, wildfire and industrial risks of the commune (scope says point or commune). Elsewhere: JRC river flood depth for 10, 100 and 500-year floods (about 1 km cells). risks keeps some of them. Each value has a status: ok, absent (the source maps this place and finds nothing), failed (the source did not answer: say it is unknown and can be retried, never that there is no risk) or not_mapped (no source covers it here: unknown, not safe). Read the status before the value. One point per call. Regulatory zones are not a building decision; give the Géorisques report link for France. Never use the user's current location unless they type it. ## Call it over HTTP The same tool is also callable over HTTP with an [API key](https://terra-lab.ai/docs/authentication): `POST https://mcp.terra-lab.ai/v1/tools/get_natural_risks` with the arguments as the JSON body. ```bash curl -X POST https://mcp.terra-lab.ai/v1/tools/get_natural_risks \ -H "Authorization: Bearer $TERRALAB_API_KEY" \ -H "Content-Type: application/json" \ -d '{"address":"12 quai Saint-Antoine, 69002 Lyon"}' ``` ```python import os import requests response = requests.post( "https://mcp.terra-lab.ai/v1/tools/get_natural_risks", headers={"Authorization": f"Bearer {os.environ['TERRALAB_API_KEY']}"}, json={ "address": "12 quai Saint-Antoine, 69002 Lyon", }, timeout=120, ) response.raise_for_status() print(response.json()["structuredContent"]) ``` ```javascript const response = await fetch('https://mcp.terra-lab.ai/v1/tools/get_natural_risks', { method: 'POST', headers: { Authorization: `Bearer ${process.env.TERRALAB_API_KEY}`, 'Content-Type': 'application/json', }, body: JSON.stringify({ "address": "12 quai Saint-Antoine, 69002 Lyon" }), }); const data = await response.json(); console.log(data.structuredContent); ``` Source: https://terra-lab.ai/docs/mcp/tools/get_natural_risks · Updated 2026-11-24 --- # Find a dataset in the TerraLab catalogue > Index of the TerraLab docs for agents: [llms.txt](https://terra-lab.ai/docs/llms.txt). Every docs page is also served as markdown: add .md to its URL. Search the TerraLab catalogue of open datasets by need or place, with each licence, coverage, size and the call that gets it. | | | | --- | --- | | MCP tool | `find_datasets` on `https://mcp.terra-lab.ai/mcp` | | Group | Data catalog | ## Use it Connect the [MCP server](https://terra-lab.ai/docs/mcp) to your assistant and ask in plain words: the assistant picks `find_datasets` when the request fits and fills the arguments below. These are valid arguments: ```json {"query":"land cover","area":{"place":"Kenya"}} ``` ```json {"query":"administrative boundaries","area":{"place":"Indonesia"}} ``` ```json {"ids":["esa_worldcover"],"area":{"place":"Belgium"}} ``` ## Parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `query` | string | No | What the data is about, in a few English words (the catalogue is in English: translate the user's words): "land cover", "flood hazard", "administrative boundaries", "population". Local collections (Portolan) are titled in the publisher's language: add the user's own word when it is not English ("playgrounds Spielplätze"). Up to 200 characters. | | `area` | object | No | 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. | | `kind` | string | No | Keep one kind of dataset only. One of `"addresses"`, `"air_quality"`, `"basemap"`, `"biodiversity"`, `"boundaries"`, `"buildings"`, `"cadastre"`, `"climate"`, `"elevation"`, `"energy"`, `"extract"`, `"geology"`, `"hazards"`, `"health"`, `"hydrology"`, `"imagery"`, `"landcover"`, `"poi"`, `"population"`, `"settlements"`, `"soil"`, `"topographic_base"`, `"transport"`. | | `ids` | array of string | No | Describe these dataset ids (from an earlier answer, portolan: ids too) instead of searching; with area, each gets its size estimate there. 0 to 20 items. | | `limit` | integer | No | How many datasets to return. From 1 to 20. Default `5`. | | `open_catalogues` | boolean | No | Also search the open catalogues (adds a few seconds). False: TerraLab catalogue only. Default `true`. | | `request_id` | string | No | An id request_data returned (dr_ and 10 characters): gives that data request's status instead of searching. Up to 40 characters. | ## 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. ```json { "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](https://terra-lab.ai/docs/errors). ## Description for agents The text the server gives an agent to decide when to call this tool: > Use this when the user asks what data exists for a need or a place before getting it: "what land cover data do you have for Kenya?", "official district boundaries of Indonesia", "is there a flood hazard map for Romania?". Searches the TerraLab catalogue of 359 hosted open datasets (land cover, boundaries, hazards, population, elevation, soil, buildings, hydrology, climate) and about 9,800 datasets TerraLab only points to. Give query (a few words), and area (a country or a place) to keep only datasets covering it and to get a size estimate. Also searches open catalogues live (data.gouv.fr for France, dados.gov.pt for Portugal, data.public.lu for Luxembourg, data.europa.eu for the other European countries, Source Cooperative, Microsoft Planetary Computer, Copernicus Data Space) and the Portolan catalogues (cloud-native GeoParquet, PMTiles and COG files with a publisher AGENTS.md, ranked by how well their extent fits the area): open_registry lists the Portolan matches with publisher, official or mirror, last sync date, SPDX licence, file URLs, columns, MapLibre styles and, for the first (or each portolan: id given in ids), the publisher's AGENTS.md notes quoted as third-party data; open_catalogues lists their matches, each with an open licence, extent, formats and read_with (a TerraLab call) or download_url, and, when the catalogue says it, context: last update, planned frequency, overdue update, EU high-value dataset, metadata quality score and the producer's own account of how the data was made. Returns up to limit hosted datasets (5 by default, 20 at most) and up to 3 datasets TerraLab only points to (with ids, every id asked), best first, each with its licence and attribution quoted from the catalogue, resolution, date, coverage, whether TerraLab hosts it, and the call that gets it (extract_dataset, extract_open_data, get_elevation or get_satellite_image). Read hosted first: hosted false means TerraLab does not serve that data, so give its page and offer request_data; never present it as available. An empty list means the catalogue has nothing for this need here, not that the data does not exist. Not for OpenStreetMap features of a place (extract_open_data), whether a forest is natural, planted or a plantation (get_forest_type), elevation (get_elevation) or satellite images and NDVI (get_satellite_image, get_satellite_index): those tools answer in one call. Never use the user's current location unless they type it. ## Call it over HTTP The same tool is also callable over HTTP with an [API key](https://terra-lab.ai/docs/authentication): `POST https://mcp.terra-lab.ai/v1/tools/find_datasets` with the arguments as the JSON body. ```bash curl -X POST https://mcp.terra-lab.ai/v1/tools/find_datasets \ -H "Authorization: Bearer $TERRALAB_API_KEY" \ -H "Content-Type: application/json" \ -d '{"query":"land cover","area":{"place":"Kenya"}}' ``` ```python import os import requests response = requests.post( "https://mcp.terra-lab.ai/v1/tools/find_datasets", headers={"Authorization": f"Bearer {os.environ['TERRALAB_API_KEY']}"}, json={ "query": "land cover", "area": { "place": "Kenya", }, }, timeout=120, ) response.raise_for_status() print(response.json()["structuredContent"]) ``` ```javascript const response = await fetch('https://mcp.terra-lab.ai/v1/tools/find_datasets', { method: 'POST', headers: { Authorization: `Bearer ${process.env.TERRALAB_API_KEY}`, 'Content-Type': 'application/json', }, body: JSON.stringify({ "query": "land cover", "area": { "place": "Kenya" } }), }); const data = await response.json(); console.log(data.structuredContent); ``` Source: https://terra-lab.ai/docs/mcp/tools/find_datasets · Updated 2026-11-24 --- # Extract a hosted dataset for an area > Index of the TerraLab docs for agents: [llms.txt](https://terra-lab.ai/docs/llms.txt). Every docs page is also served as markdown: add .md to its URL. A hosted dataset from the TerraLab catalogue cut to an area: a GeoTIFF or a vector file with its licence, or only the statistics. | | | | --- | --- | | MCP tool | `extract_dataset` on `https://mcp.terra-lab.ai/mcp` | | Group | Data catalog | ## Use it Connect the [MCP server](https://terra-lab.ai/docs/mcp) to your assistant and ask in plain words: the assistant picks `extract_dataset` when the request fits and fills the arguments below. These are valid arguments: ```json {"dataset":"esa_worldcover","area":{"place":"Nakuru, Kenya","radius_m":5000}} ``` ```json {"dataset":"esa_worldcover","area":{"place":"Gare de Montpellier Saint-Roch","radius_m":2000},"summary":true} ``` ```json {"dataset":"cod_ab_idn","area":{"place":"Bandung, Indonesia","radius_m":10000},"variables":{"LEVEL":"3"}} ``` ## Parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `dataset` | string | No | A dataset id from find_datasets, such as "esa_worldcover", "ghs_pop", "cod_ab_idn", or a portolan: id, or the https URL of a public GeoParquet. Up to 400 characters. | | `area` | object | No | 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. | | `variables` | object | No | Values for the dataset's variables, as find_datasets lists them: {"LEVEL": "2"}, {"RETURN_PERIOD": "100"}, {"YEAR": "2015"}. | | `summary` | boolean | No | Rasters: return the class shares or statistics only, without a file. Default `false`. | | `formats` | array of string | No | Vectors: extra download formats. A GeoPackage is always included. | ## 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. ```json { "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](https://terra-lab.ai/docs/errors). ## Description for agents The text the server gives an agent to decide when to call this tool: > Use this when the user wants a dataset from the TerraLab catalogue cut to an area, as a GIS file or as numbers: "ESA WorldCover for 5 km around Nakuru as a GeoTIFF". Give dataset (an id from find_datasets) and area (a place with radius_m, or a bbox). Rasters: a GeoTIFF on the dataset's own grid, licence in the file and in a zip, plus class shares or min, max and mean (summary true: numbers only). Vectors: a GeoPackage (GeoJSON, KML, Shapefile or CSV on request) with the feature count. Limits: 4,000 x 4,000 pixels (8 million for 64-bit data) or 20,000 features per call; a larger area gets area_too_large with retry_with, the same call on an area that fits (send it as it is), never a partial file. Some datasets need variables (admin level, year, return period): find_datasets lists them. A Portolan collection (a portolan: id from find_datasets) or any public GeoParquet URL is cut in place: the features whose box meets the area, with variables picking a partition ({"year": "2024"}; the newest otherwise). Quote the licence and attribution in the answer. Not for OpenStreetMap or Overture (extract_open_data), elevation (get_elevation), forest type (get_forest_type) or satellite images (get_satellite_image). Never use the user's current location unless they type it. Download links build their file when opened; no file is saved. The user opens the file in QGIS or any GIS: this server cannot load it into the user's own QGIS or any app on their computer. Never pass these links to open_gis_file: list every format the user needs in formats, in this one call. ## Call it over HTTP The same tool is also callable over HTTP with an [API key](https://terra-lab.ai/docs/authentication): `POST https://mcp.terra-lab.ai/v1/tools/extract_dataset` with the arguments as the JSON body. ```bash curl -X POST https://mcp.terra-lab.ai/v1/tools/extract_dataset \ -H "Authorization: Bearer $TERRALAB_API_KEY" \ -H "Content-Type: application/json" \ -d '{"dataset":"esa_worldcover","area":{"place":"Nakuru, Kenya","radius_m":5000}}' ``` ```python import os import requests response = requests.post( "https://mcp.terra-lab.ai/v1/tools/extract_dataset", headers={"Authorization": f"Bearer {os.environ['TERRALAB_API_KEY']}"}, json={ "dataset": "esa_worldcover", "area": { "place": "Nakuru, Kenya", "radius_m": 5000, }, }, timeout=120, ) response.raise_for_status() print(response.json()["structuredContent"]) ``` ```javascript const response = await fetch('https://mcp.terra-lab.ai/v1/tools/extract_dataset', { method: 'POST', headers: { Authorization: `Bearer ${process.env.TERRALAB_API_KEY}`, 'Content-Type': 'application/json', }, body: JSON.stringify({ "dataset": "esa_worldcover", "area": { "place": "Nakuru, Kenya", "radius_m": 5000 } }), }); const data = await response.json(); console.log(data.structuredContent); ``` Source: https://terra-lab.ai/docs/mcp/tools/extract_dataset · Updated 2026-11-24 --- # Describe a cloud GeoParquet dataset > Index of the TerraLab docs for agents: [llms.txt](https://terra-lab.ai/docs/llms.txt). Every docs page is also served as markdown: add .md to its URL. What a public cloud GeoParquet holds, read from its footer only: rows, columns with their ranges, geometry, CRS, extent and partitions. | | | | --- | --- | | MCP tool | `inspect_dataset` on `https://mcp.terra-lab.ai/mcp` | | Group | Data catalog | ## Use it Connect the [MCP server](https://terra-lab.ai/docs/mcp) to your assistant and ask in plain words: the assistant picks `inspect_dataset` when the request fits and fills the arguments below. These are valid arguments: ```json {"dataset":"portolan:nasa-firms-active-fire/detections"} ``` ## Parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `dataset` | string | Yes | A portolan: id from find_datasets (open_registry), or the https URL of a public GeoParquet file, a hive glob such as https://.../year=*/data.parquet, an s3:// or gs:// address, or a STAC collection.json. Up to 400 characters. | ## 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. ```json { "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](https://terra-lab.ai/docs/errors). ## Description for agents The text the server gives an agent to decide when to call this tool: > Use this when the user wants to know what a public cloud GeoParquet holds before querying it: "what columns does the Fields of The World file have?", "which years does the FIRMS fire archive cover?". Give dataset: a portolan: id from find_datasets (open_registry), or the https URL of a GeoParquet file or of a hive-partitioned folder (.../year=*/x.parquet). Reads only the file footer, never the rows: row count, row groups, columns with type, min, max and null count, geometry column, CRS and bbox, compression, and for a partitioned dataset its partitions (keys and values). zone_queries says whether aggregate_dataset can count it per zone. Then aggregate_dataset counts or sums it per zone and extract_dataset cuts it to an area. ## Call it over HTTP The same tool is also callable over HTTP with an [API key](https://terra-lab.ai/docs/authentication): `POST https://mcp.terra-lab.ai/v1/tools/inspect_dataset` with the arguments as the JSON body. ```bash curl -X POST https://mcp.terra-lab.ai/v1/tools/inspect_dataset \ -H "Authorization: Bearer $TERRALAB_API_KEY" \ -H "Content-Type: application/json" \ -d '{"dataset":"portolan:nasa-firms-active-fire/detections"}' ``` ```python import os import requests response = requests.post( "https://mcp.terra-lab.ai/v1/tools/inspect_dataset", headers={"Authorization": f"Bearer {os.environ['TERRALAB_API_KEY']}"}, json={ "dataset": "portolan:nasa-firms-active-fire/detections", }, timeout=120, ) response.raise_for_status() print(response.json()["structuredContent"]) ``` ```javascript const response = await fetch('https://mcp.terra-lab.ai/v1/tools/inspect_dataset', { method: 'POST', headers: { Authorization: `Bearer ${process.env.TERRALAB_API_KEY}`, 'Content-Type': 'application/json', }, body: JSON.stringify({ "dataset": "portolan:nasa-firms-active-fire/detections" }), }); const data = await response.json(); console.log(data.structuredContent); ``` Source: https://terra-lab.ai/docs/mcp/tools/inspect_dataset · Updated 2026-11-24 --- # Count and sum a cloud GeoParquet per zone > Index of the TerraLab docs for agents: [llms.txt](https://terra-lab.ai/docs/llms.txt). Every docs page is also served as markdown: add .md to its URL. A count, sum or average over a large public GeoParquet for a place or per zone (state, county, region, district), without downloading it. | | | | --- | --- | | MCP tool | `aggregate_dataset` on `https://mcp.terra-lab.ai/mcp` | | Group | Data catalog | ## Use it Connect the [MCP server](https://terra-lab.ai/docs/mcp) to your assistant and ask in plain words: the assistant picks `aggregate_dataset` when the request fits and fills the arguments below. These are valid arguments: ```json {"dataset":"portolan:harmonized-field-data/glocab","zones":{"per":"state","units":["Arkansas"]}} ``` ```json {"dataset":"portolan:nasa-firms-active-fire/detections","zones":{"per":"county","within":"California"},"where":[{"column":"year","op":"eq","value":2024}]} ``` ## Parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `dataset` | string | Yes | A portolan: id from find_datasets (open_registry), or the https URL of a public GeoParquet file, a hive glob such as https://.../year=*/data.parquet, an s3:// or gs:// address, or a STAC collection.json. Up to 400 characters. | | `area` | object | No | 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. | | `zones` | object | No | One row per zone instead of one area. | | `zones.per` | string | Yes | The zone level. One of `"state"`, `"county"`, `"zip"`, `"place"`, `"country"`, `"region"`, `"locality"`, `"neighborhood"`, `"adm1"`, `"adm2"`, `"adm3"`, `"adm4"`. | | `zones.within` | string | No | The place whose zones are read: "California", "Kenya", or a zone id (US-STATE-06). Up to 200 characters. | | `zones.units` | array of string | No | Only these zones, by name or code, at the level per gives. 0 to 200 items. | | `where` | array of object | No | Conditions that must all hold. A condition on a partition key (year) picks the files before any byte is read; without one, only the newest partition is read. 0 to 12 items. | | `group_by` | array of string | No | Columns to group by, one row per value (per zone). 0 to 2 items. | | `aggregates` | array of object | No | Values beside the count: sum, mean, min or max of a column; area_m2 of the geometries. 0 to 8 items. | | `limit` | integer | No | Rows returned, largest count first; distinct_groups says how many there are. From 1 to 100. Default `50`. | | `dry_run` | boolean | No | Only the plan: files, row groups and bytes the query would read. Default `false`. | ## 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. ```json { "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](https://terra-lab.ai/docs/errors). ## Description for agents The text the server gives an agent to decide when to call this tool: > Use this when the user wants a count, sum or average over a large public GeoParquet for a place or per zone, without downloading it: "how many crop fields are in Arkansas?", "active fires per county in California in 2024", "total building footprint area in Berlin Mitte", "fields per crop type". Give dataset (a portolan: id from find_datasets, or a GeoParquet URL; inspect_dataset lists its columns and partitions), then the area: area (a named place is cut to its outline; a place with radius_m is a disk; a bbox), or zones for one row per zone (per: state, county, zip, place in the US; country, region, locality, neighborhood anywhere; adm1 to adm4 official units; within: the parent place, or units: the zones by name). Without either, the whole file. where filters rows (a condition on the partition key, such as year, picks the files; without one only the newest partition is read). group_by gives one row per value (up to 2 columns); aggregates adds sum, mean, min or max of a column, or area_m2 of the geometries (reads the geometry, heavier). A row counts in a zone when the centre of its bounding box lies inside. Only the row groups the zones touch are read (a state from a multi-GB file in seconds); a query over the caps gets too_large with the estimate. Returns the table (zone, group, count, values), totals, distinct_groups and what was read. No features: extract_dataset cuts them. 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. ## Call it over HTTP The same tool is also callable over HTTP with an [API key](https://terra-lab.ai/docs/authentication): `POST https://mcp.terra-lab.ai/v1/tools/aggregate_dataset` with the arguments as the JSON body. ```bash curl -X POST https://mcp.terra-lab.ai/v1/tools/aggregate_dataset \ -H "Authorization: Bearer $TERRALAB_API_KEY" \ -H "Content-Type: application/json" \ -d '{"dataset":"portolan:harmonized-field-data/glocab","zones":{"per":"state","units":["Arkansas"]}}' ``` ```python import os import requests response = requests.post( "https://mcp.terra-lab.ai/v1/tools/aggregate_dataset", headers={"Authorization": f"Bearer {os.environ['TERRALAB_API_KEY']}"}, json={ "dataset": "portolan:harmonized-field-data/glocab", "zones": { "per": "state", "units": ["Arkansas"], }, }, timeout=120, ) response.raise_for_status() print(response.json()["structuredContent"]) ``` ```javascript const response = await fetch('https://mcp.terra-lab.ai/v1/tools/aggregate_dataset', { method: 'POST', headers: { Authorization: `Bearer ${process.env.TERRALAB_API_KEY}`, 'Content-Type': 'application/json', }, body: JSON.stringify({ "dataset": "portolan:harmonized-field-data/glocab", "zones": { "per": "state", "units": [ "Arkansas" ] } }), }); const data = await response.json(); console.log(data.structuredContent); ``` Source: https://terra-lab.ai/docs/mcp/tools/aggregate_dataset · Updated 2026-11-24 --- # Ask TerraLab to add data it does not have > Index of the TerraLab docs for agents: [llms.txt](https://terra-lab.ai/docs/llms.txt). Every docs page is also served as markdown: add .md to its URL. Ask TerraLab to add geographic data the catalogue does not have yet, with what you need and up to five places where you need it. | | | | --- | --- | | MCP tool | `request_data` on `https://mcp.terra-lab.ai/mcp` | | Group | Data catalog | ## Use it Connect the [MCP server](https://terra-lab.ai/docs/mcp) to your assistant and ask in plain words: the assistant picks `request_data` when the request fits and fills the arguments below. These are valid arguments: ```json {"description":"Official flood zones of Morocco","example_locations":["Fes, Morocco"]} ``` ```json {"description":"Noise maps of Lyon","example_locations":["Lyon"],"idempotency_key":"noise-lyon-1"} ``` ## Parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `description` | string | No | The data needed, in the user's words: "official flood zones of Morocco". Up to 2000 characters. | | `example_locations` | array of string or object | No | Up to 5 places where the data is needed: each a place name, {"place": name}, or {"latitude", "longitude"}; never both a place and coordinates. 0 to 5 items. | | `use_case` | string | No | What the user wants to do with it, when they said so. Up to 500 characters. | | `file_anyway` | boolean | No | File the request even when a hosted dataset seems to answer it (the user said it does not). Default `false`. | | `idempotency_key` | string | No | Any string that stays the same if this call is sent again; the same key and description return the first request. Up to 80 characters. | ## 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. ```json { "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](https://terra-lab.ai/docs/errors). ## Description for agents The text the server gives an agent to decide when to call this tool: > Use this when the user needs geographic data that find_datasets did not find, and wants TerraLab to add it: "you don't have the official flood zones of Morocco? Can you ask TerraLab to add them?". Give description (what data, in the user's words) and up to 5 example_locations (places or coordinates where it is needed). The catalogue is searched first: when a hosted dataset already answers, the answer is matched_existing with the call that gets it and nothing is filed (file_anyway true files it all the same, for data the user says is different). Otherwise the request is filed and gets a request_id (dr_ and 10 characters) to quote to the user; find_datasets with request_id gives its status later. Someone at TerraLab reads every request once a week; no date is promised, so never promise one. The same idempotency_key with the same description returns the first request instead of filing it twice. Only for data TerraLab could host (maps, layers, statistics by place), not for questions or bugs. Never use the user's current location unless they type it. ## Call it over HTTP The same tool is also callable over HTTP with an [API key](https://terra-lab.ai/docs/authentication): `POST https://mcp.terra-lab.ai/v1/tools/request_data` with the arguments as the JSON body. ```bash curl -X POST https://mcp.terra-lab.ai/v1/tools/request_data \ -H "Authorization: Bearer $TERRALAB_API_KEY" \ -H "Content-Type: application/json" \ -d '{"description":"Official flood zones of Morocco","example_locations":["Fes, Morocco"]}' ``` ```python import os import requests response = requests.post( "https://mcp.terra-lab.ai/v1/tools/request_data", headers={"Authorization": f"Bearer {os.environ['TERRALAB_API_KEY']}"}, json={ "description": "Official flood zones of Morocco", "example_locations": ["Fes, Morocco"], }, timeout=120, ) response.raise_for_status() print(response.json()["structuredContent"]) ``` ```javascript const response = await fetch('https://mcp.terra-lab.ai/v1/tools/request_data', { method: 'POST', headers: { Authorization: `Bearer ${process.env.TERRALAB_API_KEY}`, 'Content-Type': 'application/json', }, body: JSON.stringify({ "description": "Official flood zones of Morocco", "example_locations": [ "Fes, Morocco" ] }), }); const data = await response.json(); console.log(data.structuredContent); ``` Source: https://terra-lab.ai/docs/mcp/tools/request_data · Updated 2026-11-24 --- # Search the TerraLab docs and guides > Index of the TerraLab docs for agents: [llms.txt](https://terra-lab.ai/docs/llms.txt). Every docs page is also served as markdown: add .md to its URL. TerraLab docs, blog guides and product pages searched by meaning in any language, with a quoted extract and a link for each page. Free. | | | | --- | --- | | MCP tool | `search_docs` on `https://mcp.terra-lab.ai/mcp` | | Group | Data catalog | ## Use it Connect the [MCP server](https://terra-lab.ai/docs/mcp) to your assistant and ask in plain words: the assistant picks `search_docs` when the request fits and fills the arguments below. These are valid arguments: ```json {"query":"how do I connect Claude to TerraLab"} ``` ```json {"query":"cómo hacer un mapa de calor en QGIS","language":"es"} ``` ## Parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `query` | string | Yes | The question in the user's own words and language. Up to 200 characters. | | `language` | string | No | The user's language, for links to translated pages (pages without a translation stay in English). One of `"en"`, `"fr"`, `"es"`, `"de"`, `"it"`, `"pt-BR"`, `"nl"`, `"pl"`, `"ja"`, `"zh-CN"`, `"zh-TW"`, `"id"`. Default `"en"`. | | `limit` | integer | No | How many pages to return. From 1 to 8. Default `5`. | ## 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. ```json { "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](https://terra-lab.ai/docs/errors). ## Description for agents The text the server gives an agent to decide when to call this tool: > Use this when the user asks about TerraLab itself or wants a TerraLab how-to: the QGIS plugins AI Agent, AI Segmentation and AI Edit (install, prices, plans, errors), this MCP server and the API (setup in Claude, ChatGPT or Cursor, pricing, sign-in), or a GIS guide from the TerraLab blog: "how much does AI Agent cost per month", "connect TerraLab to Claude Desktop", "how to georeference a scanned map in QGIS". Searches TerraLab's docs, blog guides and product pages by meaning, in any language, and returns up to limit pages (5 by default), best first, each with its title, the section that matched, a short extract quoted from the page and its link, in the user's language when the page is translated (language says which). It returns pages, not an answer: answer from the extracts in your own words and give the links; never cite a page it did not return. An empty list means no TerraLab page covers the question. Not for map data (extract_open_data, find_datasets) or places (find_places). ## Call it over HTTP The same tool is also callable over HTTP with an [API key](https://terra-lab.ai/docs/authentication): `POST https://mcp.terra-lab.ai/v1/tools/search_docs` with the arguments as the JSON body. ```bash curl -X POST https://mcp.terra-lab.ai/v1/tools/search_docs \ -H "Authorization: Bearer $TERRALAB_API_KEY" \ -H "Content-Type: application/json" \ -d '{"query":"how do I connect Claude to TerraLab"}' ``` ```python import os import requests response = requests.post( "https://mcp.terra-lab.ai/v1/tools/search_docs", headers={"Authorization": f"Bearer {os.environ['TERRALAB_API_KEY']}"}, json={ "query": "how do I connect Claude to TerraLab", }, timeout=120, ) response.raise_for_status() print(response.json()["structuredContent"]) ``` ```javascript const response = await fetch('https://mcp.terra-lab.ai/v1/tools/search_docs', { method: 'POST', headers: { Authorization: `Bearer ${process.env.TERRALAB_API_KEY}`, 'Content-Type': 'application/json', }, body: JSON.stringify({ "query": "how do I connect Claude to TerraLab" }), }); const data = await response.json(); console.log(data.structuredContent); ``` Source: https://terra-lab.ai/docs/mcp/tools/search_docs · Updated 2026-11-24 --- # Straight-line distance between places > Index of the TerraLab docs for agents: [llms.txt](https://terra-lab.ai/docs/llms.txt). Every docs page is also served as markdown: add .md to its URL. Straight-line geodesic distance between 2 or more places or points, with the midpoint and bearing for two, or the length of a line. | | | | --- | --- | | MCP tool | `measure_distance` on `https://mcp.terra-lab.ai/mcp` | | Group | Layer operations | ## Use it Connect the [MCP server](https://terra-lab.ai/docs/mcp) to your assistant and ask in plain words: the assistant picks `measure_distance` when the request fits and fills the arguments below. These are valid arguments: ```json {"points":["Paris, France","Geneva, Switzerland"]} ``` ```json {"geometry":{"type":"LineString","coordinates":[[2.35,48.85],[2.36,48.86]]}} ``` ## Parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `points` | array of string or object | No | Points or place names in order, 2 or more. The place the user asks about, not the user's own location. 2 to 500 items. | | `geometry` | object | No | A drawn LineString or MultiLineString as GeoJSON (WGS 84 longitude, latitude), instead of points. | | `geometry.type` | string | No | | | `geometry.coordinates` | array | No | | | `geometry.geometry` | object | No | | | `formats` | array of string | No | Download formats. Default `["geojson","kml"]`. | ## 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. ```json { "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](https://terra-lab.ai/docs/errors). ## Description for agents The text the server gives an agent to decide when to call this tool: > Use this when the user wants the straight-line (as the crow flies) distance between 2 or more places or points, with the midpoint and bearing for two, or the length of a drawn line. Geodesic on the WGS 84 ellipsoid, in m, km and miles. Not a road or travel distance (get_route), not an elevation profile (get_elevation). Returns the figures, a map and GeoJSON, KML, Shapefile zip or CSV downloads. 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. The user opens the file in QGIS or any GIS: this server cannot load it into the user's own QGIS or any app on their computer. Never pass these links to open_gis_file: list every format the user needs in formats, in this one call. ## Call it over HTTP The same tool is also callable over HTTP with an [API key](https://terra-lab.ai/docs/authentication): `POST https://mcp.terra-lab.ai/v1/tools/measure_distance` with the arguments as the JSON body. ```bash curl -X POST https://mcp.terra-lab.ai/v1/tools/measure_distance \ -H "Authorization: Bearer $TERRALAB_API_KEY" \ -H "Content-Type: application/json" \ -d '{"points":["Paris, France","Geneva, Switzerland"]}' ``` ```python import os import requests response = requests.post( "https://mcp.terra-lab.ai/v1/tools/measure_distance", headers={"Authorization": f"Bearer {os.environ['TERRALAB_API_KEY']}"}, json={ "points": ["Paris, France", "Geneva, Switzerland"], }, timeout=120, ) response.raise_for_status() print(response.json()["structuredContent"]) ``` ```javascript const response = await fetch('https://mcp.terra-lab.ai/v1/tools/measure_distance', { method: 'POST', headers: { Authorization: `Bearer ${process.env.TERRALAB_API_KEY}`, 'Content-Type': 'application/json', }, body: JSON.stringify({ "points": [ "Paris, France", "Geneva, Switzerland" ] }), }); const data = await response.json(); console.log(data.structuredContent); ``` Source: https://terra-lab.ai/docs/mcp/tools/measure_distance · Updated 2026-11-24 --- # Area and perimeter of a shape > Index of the TerraLab docs for agents: [llms.txt](https://terra-lab.ai/docs/llms.txt). Every docs page is also served as markdown: add .md to its URL. Geodesic area and perimeter of a shape given by its corner points, place names or a drawn polygon. | | | | --- | --- | | MCP tool | `measure_area` on `https://mcp.terra-lab.ai/mcp` | | Group | Layer operations | ## Use it Connect the [MCP server](https://terra-lab.ai/docs/mcp) to your assistant and ask in plain words: the assistant picks `measure_area` when the request fits and fills the arguments below. These are valid arguments: ```json {"points":[{"latitude":45.9,"longitude":6.12},{"latitude":45.9,"longitude":6.13},{"latitude":45.91,"longitude":6.13}]} ``` ## Parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `points` | array of string or object | No | Corner points or place names in order, 3 or more. The place the user asks about, not the user's own location. 2 to 500 items. | | `geometry` | object | No | A drawn Polygon or MultiPolygon as GeoJSON (WGS 84 longitude, latitude), instead of points. | | `geometry.type` | string | No | | | `geometry.coordinates` | array | No | | | `geometry.geometry` | object | No | | | `formats` | array of string | No | Download formats. Default `["geojson","kml"]`. | ## 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. ```json { "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](https://terra-lab.ai/docs/errors). ## Description for agents The text the server gives an agent to decide when to call this tool: > Use this when the user wants the area and perimeter of a shape given by 3 or more corner points or place names, or of a drawn polygon. Geodesic on the WGS 84 ellipsoid, in m², ha and km². Not for the area of every feature in a file (add_area_and_length). Returns the figures, a map and GeoJSON, KML, Shapefile zip or CSV downloads. 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. The user opens the file in QGIS or any GIS: this server cannot load it into the user's own QGIS or any app on their computer. Never pass these links to open_gis_file: list every format the user needs in formats, in this one call. ## Call it over HTTP The same tool is also callable over HTTP with an [API key](https://terra-lab.ai/docs/authentication): `POST https://mcp.terra-lab.ai/v1/tools/measure_area` with the arguments as the JSON body. ```bash curl -X POST https://mcp.terra-lab.ai/v1/tools/measure_area \ -H "Authorization: Bearer $TERRALAB_API_KEY" \ -H "Content-Type: application/json" \ -d '{"points":[{"latitude":45.9,"longitude":6.12},{"latitude":45.9,"longitude":6.13},{"latitude":45.91,"longitude":6.13}]}' ``` ```python import os import requests response = requests.post( "https://mcp.terra-lab.ai/v1/tools/measure_area", headers={"Authorization": f"Bearer {os.environ['TERRALAB_API_KEY']}"}, json={ "points": [{ "latitude": 45.9, "longitude": 6.12, }, { "latitude": 45.9, "longitude": 6.13, }, { "latitude": 45.91, "longitude": 6.13, }], }, timeout=120, ) response.raise_for_status() print(response.json()["structuredContent"]) ``` ```javascript const response = await fetch('https://mcp.terra-lab.ai/v1/tools/measure_area', { method: 'POST', headers: { Authorization: `Bearer ${process.env.TERRALAB_API_KEY}`, 'Content-Type': 'application/json', }, body: JSON.stringify({ "points": [ { "latitude": 45.9, "longitude": 6.12 }, { "latitude": 45.9, "longitude": 6.13 }, { "latitude": 45.91, "longitude": 6.13 } ] }), }); const data = await response.json(); console.log(data.structuredContent); ``` Source: https://terra-lab.ai/docs/mcp/tools/measure_area · Updated 2026-11-24 --- # Circle of a given radius around a place > Index of the TerraLab docs for agents: [llms.txt](https://terra-lab.ai/docs/llms.txt). Every docs page is also served as markdown: add .md to its URL. A circle of a given radius around a place or a point, with its area and circumference, as a map and a GIS file. | | | | --- | --- | | MCP tool | `circle_around_place` on `https://mcp.terra-lab.ai/mcp` | | Group | Layer operations | ## Use it Connect the [MCP server](https://terra-lab.ai/docs/mcp) to your assistant and ask in plain words: the assistant picks `circle_around_place` when the request fits and fills the arguments below. These are valid arguments: ```json {"center":"Lyon Part-Dieu","radius_m":5000} ``` ## Parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `center` | string or object | Yes | The center, a place name or {latitude, longitude}. The place the user asks about, not the user's own location. | | `radius_m` | number | Yes | The radius in metres (convert km or miles first). From 1 to 2000000. | | `formats` | array of string | No | Download formats. Default `["geojson","kml"]`. | ## 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. ```json { "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](https://terra-lab.ai/docs/errors). ## Description for agents The text the server gives an agent to decide when to call this tool: > Use this when the user wants a circle of a given radius around a place or a point, as a map and a GIS file, with its area and circumference: "everything within 5 km of Lyon Part-Dieu". Not a travel-time or road-distance area (get_travel_area). Returns the figures, a map and GeoJSON, KML, Shapefile zip or CSV downloads. 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. The user opens the file in QGIS or any GIS: this server cannot load it into the user's own QGIS or any app on their computer. Never pass these links to open_gis_file: list every format the user needs in formats, in this one call. ## Call it over HTTP The same tool is also callable over HTTP with an [API key](https://terra-lab.ai/docs/authentication): `POST https://mcp.terra-lab.ai/v1/tools/circle_around_place` with the arguments as the JSON body. ```bash curl -X POST https://mcp.terra-lab.ai/v1/tools/circle_around_place \ -H "Authorization: Bearer $TERRALAB_API_KEY" \ -H "Content-Type: application/json" \ -d '{"center":"Lyon Part-Dieu","radius_m":5000}' ``` ```python import os import requests response = requests.post( "https://mcp.terra-lab.ai/v1/tools/circle_around_place", headers={"Authorization": f"Bearer {os.environ['TERRALAB_API_KEY']}"}, json={ "center": "Lyon Part-Dieu", "radius_m": 5000, }, timeout=120, ) response.raise_for_status() print(response.json()["structuredContent"]) ``` ```javascript const response = await fetch('https://mcp.terra-lab.ai/v1/tools/circle_around_place', { method: 'POST', headers: { Authorization: `Bearer ${process.env.TERRALAB_API_KEY}`, 'Content-Type': 'application/json', }, body: JSON.stringify({ "center": "Lyon Part-Dieu", "radius_m": 5000 }), }); const data = await response.json(); console.log(data.structuredContent); ``` Source: https://terra-lab.ai/docs/mcp/tools/circle_around_place · Updated 2026-11-24 --- # Buffer features by a distance > Index of the TerraLab docs for agents: [llms.txt](https://terra-lab.ai/docs/llms.txt). Every docs page is also served as markdown: add .md to its URL. A buffer of a given width around each feature of a layer, or one merged area whose overlaps count once, as a GIS file. | | | | --- | --- | | MCP tool | `buffer_features` on `https://mcp.terra-lab.ai/mcp` | | Group | Layer operations | ## Use it Connect the [MCP server](https://terra-lab.ai/docs/mcp) to your assistant and ask in plain words: the assistant picks `buffer_features` when the request fits and fills the arguments below. These are valid arguments: ```json {"geojson":{"type":"LineString","coordinates":[[6.12,45.9],[6.13,45.905]]},"radius_m":200} ``` ## Parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `file` | object | No | A file uploaded in the conversation (GeoJSON, KML, KMZ, GPX, zipped Shapefile, GeoParquet, FlatGeobuf, GeoPackage, CSV or WKT). | | `file.download_url` | string | Yes | | | `file.file_id` | string | Yes | | | `file.file_name` | string | No | | | `file.mime_type` | string | No | | | `url` | string | No | A public http(s) link to the features, or a TerraLab download link from an earlier answer. | | `geojson` | object | No | The features as a GeoJSON FeatureCollection, Feature or geometry in WGS 84 (longitude, latitude). | | `radius_m` | number | Yes | The buffer distance in metres (convert km or miles first). From 0.1 to 100000. | | `dissolve` | boolean | No | Merge all buffers into one feature, so overlaps count once in the total area. | | `formats` | array of string | No | Download formats. All five by default. | | `title` | string | No | Name for the map and the output files. | ## 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. ```json { "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](https://terra-lab.ai/docs/errors). ## Description for agents The text the server gives an agent to decide when to call this tool: > Use this when the user wants a buffer (zone of a given width) around features or a drawn line or polygon: an uploaded file, a link, inline GeoJSON, or a download link from another TerraLab answer. Each feature gets its own buffer polygon, or with dissolve one merged area whose overlaps count once, built in a local equidistant projection; up to 25,000 vertices. Returns the feature count, total area, a map and GeoJSON, KML, Shapefile zip, GeoPackage and CSV downloads. Not for a circle around one place (circle_around_place). Never use the user's current location unless they type it. Download links build their file when opened; no file is saved. The user opens the file in QGIS or any GIS: this server cannot load it into the user's own QGIS or any app on their computer. Never pass these links to open_gis_file: list every format the user needs in formats, in this one call. TerraLab reads the file or link to answer and keeps no copy. ## Call it over HTTP The same tool is also callable over HTTP with an [API key](https://terra-lab.ai/docs/authentication): `POST https://mcp.terra-lab.ai/v1/tools/buffer_features` with the arguments as the JSON body. ```bash curl -X POST https://mcp.terra-lab.ai/v1/tools/buffer_features \ -H "Authorization: Bearer $TERRALAB_API_KEY" \ -H "Content-Type: application/json" \ -d '{"geojson":{"type":"LineString","coordinates":[[6.12,45.9],[6.13,45.905]]},"radius_m":200}' ``` ```python import os import requests response = requests.post( "https://mcp.terra-lab.ai/v1/tools/buffer_features", headers={"Authorization": f"Bearer {os.environ['TERRALAB_API_KEY']}"}, json={ "geojson": { "type": "LineString", "coordinates": [[6.12, 45.9], [6.13, 45.905]], }, "radius_m": 200, }, timeout=120, ) response.raise_for_status() print(response.json()["structuredContent"]) ``` ```javascript const response = await fetch('https://mcp.terra-lab.ai/v1/tools/buffer_features', { method: 'POST', headers: { Authorization: `Bearer ${process.env.TERRALAB_API_KEY}`, 'Content-Type': 'application/json', }, body: JSON.stringify({ "geojson": { "type": "LineString", "coordinates": [ [ 6.12, 45.9 ], [ 6.13, 45.905 ] ] }, "radius_m": 200 }), }); const data = await response.json(); console.log(data.structuredContent); ``` Source: https://terra-lab.ai/docs/mcp/tools/buffer_features · Updated 2026-11-24 --- # Merge (dissolve) features into one > Index of the TerraLab docs for agents: [llms.txt](https://terra-lab.ai/docs/llms.txt). Every docs page is also served as markdown: add .md to its URL. The features of a layer merged into one, or into one per value of a field, with the total area or length. | | | | --- | --- | | MCP tool | `dissolve_features` on `https://mcp.terra-lab.ai/mcp` | | Group | Layer operations | ## Use it Connect the [MCP server](https://terra-lab.ai/docs/mcp) to your assistant and ask in plain words: the assistant picks `dissolve_features` when the request fits and fills the arguments below. These are valid arguments: ```json {"url":"https://mcp.terra-lab.ai/dl/geojson/TOKEN/buildings.geojson","dissolve_field":"class"} ``` ## Parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `file` | object | No | A file uploaded in the conversation (GeoJSON, KML, KMZ, GPX, zipped Shapefile, GeoParquet, FlatGeobuf, GeoPackage, CSV or WKT). | | `file.download_url` | string | Yes | | | `file.file_id` | string | Yes | | | `file.file_name` | string | No | | | `file.mime_type` | string | No | | | `url` | string | No | A public http(s) link to the features, or a TerraLab download link from an earlier answer. | | `geojson` | object | No | The features as a GeoJSON FeatureCollection, Feature or geometry in WGS 84 (longitude, latitude). | | `dissolve_field` | string | No | Dissolve into one feature per value of this field instead of one feature. | | `formats` | array of string | No | Download formats. All five by default. | | `title` | string | No | Name for the map and the output files. | ## 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. ```json { "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](https://terra-lab.ai/docs/errors). ## Description for agents The text the server gives an agent to decide when to call this tool: > Use this when the user wants to merge, union or dissolve the features of a layer (an uploaded file, a link, inline GeoJSON or a TerraLab download link) into one feature, or one per value of dissolve_field. Up to 20,000 features and 100,000 vertices. Returns the feature count, total area or length, a map and GeoJSON, KML, Shapefile zip, GeoPackage and CSV downloads. Never use the user's current location unless they type it. Download links build their file when opened; no file is saved. The user opens the file in QGIS or any GIS: this server cannot load it into the user's own QGIS or any app on their computer. Never pass these links to open_gis_file: list every format the user needs in formats, in this one call. TerraLab reads the file or link to answer and keeps no copy. ## Call it over HTTP The same tool is also callable over HTTP with an [API key](https://terra-lab.ai/docs/authentication): `POST https://mcp.terra-lab.ai/v1/tools/dissolve_features` with the arguments as the JSON body. ```bash curl -X POST https://mcp.terra-lab.ai/v1/tools/dissolve_features \ -H "Authorization: Bearer $TERRALAB_API_KEY" \ -H "Content-Type: application/json" \ -d '{"url":"https://mcp.terra-lab.ai/dl/geojson/TOKEN/buildings.geojson","dissolve_field":"class"}' ``` ```python import os import requests response = requests.post( "https://mcp.terra-lab.ai/v1/tools/dissolve_features", headers={"Authorization": f"Bearer {os.environ['TERRALAB_API_KEY']}"}, json={ "url": "https://mcp.terra-lab.ai/dl/geojson/TOKEN/buildings.geojson", "dissolve_field": "class", }, timeout=120, ) response.raise_for_status() print(response.json()["structuredContent"]) ``` ```javascript const response = await fetch('https://mcp.terra-lab.ai/v1/tools/dissolve_features', { method: 'POST', headers: { Authorization: `Bearer ${process.env.TERRALAB_API_KEY}`, 'Content-Type': 'application/json', }, body: JSON.stringify({ "url": "https://mcp.terra-lab.ai/dl/geojson/TOKEN/buildings.geojson", "dissolve_field": "class" }), }); const data = await response.json(); console.log(data.structuredContent); ``` Source: https://terra-lab.ai/docs/mcp/tools/dissolve_features · Updated 2026-11-24 --- # Keep the parts inside a second layer > Index of the TerraLab docs for agents: [llms.txt](https://terra-lab.ai/docs/llms.txt). Every docs page is also served as markdown: add .md to its URL. The parts of each feature that lie inside a second layer of polygons, with their attributes. | | | | --- | --- | | MCP tool | `intersect_layers` on `https://mcp.terra-lab.ai/mcp` | | Group | Layer operations | ## Use it Connect the [MCP server](https://terra-lab.ai/docs/mcp) to your assistant and ask in plain words: the assistant picks `intersect_layers` when the request fits and fills the arguments below. These are valid arguments: ```json {"url":"https://mcp.terra-lab.ai/dl/geojson/TOKEN/buildings.geojson","with_url":"https://example.com/flood-zones.geojson"} ``` ## Parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `file` | object | No | A file uploaded in the conversation (GeoJSON, KML, KMZ, GPX, zipped Shapefile, GeoParquet, FlatGeobuf, GeoPackage, CSV or WKT). | | `file.download_url` | string | Yes | | | `file.file_id` | string | Yes | | | `file.file_name` | string | No | | | `file.mime_type` | string | No | | | `url` | string | No | A public http(s) link to the features, or a TerraLab download link from an earlier answer. | | `geojson` | object | No | The features as a GeoJSON FeatureCollection, Feature or geometry in WGS 84 (longitude, latitude). | | `with_file` | object | No | The second layer, uploaded in the conversation. | | `with_file.download_url` | string | Yes | | | `with_file.file_id` | string | Yes | | | `with_file.file_name` | string | No | | | `with_file.mime_type` | string | No | | | `with_url` | string | No | A link to the second layer, or a TerraLab download link. | | `with_geojson` | object | No | The second layer as GeoJSON in WGS 84. Only its polygons count. | | `formats` | array of string | No | Download formats. All five by default. | | `title` | string | No | Name for the map and the output files. | ## 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. ```json { "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](https://terra-lab.ai/docs/errors). ## Description for agents The text the server gives an agent to decide when to call this tool: > Use this when the user wants the intersection of a layer with a second layer of polygons: the parts of each feature that lie inside it, with their attributes. Both layers can be an uploaded file, a link, inline GeoJSON or a TerraLab download link. Up to 20,000 features and 100,000 vertices. Returns the feature count, a map and GeoJSON, KML, Shapefile zip, GeoPackage and CSV downloads. To cut to a place or a box instead of a layer, use clip_features. Never use the user's current location unless they type it. Download links build their file when opened; no file is saved. The user opens the file in QGIS or any GIS: this server cannot load it into the user's own QGIS or any app on their computer. Never pass these links to open_gis_file: list every format the user needs in formats, in this one call. TerraLab reads the file or link to answer and keeps no copy. ## Call it over HTTP The same tool is also callable over HTTP with an [API key](https://terra-lab.ai/docs/authentication): `POST https://mcp.terra-lab.ai/v1/tools/intersect_layers` with the arguments as the JSON body. ```bash curl -X POST https://mcp.terra-lab.ai/v1/tools/intersect_layers \ -H "Authorization: Bearer $TERRALAB_API_KEY" \ -H "Content-Type: application/json" \ -d '{"url":"https://mcp.terra-lab.ai/dl/geojson/TOKEN/buildings.geojson","with_url":"https://example.com/flood-zones.geojson"}' ``` ```python import os import requests response = requests.post( "https://mcp.terra-lab.ai/v1/tools/intersect_layers", headers={"Authorization": f"Bearer {os.environ['TERRALAB_API_KEY']}"}, json={ "url": "https://mcp.terra-lab.ai/dl/geojson/TOKEN/buildings.geojson", "with_url": "https://example.com/flood-zones.geojson", }, timeout=120, ) response.raise_for_status() print(response.json()["structuredContent"]) ``` ```javascript const response = await fetch('https://mcp.terra-lab.ai/v1/tools/intersect_layers', { method: 'POST', headers: { Authorization: `Bearer ${process.env.TERRALAB_API_KEY}`, 'Content-Type': 'application/json', }, body: JSON.stringify({ "url": "https://mcp.terra-lab.ai/dl/geojson/TOKEN/buildings.geojson", "with_url": "https://example.com/flood-zones.geojson" }), }); const data = await response.json(); console.log(data.structuredContent); ``` Source: https://terra-lab.ai/docs/mcp/tools/intersect_layers · Updated 2026-11-24 --- # Remove the parts inside a second layer > Index of the TerraLab docs for agents: [llms.txt](https://terra-lab.ai/docs/llms.txt). Every docs page is also served as markdown: add .md to its URL. Each feature of a layer minus the parts inside a second layer of polygons, such as buildings outside the flood zones. | | | | --- | --- | | MCP tool | `erase_with_layer` on `https://mcp.terra-lab.ai/mcp` | | Group | Layer operations | ## Use it Connect the [MCP server](https://terra-lab.ai/docs/mcp) to your assistant and ask in plain words: the assistant picks `erase_with_layer` when the request fits and fills the arguments below. These are valid arguments: ```json {"url":"https://mcp.terra-lab.ai/dl/geojson/TOKEN/buildings.geojson","with_url":"https://example.com/flood-zones.geojson"} ``` ## Parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `file` | object | No | A file uploaded in the conversation (GeoJSON, KML, KMZ, GPX, zipped Shapefile, GeoParquet, FlatGeobuf, GeoPackage, CSV or WKT). | | `file.download_url` | string | Yes | | | `file.file_id` | string | Yes | | | `file.file_name` | string | No | | | `file.mime_type` | string | No | | | `url` | string | No | A public http(s) link to the features, or a TerraLab download link from an earlier answer. | | `geojson` | object | No | The features as a GeoJSON FeatureCollection, Feature or geometry in WGS 84 (longitude, latitude). | | `with_file` | object | No | The second layer, uploaded in the conversation. | | `with_file.download_url` | string | Yes | | | `with_file.file_id` | string | Yes | | | `with_file.file_name` | string | No | | | `with_file.mime_type` | string | No | | | `with_url` | string | No | A link to the second layer, or a TerraLab download link. | | `with_geojson` | object | No | The second layer as GeoJSON in WGS 84. Only its polygons count. | | `formats` | array of string | No | Download formats. All five by default. | | `title` | string | No | Name for the map and the output files. | ## 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. ```json { "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](https://terra-lab.ai/docs/errors). ## Description for agents The text the server gives an agent to decide when to call this tool: > Use this when the user wants the difference of a layer with a second layer of polygons: each feature minus the parts inside it ("buildings outside the flood zones"). Both layers can be an uploaded file, a link, inline GeoJSON or a TerraLab download link. Up to 20,000 features and 100,000 vertices. Returns the feature count, a map and GeoJSON, KML, Shapefile zip, GeoPackage and CSV downloads. Never use the user's current location unless they type it. Download links build their file when opened; no file is saved. The user opens the file in QGIS or any GIS: this server cannot load it into the user's own QGIS or any app on their computer. Never pass these links to open_gis_file: list every format the user needs in formats, in this one call. TerraLab reads the file or link to answer and keeps no copy. ## Call it over HTTP The same tool is also callable over HTTP with an [API key](https://terra-lab.ai/docs/authentication): `POST https://mcp.terra-lab.ai/v1/tools/erase_with_layer` with the arguments as the JSON body. ```bash curl -X POST https://mcp.terra-lab.ai/v1/tools/erase_with_layer \ -H "Authorization: Bearer $TERRALAB_API_KEY" \ -H "Content-Type: application/json" \ -d '{"url":"https://mcp.terra-lab.ai/dl/geojson/TOKEN/buildings.geojson","with_url":"https://example.com/flood-zones.geojson"}' ``` ```python import os import requests response = requests.post( "https://mcp.terra-lab.ai/v1/tools/erase_with_layer", headers={"Authorization": f"Bearer {os.environ['TERRALAB_API_KEY']}"}, json={ "url": "https://mcp.terra-lab.ai/dl/geojson/TOKEN/buildings.geojson", "with_url": "https://example.com/flood-zones.geojson", }, timeout=120, ) response.raise_for_status() print(response.json()["structuredContent"]) ``` ```javascript const response = await fetch('https://mcp.terra-lab.ai/v1/tools/erase_with_layer', { method: 'POST', headers: { Authorization: `Bearer ${process.env.TERRALAB_API_KEY}`, 'Content-Type': 'application/json', }, body: JSON.stringify({ "url": "https://mcp.terra-lab.ai/dl/geojson/TOKEN/buildings.geojson", "with_url": "https://example.com/flood-zones.geojson" }), }); const data = await response.json(); console.log(data.structuredContent); ``` Source: https://terra-lab.ai/docs/mcp/tools/erase_with_layer · Updated 2026-11-24 --- # Clip features to an area or a layer > Index of the TerraLab docs for agents: [llms.txt](https://terra-lab.ai/docs/llms.txt). Every docs page is also served as markdown: add .md to its URL. A layer cut to an area: a place, a place with a radius, a bounding box or a second layer of polygons. | | | | --- | --- | | MCP tool | `clip_features` on `https://mcp.terra-lab.ai/mcp` | | Group | Layer operations | ## Use it Connect the [MCP server](https://terra-lab.ai/docs/mcp) to your assistant and ask in plain words: the assistant picks `clip_features` when the request fits and fills the arguments below. These are valid arguments: ```json {"url":"https://mcp.terra-lab.ai/dl/geojson/TOKEN/buildings.geojson","area":{"place":"Annecy","radius_m":150}} ``` ## Parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `file` | object | No | A file uploaded in the conversation (GeoJSON, KML, KMZ, GPX, zipped Shapefile, GeoParquet, FlatGeobuf, GeoPackage, CSV or WKT). | | `file.download_url` | string | Yes | | | `file.file_id` | string | Yes | | | `file.file_name` | string | No | | | `file.mime_type` | string | No | | | `url` | string | No | A public http(s) link to the features, or a TerraLab download link from an earlier answer. | | `geojson` | object | No | The features as a GeoJSON FeatureCollection, Feature or geometry in WGS 84 (longitude, latitude). | | `area` | object | No | For clip: the area to keep, as a bbox or a place with a radius (its bounding box is used). 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. | | `with_file` | object | No | The second layer, uploaded in the conversation. | | `with_file.download_url` | string | Yes | | | `with_file.file_id` | string | Yes | | | `with_file.file_name` | string | No | | | `with_file.mime_type` | string | No | | | `with_url` | string | No | A link to the second layer, or a TerraLab download link. | | `with_geojson` | object | No | The second layer as GeoJSON in WGS 84. Only its polygons count. | | `formats` | array of string | No | Download formats. All five by default. | | `title` | string | No | Name for the map and the output files. | ## 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. ```json { "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](https://terra-lab.ai/docs/errors). ## Description for agents The text the server gives an agent to decide when to call this tool: > Use this when the user wants to clip (cut) a layer to an area: a place, a place with radius_m or a bbox (its bounding box is used), or a second layer of polygons. The layer can be an uploaded file, a link, inline GeoJSON or a TerraLab download link. Up to 20,000 features and 100,000 vertices. Returns the feature count, a map and GeoJSON, KML, Shapefile zip, GeoPackage and CSV downloads. Never use the user's current location unless they type it. Download links build their file when opened; no file is saved. The user opens the file in QGIS or any GIS: this server cannot load it into the user's own QGIS or any app on their computer. Never pass these links to open_gis_file: list every format the user needs in formats, in this one call. TerraLab reads the file or link to answer and keeps no copy. ## Call it over HTTP The same tool is also callable over HTTP with an [API key](https://terra-lab.ai/docs/authentication): `POST https://mcp.terra-lab.ai/v1/tools/clip_features` with the arguments as the JSON body. ```bash curl -X POST https://mcp.terra-lab.ai/v1/tools/clip_features \ -H "Authorization: Bearer $TERRALAB_API_KEY" \ -H "Content-Type: application/json" \ -d '{"url":"https://mcp.terra-lab.ai/dl/geojson/TOKEN/buildings.geojson","area":{"place":"Annecy","radius_m":150}}' ``` ```python import os import requests response = requests.post( "https://mcp.terra-lab.ai/v1/tools/clip_features", headers={"Authorization": f"Bearer {os.environ['TERRALAB_API_KEY']}"}, json={ "url": "https://mcp.terra-lab.ai/dl/geojson/TOKEN/buildings.geojson", "area": { "place": "Annecy", "radius_m": 150, }, }, timeout=120, ) response.raise_for_status() print(response.json()["structuredContent"]) ``` ```javascript const response = await fetch('https://mcp.terra-lab.ai/v1/tools/clip_features', { method: 'POST', headers: { Authorization: `Bearer ${process.env.TERRALAB_API_KEY}`, 'Content-Type': 'application/json', }, body: JSON.stringify({ "url": "https://mcp.terra-lab.ai/dl/geojson/TOKEN/buildings.geojson", "area": { "place": "Annecy", "radius_m": 150 } }), }); const data = await response.json(); console.log(data.structuredContent); ``` Source: https://terra-lab.ai/docs/mcp/tools/clip_features · Updated 2026-11-24 --- # Simplify feature outlines > Index of the TerraLab docs for agents: [llms.txt](https://terra-lab.ai/docs/llms.txt). Every docs page is also served as markdown: add .md to its URL. Lighter outlines: the lines or polygons of a layer simplified so no vertex moves more than a tolerance in metres. | | | | --- | --- | | MCP tool | `simplify_features` on `https://mcp.terra-lab.ai/mcp` | | Group | Layer operations | ## Use it Connect the [MCP server](https://terra-lab.ai/docs/mcp) to your assistant and ask in plain words: the assistant picks `simplify_features` when the request fits and fills the arguments below. These are valid arguments: ```json {"url":"https://mcp.terra-lab.ai/dl/geojson/TOKEN/buildings.geojson","tolerance_m":5} ``` ## Parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `file` | object | No | A file uploaded in the conversation (GeoJSON, KML, KMZ, GPX, zipped Shapefile, GeoParquet, FlatGeobuf, GeoPackage, CSV or WKT). | | `file.download_url` | string | Yes | | | `file.file_id` | string | Yes | | | `file.file_name` | string | No | | | `file.mime_type` | string | No | | | `url` | string | No | A public http(s) link to the features, or a TerraLab download link from an earlier answer. | | `geojson` | object | No | The features as a GeoJSON FeatureCollection, Feature or geometry in WGS 84 (longitude, latitude). | | `tolerance_m` | number | Yes | The largest allowed shift of the outline in metres. From 0.01 to 100000. | | `formats` | array of string | No | Download formats. All five by default. | | `title` | string | No | Name for the map and the output files. | ## 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. ```json { "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](https://terra-lab.ai/docs/errors). ## Description for agents The text the server gives an agent to decide when to call this tool: > Use this when the user wants lighter outlines: simplify the lines or polygons of a layer (an uploaded file, a link, inline GeoJSON or a TerraLab download link) so no vertex moves more than tolerance_m. Runs in a local equidistant projection; up to 20,000 features and 100,000 vertices. Returns the feature count, a map and GeoJSON, KML, Shapefile zip, GeoPackage and CSV downloads. Never use the user's current location unless they type it. Download links build their file when opened; no file is saved. The user opens the file in QGIS or any GIS: this server cannot load it into the user's own QGIS or any app on their computer. Never pass these links to open_gis_file: list every format the user needs in formats, in this one call. TerraLab reads the file or link to answer and keeps no copy. ## Call it over HTTP The same tool is also callable over HTTP with an [API key](https://terra-lab.ai/docs/authentication): `POST https://mcp.terra-lab.ai/v1/tools/simplify_features` with the arguments as the JSON body. ```bash curl -X POST https://mcp.terra-lab.ai/v1/tools/simplify_features \ -H "Authorization: Bearer $TERRALAB_API_KEY" \ -H "Content-Type: application/json" \ -d '{"url":"https://mcp.terra-lab.ai/dl/geojson/TOKEN/buildings.geojson","tolerance_m":5}' ``` ```python import os import requests response = requests.post( "https://mcp.terra-lab.ai/v1/tools/simplify_features", headers={"Authorization": f"Bearer {os.environ['TERRALAB_API_KEY']}"}, json={ "url": "https://mcp.terra-lab.ai/dl/geojson/TOKEN/buildings.geojson", "tolerance_m": 5, }, timeout=120, ) response.raise_for_status() print(response.json()["structuredContent"]) ``` ```javascript const response = await fetch('https://mcp.terra-lab.ai/v1/tools/simplify_features', { method: 'POST', headers: { Authorization: `Bearer ${process.env.TERRALAB_API_KEY}`, 'Content-Type': 'application/json', }, body: JSON.stringify({ "url": "https://mcp.terra-lab.ai/dl/geojson/TOKEN/buildings.geojson", "tolerance_m": 5 }), }); const data = await response.json(); console.log(data.structuredContent); ``` Source: https://terra-lab.ai/docs/mcp/tools/simplify_features · Updated 2026-11-24 --- # Centre point of each feature > Index of the TerraLab docs for agents: [llms.txt](https://terra-lab.ai/docs/llms.txt). Every docs page is also served as markdown: add .md to its URL. The centre point of each feature of a layer, with its attributes, for example to turn buildings or parcels into points. | | | | --- | --- | | MCP tool | `feature_centroids` on `https://mcp.terra-lab.ai/mcp` | | Group | Layer operations | ## Use it Connect the [MCP server](https://terra-lab.ai/docs/mcp) to your assistant and ask in plain words: the assistant picks `feature_centroids` when the request fits and fills the arguments below. These are valid arguments: ```json {"url":"https://mcp.terra-lab.ai/dl/geojson/TOKEN/buildings.geojson"} ``` ## Parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `file` | object | No | A file uploaded in the conversation (GeoJSON, KML, KMZ, GPX, zipped Shapefile, GeoParquet, FlatGeobuf, GeoPackage, CSV or WKT). | | `file.download_url` | string | Yes | | | `file.file_id` | string | Yes | | | `file.file_name` | string | No | | | `file.mime_type` | string | No | | | `url` | string | No | A public http(s) link to the features, or a TerraLab download link from an earlier answer. | | `geojson` | object | No | The features as a GeoJSON FeatureCollection, Feature or geometry in WGS 84 (longitude, latitude). | | `formats` | array of string | No | Download formats. All five by default. | | `title` | string | No | Name for the map and the output files. | ## 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. ```json { "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](https://terra-lab.ai/docs/errors). ## Description for agents The text the server gives an agent to decide when to call this tool: > Use this when the user wants the centre point (centroid) of each feature of a layer (an uploaded file, a link, inline GeoJSON or a TerraLab download link), with its attributes, for example to turn buildings or parcels into points. Up to 20,000 features and 100,000 vertices. Returns the point count, a map and GeoJSON, KML, Shapefile zip, GeoPackage and CSV downloads. Never use the user's current location unless they type it. Download links build their file when opened; no file is saved. The user opens the file in QGIS or any GIS: this server cannot load it into the user's own QGIS or any app on their computer. Never pass these links to open_gis_file: list every format the user needs in formats, in this one call. TerraLab reads the file or link to answer and keeps no copy. ## Call it over HTTP The same tool is also callable over HTTP with an [API key](https://terra-lab.ai/docs/authentication): `POST https://mcp.terra-lab.ai/v1/tools/feature_centroids` with the arguments as the JSON body. ```bash curl -X POST https://mcp.terra-lab.ai/v1/tools/feature_centroids \ -H "Authorization: Bearer $TERRALAB_API_KEY" \ -H "Content-Type: application/json" \ -d '{"url":"https://mcp.terra-lab.ai/dl/geojson/TOKEN/buildings.geojson"}' ``` ```python import os import requests response = requests.post( "https://mcp.terra-lab.ai/v1/tools/feature_centroids", headers={"Authorization": f"Bearer {os.environ['TERRALAB_API_KEY']}"}, json={ "url": "https://mcp.terra-lab.ai/dl/geojson/TOKEN/buildings.geojson", }, timeout=120, ) response.raise_for_status() print(response.json()["structuredContent"]) ``` ```javascript const response = await fetch('https://mcp.terra-lab.ai/v1/tools/feature_centroids', { method: 'POST', headers: { Authorization: `Bearer ${process.env.TERRALAB_API_KEY}`, 'Content-Type': 'application/json', }, body: JSON.stringify({ "url": "https://mcp.terra-lab.ai/dl/geojson/TOKEN/buildings.geojson" }), }); const data = await response.json(); console.log(data.structuredContent); ``` Source: https://terra-lab.ai/docs/mcp/tools/feature_centroids · Updated 2026-11-24 --- # Add area and length to each feature > Index of the TerraLab docs for agents: [llms.txt](https://terra-lab.ai/docs/llms.txt). Every docs page is also served as markdown: add .md to its URL. The geodesic area, perimeter and length added to every feature of a layer, with the totals. | | | | --- | --- | | MCP tool | `add_area_and_length` on `https://mcp.terra-lab.ai/mcp` | | Group | Layer operations | ## Use it Connect the [MCP server](https://terra-lab.ai/docs/mcp) to your assistant and ask in plain words: the assistant picks `add_area_and_length` when the request fits and fills the arguments below. These are valid arguments: ```json {"url":"https://mcp.terra-lab.ai/dl/geojson/TOKEN/buildings.geojson"} ``` ## Parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `file` | object | No | A file uploaded in the conversation (GeoJSON, KML, KMZ, GPX, zipped Shapefile, GeoParquet, FlatGeobuf, GeoPackage, CSV or WKT). | | `file.download_url` | string | Yes | | | `file.file_id` | string | Yes | | | `file.file_name` | string | No | | | `file.mime_type` | string | No | | | `url` | string | No | A public http(s) link to the features, or a TerraLab download link from an earlier answer. | | `geojson` | object | No | The features as a GeoJSON FeatureCollection, Feature or geometry in WGS 84 (longitude, latitude). | | `formats` | array of string | No | Download formats. All five by default. | | `title` | string | No | Name for the map and the output files. | ## 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. ```json { "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](https://terra-lab.ai/docs/errors). ## Description for agents The text the server gives an agent to decide when to call this tool: > Use this when the user wants the area, perimeter or length of every feature of a layer (an uploaded file, a link, inline GeoJSON or a TerraLab download link): adds area_m2, perimeter_m and length_m to each feature, geodesic on the WGS 84 ellipsoid, and gives the totals. Up to 20,000 features and 100,000 vertices. Not for a shape drawn in the chat with a single figure (measure_distance, measure_area), not for converting the format of a file (open_gis_file). Returns a map and GeoJSON, KML, Shapefile zip, GeoPackage and CSV downloads. Never use the user's current location unless they type it. Download links build their file when opened; no file is saved. The user opens the file in QGIS or any GIS: this server cannot load it into the user's own QGIS or any app on their computer. Never pass these links to open_gis_file: list every format the user needs in formats, in this one call. TerraLab reads the file or link to answer and keeps no copy. ## Call it over HTTP The same tool is also callable over HTTP with an [API key](https://terra-lab.ai/docs/authentication): `POST https://mcp.terra-lab.ai/v1/tools/add_area_and_length` with the arguments as the JSON body. ```bash curl -X POST https://mcp.terra-lab.ai/v1/tools/add_area_and_length \ -H "Authorization: Bearer $TERRALAB_API_KEY" \ -H "Content-Type: application/json" \ -d '{"url":"https://mcp.terra-lab.ai/dl/geojson/TOKEN/buildings.geojson"}' ``` ```python import os import requests response = requests.post( "https://mcp.terra-lab.ai/v1/tools/add_area_and_length", headers={"Authorization": f"Bearer {os.environ['TERRALAB_API_KEY']}"}, json={ "url": "https://mcp.terra-lab.ai/dl/geojson/TOKEN/buildings.geojson", }, timeout=120, ) response.raise_for_status() print(response.json()["structuredContent"]) ``` ```javascript const response = await fetch('https://mcp.terra-lab.ai/v1/tools/add_area_and_length', { method: 'POST', headers: { Authorization: `Bearer ${process.env.TERRALAB_API_KEY}`, 'Content-Type': 'application/json', }, body: JSON.stringify({ "url": "https://mcp.terra-lab.ai/dl/geojson/TOKEN/buildings.geojson" }), }); const data = await response.json(); console.log(data.structuredContent); ``` Source: https://terra-lab.ai/docs/mcp/tools/add_area_and_length · Updated 2026-11-24 --- # Count features inside each polygon > Index of the TerraLab docs for agents: [llms.txt](https://terra-lab.ai/docs/llms.txt). Every docs page is also served as markdown: add .md to its URL. How many features of a layer fall inside each polygon of a second layer, with an optional sum of a numeric field. | | | | --- | --- | | MCP tool | `count_in_polygons` on `https://mcp.terra-lab.ai/mcp` | | Group | Layer operations | ## Use it Connect the [MCP server](https://terra-lab.ai/docs/mcp) to your assistant and ask in plain words: the assistant picks `count_in_polygons` when the request fits and fills the arguments below. These are valid arguments: ```json {"url":"https://mcp.terra-lab.ai/dl/geojson/TOKEN/pois.geojson","with_url":"https://mcp.terra-lab.ai/dl/geojson/TOKEN/divisions.geojson"} ``` ## Parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `file` | object | No | A file uploaded in the conversation (GeoJSON, KML, KMZ, GPX, zipped Shapefile, GeoParquet, FlatGeobuf, GeoPackage, CSV or WKT). | | `file.download_url` | string | Yes | | | `file.file_id` | string | Yes | | | `file.file_name` | string | No | | | `file.mime_type` | string | No | | | `url` | string | No | A public http(s) link to the features, or a TerraLab download link from an earlier answer. | | `geojson` | object | No | The features as a GeoJSON FeatureCollection, Feature or geometry in WGS 84 (longitude, latitude). | | `with_file` | object | No | The polygons to count in, uploaded in the conversation. | | `with_file.download_url` | string | Yes | | | `with_file.file_id` | string | Yes | | | `with_file.file_name` | string | No | | | `with_file.mime_type` | string | No | | | `with_url` | string | No | A link to the polygons to count in, or a TerraLab download link. | | `with_geojson` | object | No | The polygons to count in, as GeoJSON in WGS 84. | | `sum_field` | string | No | Also sum this numeric field of the counted features per polygon, as sum_. | | `formats` | array of string | No | Download formats. All five by default. | | `title` | string | No | Name for the map and the output files. | ## 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. ```json { "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](https://terra-lab.ai/docs/errors). ## Description for agents The text the server gives an agent to decide when to call this tool: > Use this when the user wants to count points in polygons: how many features of a layer (shops, buildings, addresses, accidents) fall inside each polygon of a second layer (districts, parcels, zones), with an optional sum of a numeric field. Both layers can be an uploaded file, a link, inline GeoJSON or a TerraLab download link, up to 20,000 features each. A line or polygon counts where its centroid falls. Returns the polygons with feature_count (and sum_), the largest counts as sample rows, a map and GeoJSON, KML, Shapefile zip, GeoPackage and CSV downloads. To copy the polygon's attributes onto each feature instead, use join_by_location. Never use the user's current location unless they type it. Download links build their file when opened; no file is saved. The user opens the file in QGIS or any GIS: this server cannot load it into the user's own QGIS or any app on their computer. Never pass these links to open_gis_file: list every format the user needs in formats, in this one call. TerraLab reads the file or link to answer and keeps no copy. ## Call it over HTTP The same tool is also callable over HTTP with an [API key](https://terra-lab.ai/docs/authentication): `POST https://mcp.terra-lab.ai/v1/tools/count_in_polygons` with the arguments as the JSON body. ```bash curl -X POST https://mcp.terra-lab.ai/v1/tools/count_in_polygons \ -H "Authorization: Bearer $TERRALAB_API_KEY" \ -H "Content-Type: application/json" \ -d '{"url":"https://mcp.terra-lab.ai/dl/geojson/TOKEN/pois.geojson","with_url":"https://mcp.terra-lab.ai/dl/geojson/TOKEN/divisions.geojson"}' ``` ```python import os import requests response = requests.post( "https://mcp.terra-lab.ai/v1/tools/count_in_polygons", headers={"Authorization": f"Bearer {os.environ['TERRALAB_API_KEY']}"}, json={ "url": "https://mcp.terra-lab.ai/dl/geojson/TOKEN/pois.geojson", "with_url": "https://mcp.terra-lab.ai/dl/geojson/TOKEN/divisions.geojson", }, timeout=120, ) response.raise_for_status() print(response.json()["structuredContent"]) ``` ```javascript const response = await fetch('https://mcp.terra-lab.ai/v1/tools/count_in_polygons', { method: 'POST', headers: { Authorization: `Bearer ${process.env.TERRALAB_API_KEY}`, 'Content-Type': 'application/json', }, body: JSON.stringify({ "url": "https://mcp.terra-lab.ai/dl/geojson/TOKEN/pois.geojson", "with_url": "https://mcp.terra-lab.ai/dl/geojson/TOKEN/divisions.geojson" }), }); const data = await response.json(); console.log(data.structuredContent); ``` Source: https://terra-lab.ai/docs/mcp/tools/count_in_polygons · Updated 2026-11-24 --- # Nearest feature and its distance > Index of the TerraLab docs for agents: [llms.txt](https://terra-lab.ai/docs/llms.txt). Every docs page is also served as markdown: add .md to its URL. For each feature of a layer, the nearest feature of a second layer and the distance to it. | | | | --- | --- | | MCP tool | `find_nearest_features` on `https://mcp.terra-lab.ai/mcp` | | Group | Layer operations | ## Use it Connect the [MCP server](https://terra-lab.ai/docs/mcp) to your assistant and ask in plain words: the assistant picks `find_nearest_features` when the request fits and fills the arguments below. These are valid arguments: ```json {"url":"https://mcp.terra-lab.ai/dl/geojson/TOKEN/buildings.geojson","with_url":"https://mcp.terra-lab.ai/dl/geojson/TOKEN/pois.geojson","join_fields":["name"]} ``` ## Parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `file` | object | No | A file uploaded in the conversation (GeoJSON, KML, KMZ, GPX, zipped Shapefile, GeoParquet, FlatGeobuf, GeoPackage, CSV or WKT). | | `file.download_url` | string | Yes | | | `file.file_id` | string | Yes | | | `file.file_name` | string | No | | | `file.mime_type` | string | No | | | `url` | string | No | A public http(s) link to the features, or a TerraLab download link from an earlier answer. | | `geojson` | object | No | The features as a GeoJSON FeatureCollection, Feature or geometry in WGS 84 (longitude, latitude). | | `with_file` | object | No | The second layer, uploaded in the conversation. | | `with_file.download_url` | string | Yes | | | `with_file.file_id` | string | Yes | | | `with_file.file_name` | string | No | | | `with_file.mime_type` | string | No | | | `with_url` | string | No | A link to the second layer, or a TerraLab download link. | | `with_geojson` | object | No | The second layer as GeoJSON in WGS 84, of any geometry. | | `join_fields` | array of string | No | The fields of the nearest feature to copy, as nearest_. Its name by default. | | `formats` | array of string | No | Download formats. All five by default. | | `title` | string | No | Name for the map and the output files. | ## 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. ```json { "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](https://terra-lab.ai/docs/errors). ## Description for agents The text the server gives an agent to decide when to call this tool: > Use this when the user wants, for each feature of a layer, the nearest feature of a second layer and the distance to it: the closest school to each building, the nearest road to each point. Both layers can be an uploaded file, a link, inline GeoJSON or a TerraLab download link, up to 20,000 features each. Adds nearest_distance_m (geodesic on the WGS 84 ellipsoid, between the two closest points, 0 when they touch) and the chosen fields of the nearest feature as nearest_. Returns the least, median and greatest distance, sample rows, a map and GeoJSON, KML, Shapefile zip, GeoPackage and CSV downloads. Not a road distance or travel time (get_travel_times). Never use the user's current location unless they type it. Download links build their file when opened; no file is saved. The user opens the file in QGIS or any GIS: this server cannot load it into the user's own QGIS or any app on their computer. Never pass these links to open_gis_file: list every format the user needs in formats, in this one call. TerraLab reads the file or link to answer and keeps no copy. ## Call it over HTTP The same tool is also callable over HTTP with an [API key](https://terra-lab.ai/docs/authentication): `POST https://mcp.terra-lab.ai/v1/tools/find_nearest_features` with the arguments as the JSON body. ```bash curl -X POST https://mcp.terra-lab.ai/v1/tools/find_nearest_features \ -H "Authorization: Bearer $TERRALAB_API_KEY" \ -H "Content-Type: application/json" \ -d '{"url":"https://mcp.terra-lab.ai/dl/geojson/TOKEN/buildings.geojson","with_url":"https://mcp.terra-lab.ai/dl/geojson/TOKEN/pois.geojson","join_fields":["name"]}' ``` ```python import os import requests response = requests.post( "https://mcp.terra-lab.ai/v1/tools/find_nearest_features", headers={"Authorization": f"Bearer {os.environ['TERRALAB_API_KEY']}"}, json={ "url": "https://mcp.terra-lab.ai/dl/geojson/TOKEN/buildings.geojson", "with_url": "https://mcp.terra-lab.ai/dl/geojson/TOKEN/pois.geojson", "join_fields": ["name"], }, timeout=120, ) response.raise_for_status() print(response.json()["structuredContent"]) ``` ```javascript const response = await fetch('https://mcp.terra-lab.ai/v1/tools/find_nearest_features', { method: 'POST', headers: { Authorization: `Bearer ${process.env.TERRALAB_API_KEY}`, 'Content-Type': 'application/json', }, body: JSON.stringify({ "url": "https://mcp.terra-lab.ai/dl/geojson/TOKEN/buildings.geojson", "with_url": "https://mcp.terra-lab.ai/dl/geojson/TOKEN/pois.geojson", "join_fields": [ "name" ] }), }); const data = await response.json(); console.log(data.structuredContent); ``` Source: https://terra-lab.ai/docs/mcp/tools/find_nearest_features · Updated 2026-11-24 --- # Select features by location > Index of the TerraLab docs for agents: [llms.txt](https://terra-lab.ai/docs/llms.txt). Every docs page is also served as markdown: add .md to its URL. The features of a layer that intersect a second layer, lie within it or lie within a distance of it, or those that do not. | | | | --- | --- | | MCP tool | `select_by_location` on `https://mcp.terra-lab.ai/mcp` | | Group | Layer operations | ## Use it Connect the [MCP server](https://terra-lab.ai/docs/mcp) to your assistant and ask in plain words: the assistant picks `select_by_location` when the request fits and fills the arguments below. These are valid arguments: ```json {"url":"https://mcp.terra-lab.ai/dl/geojson/TOKEN/buildings.geojson","with_url":"https://example.com/rivers.geojson","relation":"within_distance","distance_m":200} ``` ## Parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `file` | object | No | A file uploaded in the conversation (GeoJSON, KML, KMZ, GPX, zipped Shapefile, GeoParquet, FlatGeobuf, GeoPackage, CSV or WKT). | | `file.download_url` | string | Yes | | | `file.file_id` | string | Yes | | | `file.file_name` | string | No | | | `file.mime_type` | string | No | | | `url` | string | No | A public http(s) link to the features, or a TerraLab download link from an earlier answer. | | `geojson` | object | No | The features as a GeoJSON FeatureCollection, Feature or geometry in WGS 84 (longitude, latitude). | | `with_file` | object | No | The second layer, uploaded in the conversation. | | `with_file.download_url` | string | Yes | | | `with_file.file_id` | string | Yes | | | `with_file.file_name` | string | No | | | `with_file.mime_type` | string | No | | | `with_url` | string | No | A link to the second layer, or a TerraLab download link. | | `with_geojson` | object | No | The second layer as GeoJSON in WGS 84, of any geometry. | | `relation` | string | No | intersects (default), within (wholly inside one polygon of the second layer) or within_distance (needs distance_m). One of `"intersects"`, `"within"`, `"within_distance"`. | | `distance_m` | number | No | For within_distance: the distance in metres (convert km or miles first). From 0.1 to 100000. | | `invert` | boolean | No | Keep the features that do not match instead. | | `formats` | array of string | No | Download formats. All five by default. | | `title` | string | No | Name for the map and the output files. | ## 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. ```json { "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](https://terra-lab.ai/docs/errors). ## Description for agents The text the server gives an agent to decide when to call this tool: > Use this when the user wants the features of a layer chosen by where they are against a second layer: those that intersect it, lie wholly within one of its polygons, or lie within distance_m of it ("buildings within 200 m of a river", "parcels touching the road"), or with invert those that do not. Both layers can be an uploaded file, a link, inline GeoJSON or a TerraLab download link, up to 20,000 features each. Features keep their attributes and geometry unchanged. Returns the count selected, sample rows, a map and GeoJSON, KML, Shapefile zip, GeoPackage and CSV downloads. To cut features at the edge of an area, use clip_features. Never use the user's current location unless they type it. Download links build their file when opened; no file is saved. The user opens the file in QGIS or any GIS: this server cannot load it into the user's own QGIS or any app on their computer. Never pass these links to open_gis_file: list every format the user needs in formats, in this one call. TerraLab reads the file or link to answer and keeps no copy. ## Call it over HTTP The same tool is also callable over HTTP with an [API key](https://terra-lab.ai/docs/authentication): `POST https://mcp.terra-lab.ai/v1/tools/select_by_location` with the arguments as the JSON body. ```bash curl -X POST https://mcp.terra-lab.ai/v1/tools/select_by_location \ -H "Authorization: Bearer $TERRALAB_API_KEY" \ -H "Content-Type: application/json" \ -d '{"url":"https://mcp.terra-lab.ai/dl/geojson/TOKEN/buildings.geojson","with_url":"https://example.com/rivers.geojson","relation":"within_distance","distance_m":200}' ``` ```python import os import requests response = requests.post( "https://mcp.terra-lab.ai/v1/tools/select_by_location", headers={"Authorization": f"Bearer {os.environ['TERRALAB_API_KEY']}"}, json={ "url": "https://mcp.terra-lab.ai/dl/geojson/TOKEN/buildings.geojson", "with_url": "https://example.com/rivers.geojson", "relation": "within_distance", "distance_m": 200, }, timeout=120, ) response.raise_for_status() print(response.json()["structuredContent"]) ``` ```javascript const response = await fetch('https://mcp.terra-lab.ai/v1/tools/select_by_location', { method: 'POST', headers: { Authorization: `Bearer ${process.env.TERRALAB_API_KEY}`, 'Content-Type': 'application/json', }, body: JSON.stringify({ "url": "https://mcp.terra-lab.ai/dl/geojson/TOKEN/buildings.geojson", "with_url": "https://example.com/rivers.geojson", "relation": "within_distance", "distance_m": 200 }), }); const data = await response.json(); console.log(data.structuredContent); ``` Source: https://terra-lab.ai/docs/mcp/tools/select_by_location · Updated 2026-11-24 --- # Join attributes by location > Index of the TerraLab docs for agents: [llms.txt](https://terra-lab.ai/docs/llms.txt). Every docs page is also served as markdown: add .md to its URL. A spatial join: each feature of a layer takes the attributes of the polygon of a second layer it falls in. | | | | --- | --- | | MCP tool | `join_by_location` on `https://mcp.terra-lab.ai/mcp` | | Group | Layer operations | ## Use it Connect the [MCP server](https://terra-lab.ai/docs/mcp) to your assistant and ask in plain words: the assistant picks `join_by_location` when the request fits and fills the arguments below. These are valid arguments: ```json {"url":"https://mcp.terra-lab.ai/dl/geojson/TOKEN/pois.geojson","with_url":"https://mcp.terra-lab.ai/dl/geojson/TOKEN/divisions.geojson","join_fields":["name"]} ``` ## Parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `file` | object | No | A file uploaded in the conversation (GeoJSON, KML, KMZ, GPX, zipped Shapefile, GeoParquet, FlatGeobuf, GeoPackage, CSV or WKT). | | `file.download_url` | string | Yes | | | `file.file_id` | string | Yes | | | `file.file_name` | string | No | | | `file.mime_type` | string | No | | | `url` | string | No | A public http(s) link to the features, or a TerraLab download link from an earlier answer. | | `geojson` | object | No | The features as a GeoJSON FeatureCollection, Feature or geometry in WGS 84 (longitude, latitude). | | `with_file` | object | No | The polygons whose attributes are copied, uploaded in the conversation. | | `with_file.download_url` | string | Yes | | | `with_file.file_id` | string | Yes | | | `with_file.file_name` | string | No | | | `with_file.mime_type` | string | No | | | `with_url` | string | No | A link to the polygons whose attributes are copied, or a TerraLab download link. | | `with_geojson` | object | No | The polygons whose attributes are copied, as GeoJSON in WGS 84. | | `join_fields` | array of string | No | The fields of the polygons to copy. All of them by default. | | `formats` | array of string | No | Download formats. All five by default. | | `title` | string | No | Name for the map and the output files. | ## 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. ```json { "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](https://terra-lab.ai/docs/errors). ## Description for agents The text the server gives an agent to decide when to call this tool: > Use this when the user wants a spatial join: each feature of a layer takes the attributes of the polygon of a second layer it falls in (the district of each shop, the zone of each parcel). Both layers can be an uploaded file, a link, inline GeoJSON or a TerraLab download link, up to 20,000 features each. A line or polygon joins where its centroid falls; a field both layers have is written as _2; features outside every polygon are kept with empty joined fields. Returns the count matched, the joined fields, sample rows, a map and GeoJSON, KML, Shapefile zip, GeoPackage and CSV downloads. To count features per polygon instead, use count_in_polygons. Never use the user's current location unless they type it. Download links build their file when opened; no file is saved. The user opens the file in QGIS or any GIS: this server cannot load it into the user's own QGIS or any app on their computer. Never pass these links to open_gis_file: list every format the user needs in formats, in this one call. TerraLab reads the file or link to answer and keeps no copy. ## Call it over HTTP The same tool is also callable over HTTP with an [API key](https://terra-lab.ai/docs/authentication): `POST https://mcp.terra-lab.ai/v1/tools/join_by_location` with the arguments as the JSON body. ```bash curl -X POST https://mcp.terra-lab.ai/v1/tools/join_by_location \ -H "Authorization: Bearer $TERRALAB_API_KEY" \ -H "Content-Type: application/json" \ -d '{"url":"https://mcp.terra-lab.ai/dl/geojson/TOKEN/pois.geojson","with_url":"https://mcp.terra-lab.ai/dl/geojson/TOKEN/divisions.geojson","join_fields":["name"]}' ``` ```python import os import requests response = requests.post( "https://mcp.terra-lab.ai/v1/tools/join_by_location", headers={"Authorization": f"Bearer {os.environ['TERRALAB_API_KEY']}"}, json={ "url": "https://mcp.terra-lab.ai/dl/geojson/TOKEN/pois.geojson", "with_url": "https://mcp.terra-lab.ai/dl/geojson/TOKEN/divisions.geojson", "join_fields": ["name"], }, timeout=120, ) response.raise_for_status() print(response.json()["structuredContent"]) ``` ```javascript const response = await fetch('https://mcp.terra-lab.ai/v1/tools/join_by_location', { method: 'POST', headers: { Authorization: `Bearer ${process.env.TERRALAB_API_KEY}`, 'Content-Type': 'application/json', }, body: JSON.stringify({ "url": "https://mcp.terra-lab.ai/dl/geojson/TOKEN/pois.geojson", "with_url": "https://mcp.terra-lab.ai/dl/geojson/TOKEN/divisions.geojson", "join_fields": [ "name" ] }), }); const data = await response.json(); console.log(data.structuredContent); ``` Source: https://terra-lab.ai/docs/mcp/tools/join_by_location · Updated 2026-11-24 --- # Filter features by attribute > Index of the TerraLab docs for agents: [llms.txt](https://terra-lab.ai/docs/llms.txt). Every docs page is also served as markdown: add .md to its URL. Only the features of a layer whose attributes meet conditions, such as roads of class primary or buildings higher than 10 m. | | | | --- | --- | | MCP tool | `filter_by_attribute` on `https://mcp.terra-lab.ai/mcp` | | Group | Layer operations | ## Use it Connect the [MCP server](https://terra-lab.ai/docs/mcp) to your assistant and ask in plain words: the assistant picks `filter_by_attribute` when the request fits and fills the arguments below. These are valid arguments: ```json {"url":"https://mcp.terra-lab.ai/dl/geojson/TOKEN/roads.geojson","where":[{"field":"class","op":"in","value":["primary","secondary"]}]} ``` ## Parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `file` | object | No | A file uploaded in the conversation (GeoJSON, KML, KMZ, GPX, zipped Shapefile, GeoParquet, FlatGeobuf, GeoPackage, CSV or WKT). | | `file.download_url` | string | Yes | | | `file.file_id` | string | Yes | | | `file.file_name` | string | No | | | `file.mime_type` | string | No | | | `url` | string | No | A public http(s) link to the features, or a TerraLab download link from an earlier answer. | | `geojson` | object | No | The features as a GeoJSON FeatureCollection, Feature or geometry in WGS 84 (longitude, latitude). | | `where` | array of object | Yes | The conditions, each {field, op, value}. A missing field equals null. Text that writes a number plainly ("12", "12.5") compares as a number; other text compares without case, and never orders against a number. | | `match` | string | No | Keep the features that meet all conditions (default) or any of them. One of `"all"`, `"any"`. | | `formats` | array of string | No | Download formats. All five by default. | | `title` | string | No | Name for the map and the output files. | ## 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. ```json { "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](https://terra-lab.ai/docs/errors). ## Description for agents The text the server gives an agent to decide when to call this tool: > Use this when the user wants only the features of a layer (an uploaded file, a link, inline GeoJSON or a TerraLab download link) whose attributes meet conditions: roads of class primary, buildings higher than 10 m, places whose name contains a word. Each condition is a field, an operator (= != > >= < <= in contains) and a value; match says whether all (default) or any must hold. Text that writes a number plainly compares as a number, other text without case. Up to 20,000 features. Returns the count kept, sample rows, a map and GeoJSON, KML, Shapefile zip, GeoPackage and CSV downloads. Never use the user's current location unless they type it. Download links build their file when opened; no file is saved. The user opens the file in QGIS or any GIS: this server cannot load it into the user's own QGIS or any app on their computer. Never pass these links to open_gis_file: list every format the user needs in formats, in this one call. TerraLab reads the file or link to answer and keeps no copy. ## Call it over HTTP The same tool is also callable over HTTP with an [API key](https://terra-lab.ai/docs/authentication): `POST https://mcp.terra-lab.ai/v1/tools/filter_by_attribute` with the arguments as the JSON body. ```bash curl -X POST https://mcp.terra-lab.ai/v1/tools/filter_by_attribute \ -H "Authorization: Bearer $TERRALAB_API_KEY" \ -H "Content-Type: application/json" \ -d '{"url":"https://mcp.terra-lab.ai/dl/geojson/TOKEN/roads.geojson","where":[{"field":"class","op":"in","value":["primary","secondary"]}]}' ``` ```python import os import requests response = requests.post( "https://mcp.terra-lab.ai/v1/tools/filter_by_attribute", headers={"Authorization": f"Bearer {os.environ['TERRALAB_API_KEY']}"}, json={ "url": "https://mcp.terra-lab.ai/dl/geojson/TOKEN/roads.geojson", "where": [{ "field": "class", "op": "in", "value": ["primary", "secondary"], }], }, timeout=120, ) response.raise_for_status() print(response.json()["structuredContent"]) ``` ```javascript const response = await fetch('https://mcp.terra-lab.ai/v1/tools/filter_by_attribute', { method: 'POST', headers: { Authorization: `Bearer ${process.env.TERRALAB_API_KEY}`, 'Content-Type': 'application/json', }, body: JSON.stringify({ "url": "https://mcp.terra-lab.ai/dl/geojson/TOKEN/roads.geojson", "where": [ { "field": "class", "op": "in", "value": [ "primary", "secondary" ] } ] }), }); const data = await response.json(); console.log(data.structuredContent); ``` Source: https://terra-lab.ai/docs/mcp/tools/filter_by_attribute · Updated 2026-11-24 --- # Pricing and free calls > Index of the TerraLab docs for agents: [llms.txt](https://terra-lab.ai/docs/llms.txt). Every docs page is also served as markdown: add .md to its URL. Pay only for what you use. The MCP server and the REST API share one grid and one balance per account. | What | Price | | --- | --- | | Calls included every month | 100, at no cost | | Calls after that | 5 per 1,000 calls | | Satellite image | Counts as 10 calls (0.05 at most) | Amounts are the same figure in EUR and USD, excluding VAT. EUR applies where VAT is added (the European Union), USD elsewhere. ## How it works - The included calls reset on the 1st of each month at 00:00 UTC. - Past them, each call is taken from your prepaid balance. A satellite image counts as 10 calls: it uses the included calls first, then the call price. - Top up from [Dashboard, MCP](https://terra-lab.ai/dashboard/mcp) by card: 10, 25, 50, 100. The balance does not expire. - No subscription and no commitment. Within 14 days of a top-up, you can withdraw from it and get back what is left unused. - A call that fails or finds nothing is given back. A call refused for invalid input is counted. ## Read the grid from code The same grid as JSON, with no key needed: ```bash curl https://mcp.terra-lab.ai/v1/meta/pricing ``` Your own usage and balance come from [`GET /v1/me`](https://terra-lab.ai/docs/mcp/tools#account-and-discovery). ## The QGIS plugins The plugins are sold as monthly or yearly plans, separate from the API balance: | Plugin | Free every month | Pro every month | | --- | --- | --- | | AI Agent | 5 tasks | 200 tasks | | AI Segmentation | 1.5 km² (Automatic) and 20 cloud objects (Semi-Auto) | 50 km² (Automatic) and 500 cloud objects (Semi-Auto) | | AI Edit | 3 images | 100 images | Prices in your currency are on the [pricing page](https://terra-lab.ai/pricing). Trials, invoices and cancellation: [Account, plans and billing](https://terra-lab.ai/docs/plugins/account). Source: https://terra-lab.ai/docs/pricing · Updated 2026-11-23 --- # Errors and rate limits > Index of the TerraLab docs for agents: [llms.txt](https://terra-lab.ai/docs/llms.txt). Every docs page is also served as markdown: add .md to its URL. This page covers the MCP server and the REST API. For a message shown by a QGIS plugin, see [Plugin troubleshooting](https://terra-lab.ai/docs/plugins/troubleshooting). Errors come as JSON with a stable `error` code and a `message` written for a person: ```json { "error": "auth_required", "message": "This tool needs a TerraLab account. Connect TerraLab in your assistant's settings; see https://terra-lab.ai/mcp." } ``` Branch on `error`, never on `message`: the wording can change. ## HTTP errors | Status | `error` | Meaning | What to do | | --- | --- | --- | --- | | 400 | `invalid_input` | The body is not a JSON object of the tool arguments. | Fix the request body. | | 400 | `bad_request` | The request could not be read. | Check the JSON and the headers. | | 401 | `auth_required` | No key or token was sent. | Send `Authorization: Bearer `. | | 401 | `invalid_token` | The key or token is invalid, revoked or expired. | Create a new key, or let the agent sign in again. | | 401 | `access_revoked` | The app was disconnected from the dashboard. | Reconnect the agent. | | 402 | `balance_required` | The free calls of the month are used, or the operation is paid, and the balance is empty. | Add funds; the answer carries `hint` and `account_url`. | | 404 | `not_found` | There is no such API path. | Check the URL. | | 404 | `unknown_tool` | No tool has that name. | List tools with `GET /v1/tools`. | | 405 | `method_not_allowed` | Tools are called with `POST`. | Use `POST`. | | 413 | `too_large` | The request body is too large. | Send a smaller file or fewer features. | | 429 | `rate_limited` | Too many requests in the last minute. | Wait for `Retry-After` seconds, then retry. | | 429 | `daily_limit` | The account reached its daily safety ceiling, or a ChatGPT user reached 200 calls today. | Retry the next day (UTC) or write to support. | | 503 | `unavailable` | The account service did not answer. | Retry after `Retry-After` seconds. | ## Tool errors A tool that runs but cannot answer returns `200` with `isError: true`. Its `structuredContent` then carries `code`, `message` and, most of the time, a `hint` saying what to change: a place it could not find, an area too large, a country it does not cover. ```json { "structuredContent": { "code": "...", "message": "...", "hint": "..." }, "content": [{ "type": "text", "text": "..." }], "isError": true } ``` ## Monthly quota exceeded The MCP server and the API include 100 calls every month, renewed on the 1st at 00:00 UTC. Once that quota is used, each call is paid from your prepaid balance. When the free calls are exceeded and the balance is empty, the API answers `402` with the error `balance_required`, plus a `hint` and an `account_url`. Top up from [Dashboard, MCP](https://terra-lab.ai/dashboard/mcp) and retry; prices are on [Pricing and free calls](https://terra-lab.ai/docs/pricing). The `429` errors are a different limit: `rate_limited` caps calls per minute and `daily_limit` is a daily safety ceiling. For the monthly limits of the QGIS plugins, see [Account, plans and billing](https://terra-lab.ai/docs/plugins/account). ## What is counted A call that fails or finds nothing is given back: the included call or the amount taken from the balance returns to the account. A call refused for invalid input (`invalid_input`) is counted, so fix the arguments before you retry. ## Rate limits Every account can make 60 calls a minute. Past it, the API answers `429` with `Retry-After: 60`. Spread batch jobs over time, and retry with a growing delay: ```python import time import requests def call(url, headers, body, attempts=5): for attempt in range(attempts): response = requests.post(url, headers=headers, json=body, timeout=120) if response.status_code not in (429, 503): return response time.sleep(int(response.headers.get("Retry-After", 2 ** attempt))) return response ``` Retry only `429` and `503`. A `401` or `402` will not pass on a second try. Source: https://terra-lab.ai/docs/errors · Updated 2026-11-23 --- # Data sources and licences > Index of the TerraLab docs for agents: [llms.txt](https://terra-lab.ai/docs/llms.txt). Every docs page is also served as markdown: add .md to its URL. TerraLab serves open data. Every result lists its `sources` with their licence, and every file you download keeps that licence and its attribution. You pay for the service, never for the data. ## Main sources | Source | Used for | Licence | | --- | --- | --- | | OpenStreetMap | Roads, places, waterways, land use, transit, routes and travel-time areas | ODbL 1.0 | | Overture Maps | Buildings, places, addresses and boundaries | ODbL or CDLA Permissive 2.0, by theme | | Copernicus DEM | Elevation, profiles and contour lines, worldwide at 30 m | Copernicus DEM licence, free with attribution | | Copernicus Sentinel-2 | Satellite images worldwide at 10 m | Copernicus data, free with attribution | | IGN and DGFiP | French addresses, cadastral parcels, urban plan zones, building heights and aerial photos | Licence Ouverte 2.0 | | GHS-POP 2025 (European Commission, JRC) | Population estimates, 100 m grid | CC BY 4.0 | | ForTy 2020 (Google DeepMind, Google Research, WRI, IIASA) | Forest type at 10 m | CC BY 4.0, modified by TerraLab (clip, reprojection) | | Géorisques, BRGM, ASNR | French natural risks: flood zones, clay, radon, seismic zoning, cavities | Licence Ouverte 2.0 | | JRC global river flood hazard | Flood depth outside France | CC BY 4.0 | Hosted datasets from the TerraLab catalogue ([find_datasets](https://terra-lab.ai/docs/mcp/tools/find_datasets), [extract_dataset](https://terra-lab.ai/docs/mcp/tools/extract_dataset)) each keep their own licence, quoted with them. The full list of licences and the attribution to show is on [Data licences](https://terra-lab.ai/legal/api-terms). ## Attribution When you publish a map or a dataset built from a TerraLab result, show the credits from its `sources`. For OpenStreetMap data, that is "© OpenStreetMap contributors"; ODbL also asks that a database you share stays under ODbL. ## Limits - Up to 20,000 features per extract, about 1 km around a town centre. - Elevation at 30 m; contour areas up to about 10 × 10 km. - Files up to 50 MB for a zipped Shapefile or KMZ, 20 MB for GeoJSON, 10 MB for KML and GPX; lists up to 100 addresses. - Parcels, zoning, building heights and IGN photos: France only. - Routes through 25 places; travel areas up to 120 min or 200 km. - Satellite images up to 20 × 20 km at 10 m. - Approximate: not for navigation, surveying or legal boundaries. Each page of [MCP tools](https://terra-lab.ai/docs/mcp/tools) gives the exact range of every parameter. ## Privacy - Only what the request needs is sent: a place, an area or a file. - Logs keep the tool, its status and duration, never your question. The requested area is kept 30 days, with no user identifier. - Files are processed in memory, never stored. - Never sold, never used to train AI. Read the [privacy policy](https://terra-lab.ai/privacy-policy) and the [API terms](https://terra-lab.ai/legal/api-terms). Source: https://terra-lab.ai/docs/data-sources · Updated 2026-11-23 --- # Free GIS web tools > Index of the TerraLab docs for agents: [llms.txt](https://terra-lab.ai/docs/llms.txt). Every docs page is also served as markdown: add .md to its URL. TerraLab runs free GIS tools on [terra-lab.ai/tools](https://terra-lab.ai/tools). They need no account and no install, and every result downloads in a standard GIS format that opens in QGIS, ArcGIS or Google Earth. Nothing is counted against your plugin or API allowance. ## Where your data goes - **In your browser only**: the format converters, the file viewers, the coordinate and MGRS converters, the ogr2ogr command builder, draw on a map, photo to map, sun position and magnetic declination. Your files and coordinates never reach our servers. - **On our servers**: building footprints, building heights, elevation, contour lines, slope, isochrones and the township range finder send the area or point you choose, never a file. The building tools do not store requests, and their cached answers expire within 7 days. ## Convert and view files | Tool | What it does | | --- | --- | | [Format converters](https://terra-lab.ai/tools) | KML, KMZ, CSV, GeoJSON, GPX, Shapefile and Excel converted to one another, and to DXF, in the browser. Files up to 250 MB. | | [GPX viewer](https://terra-lab.ai/tools/gpx-viewer) | A GPX track on a map with its length, ascent, elevation profile and waypoints. | | [KML and KMZ viewer](https://terra-lab.ai/tools/kml-viewer) | A Google Earth file on a map with its placemarks and attribute table. | | [GeoJSON viewer](https://terra-lab.ai/tools/geojson-viewer) | A GeoJSON on a map with its features, attribute table and bounding box. | | [Shapefile viewer](https://terra-lab.ai/tools/shapefile-viewer) | A zipped Shapefile on a map with its attribute table and coordinate system. | | [DXF viewer](https://terra-lab.ai/tools/dxf-viewer) | A DXF drawing with its layers and units, placed on a map in a coordinate system you choose. | | [ogr2ogr command builder](https://terra-lab.ai/tools/ogr2ogr-command-builder) | The GDAL `ogr2ogr` command to convert, reproject, filter or clip a file, for bash, PowerShell or cmd. | ## Coordinates and places | Tool | What it does | | --- | --- | | [Coordinate converter](https://terra-lab.ai/tools/coordinate-converter) | Points between WGS 84, UTM, MGRS, Lambert 93, national grids and EPSG systems, one at a time or a file up to 5 MB and 5,000 lines. | | [MGRS converter](https://terra-lab.ai/tools/mgrs-converter) | Military grid references to latitude and longitude and back. | | [GPS coordinates finder](https://terra-lab.ai/tools/gps-coordinates) | The coordinates of an address or a map point in decimal, DMS, UTM, MGRS and more, with the nearest address and elevation. Up to 100 points. | | [UTM zone map](https://terra-lab.ai/tools/utm-zone-map) | The UTM zone, central meridian and EPSG codes of any place. | | [Photo to map](https://terra-lab.ai/tools/photo-to-map) | Where photos were taken, read from their GPS data (JPEG, HEIC, PNG, TIFF, DNG). Up to 2,000 photos, nothing uploaded. | | [Township range finder](https://terra-lab.ai/tools/township-range-finder) | The US PLSS section, township and range of an address or point, and lists of up to 500 points. | ## Terrain | Tool | What it does | | --- | --- | | [Elevation finder](https://terra-lab.ai/tools/elevation-finder) | Elevation of any point in metres and feet, and the profile of a drawn line or a GPX or KML track up to 500 km. | | [Contour lines generator](https://terra-lab.ai/tools/contour-lines) | Contour lines every 1 to 500 m for an area up to 400 km², from the Copernicus 30 m DEM, as GeoJSON, Shapefile or KML. | | [Slope map generator](https://terra-lab.ai/tools/slope-map) | Slope classes, mean and steepest slope of an area up to 400 km², as GeoTIFF or CSV. | | [Sun position and sun path](https://terra-lab.ai/tools/sun-position) | Sun elevation and azimuth, sunrise, sunset and shadow length for any place and date. | | [Magnetic declination](https://terra-lab.ai/tools/magnetic-declination) | The magnetic declination of any place and date, from the World Magnetic Model 2025. | ## Buildings, access and sites | Tool | What it does | | --- | --- | | [Building footprints](https://terra-lab.ai/tools/building-footprints) | Building outlines from Overture, OpenStreetMap and other open sources for an area up to 25 km², as GeoJSON. | | [Isochrone map](https://terra-lab.ai/tools/isochrone-map) | The area reachable by car, bike or on foot in 1 to 60 minutes from up to 5 points, as GeoJSON, KML, Shapefile or PNG. | | [Site analysis map](https://terra-lab.ai/tools/site-analysis) | One map of a site with sun paths, contours, slope, buildings and a walking or driving area. | | [Building heights (France)](https://terra-lab.ai/fr/tools/building-height) | Height, floors and use of the buildings of a French area, from IGN BD TOPO. | | [Cadastral parcel finder (France)](https://terra-lab.ai/fr/tools/cadastral-parcel) | A French parcel from an address, a reference or a click, with its area and urban plan zone. | ## Measure and draw | Tool | What it does | | --- | --- | | [Map area calculator](https://terra-lab.ai/tools/area-calculator) | Draw shapes on aerial imagery and read their area in m², hectares and acres. Up to 200 shapes. | | [Distance calculator](https://terra-lab.ai/tools/distance-calculator) | Straight-line distance between places or along a path of up to 200 points. | | [Radius map](https://terra-lab.ai/tools/radius-map) | Circles of any radius around addresses or points, with rings, as KML, GeoJSON, Shapefile or GPX. | | [Draw on a map](https://terra-lab.ai/tools/draw-on-map) | Draw points, lines and areas, open KML, GeoJSON, Shapefile, GPX or CSV, and download them again. | | [KML creator](https://terra-lab.ai/tools/kml-creator) | Build a KML from points and shapes you place. | | [KML circle generator](https://terra-lab.ai/tools/kml-circle-generator) | A circle of a given radius as a KML. | | [Deed plotter](https://terra-lab.ai/tools/deed-plotter) | Plot a metes and bounds description and check its closure. A drawing aid, not a survey. | | [True size map](https://terra-lab.ai/tools/true-size-map) | Drag a country across the map to compare its real size with others. | ## Use them from an agent The same tools are available to AI agents in two ways: - An agent running in your browser on terra-lab.ai can call them directly through [WebMCP](https://terra-lab.ai/docs/webmcp). - The [MCP server](https://terra-lab.ai/docs/mcp) offers the same jobs, and more, to Claude, ChatGPT or Cursor on your TerraLab account, and your code can call the same [tools](https://terra-lab.ai/docs/mcp/tools) over HTTP. Results come from open data and are approximate: never use them for navigation, surveying or legal boundaries. Sources and licences: [Data sources and licences](https://terra-lab.ai/docs/data-sources). Source: https://terra-lab.ai/docs/free-tools · Updated 2026-11-23 --- # Support > Index of the TerraLab docs for agents: [llms.txt](https://terra-lab.ai/docs/llms.txt). Every docs page is also served as markdown: add .md to its URL. Write to [yvann.barbot@terra-lab.ai](mailto:yvann.barbot@terra-lab.ai). The founders read every message and answer within 2 working days. ## What to include For a QGIS plugin: - The plugin and its version, your QGIS version and your system (Windows, macOS or Linux). - The message you saw, ideally a screenshot, and what you were doing. - **Report a problem** in AI Segmentation and AI Edit, or **Send feedback** in AI Agent, attaches the logs for you. Many problems have a fix in [Plugin troubleshooting](https://terra-lab.ai/docs/plugins/troubleshooting). For the API or the MCP server: - What you called: the tool name, or the agent and your question. - The request body, without your API key. - The answer you got: status code, `error` code and `message`, or the `structuredContent.code` of a tool error. - The time of the call, with its time zone. Never send an API key by email. If one leaked, revoke it on [Dashboard, MCP](https://terra-lab.ai/dashboard/mcp) and create a new one. ## A wrong or missing result Data comes from open sources and can be wrong or incomplete. Tell us the place and what you expected: we check the source and fix what is ours. To ask for a dataset TerraLab does not have yet, call [request_data](https://terra-lab.ai/docs/mcp/tools/request_data) or write to us. ## Other pages - [Errors and rate limits](https://terra-lab.ai/docs/errors) explains every error code. - [Account, plans and billing](https://terra-lab.ai/docs/plugins/account) covers plans, invoices, cancellation and your data. - The [support page](https://terra-lab.ai/support) has more answers on accounts and the QGIS plugins. - The [API terms](https://terra-lab.ai/legal/api-terms) and the [acceptable use policy](https://terra-lab.ai/terms) set the rules of use. Source: https://terra-lab.ai/docs/support · Updated 2026-11-23 --- # Changelog > Index of the TerraLab docs for agents: [llms.txt](https://terra-lab.ai/docs/llms.txt). Every docs page is also served as markdown: add .md to its URL. Changes to the QGIS plugins, the MCP server and the REST API, newest first. ## QGIS plugins Plugin releases ship through the official QGIS plugin repository; QGIS lists them under **Plugins**, **Manage and Install Plugins**, **Upgradeable**. Each plugin's full notes are on its page at plugins.qgis.org. ### AI Agent 2.0.3 and 2.0.4, 2026-11-19 - A new Settings window: interface language, response style, typing suggestions, notifications and sounds, keyboard shortcuts, and tutorials under Learn. - Word reports with headings, text, pictures and tables, and print layouts in every QGIS paper size. - Unsaved edits and memory layers come back after QGIS closes during a run. - The permission level you pick is kept across restarts and new chats. ### AI Agent 2.0.2, 2026-11-17 - Grey typing suggestions in the message box, taken with `Tab`. - Pasted links, coordinates and geometries become cards; `@` picks layers and data sources. - One **Help improve AI Agent** switch for statistics and chat review. - `Esc` twice stops a run. ### AI Agent 2.0.0, 2026-11-12 - Voice dictation in the message box (`Ctrl+Shift+D`). - A **Memory** page on every plan, to see, edit and clear what the agent keeps for a project. - Effort is picked on a slider that starts at Low on every chat. ### AI Agent 1.9.5, 2026-11-10 - An opened step links to the QGIS window where its work can be checked. - On Windows the sign-in key is sealed for your Windows user. ### AI Segmentation 3.6.0, 2026-10-16 - Land cover mapping moved to AI Agent; AI Segmentation focuses on finding objects. ### AI Segmentation 3.5.0, 2026-10-11 - Objects found by an AI Agent run wait in the review step before they are saved. - An image with no position on the map points you to the Georeferencer. ### AI Segmentation 3.4.0, 2026-10-08 - The browser hands the sign-in back to QGIS on its own. - Automatic corrects a typo in the object you type, and stops on a drawn map such as OpenStreetMap, which is not imagery. ### AI Edit 1.15.0 and 1.15.1, 2026-10-11 - The allowance is counted in images, for example "37 of 100 images left this month". - On Windows the sign-in key is stored encrypted even without a QGIS master password. ### AI Edit 1.14.0, 2026-10-08 - The browser hands the sign-in back to QGIS, or you type a short code. ### AI Edit 1.13.0, 2026-10-07 - Choose Detailed (2K) or Maximum (4K), with the ground resolution shown before you generate. - Saved GeoTIFFs get neutral names (`ai_edit__v.tif`) and never carry your prompt. - Choose how long edit history is kept. ## MCP server and REST API Additive changes keep older clients working; anything that breaks a client is announced here first. ### Versioning and deprecation The API version is in the path. Within `/v1`, changes are additive only: new endpoints, new optional parameters and new response fields. A change that would break a client ships under a new path version (`/v2`) while `/v1` keeps working. An endpoint that will be removed is announced on this page at least 6 months ahead. During that period its responses carry a `Deprecation` header (RFC 9745) and a `Sunset` header (RFC 8594) with the removal date. No endpoint of `/v1` is deprecated today. ### 2026-11-23 - New tool: `search_docs` searches the TerraLab docs, blog guides and product pages by meaning, in any language, and returns quoted extracts with their links. It is free and never counts against your calls. Claude and other agents now list 19 tools. ### 2026-11-20 - `extract_dataset` answers an area too large for a vector dataset with `split_bboxes`, the smaller areas to request instead. ### 2026-11-18 - `get_elevation` draws contour lines again for areas of about 80 to 105 km². ### 2026-11-16 - Each caller can read up to 30 raster windows a minute across `extract_dataset` and `zonal_statistics`; a refusal says how many seconds to wait. ### 2026-11-15 - The API reference documents all 41 tools, including the layer operations, `get_satellite_index`, `zonal_statistics`, `get_travel_times`, `french_parcels_in_area`, `inspect_dataset` and `aggregate_dataset`. ### 2026-11-14 - Agents without a browser can connect with a link and a 6-digit code the person types on terra-lab.ai: see [agent registration](https://terra-lab.ai/docs/authentication). - `GET https://terra-lab.ai/oauth/userinfo` tells an agent the calls left this month and the balance of the account it acts for. - Disconnecting an app from the dashboard, or revoking its token, cuts its access to the MCP server and the REST API within about a minute; the answer is `401 access_revoked`. - Every REST answer carries `RateLimit` and `RateLimit-Policy` headers; every `429` and `503` carries `Retry-After`. - The [OpenAPI document](https://mcp.terra-lab.ai/v1/openapi.json) describes every error answer with one named `Error` schema. ### 2026-11-13 - New tools: `inspect_dataset` describes a public cloud GeoParquet from its footer, and `aggregate_dataset` counts, sums or averages one for a place or per zone without downloading it. ### 2026-11-12 - Claude and other agents are listed 18 tools. `get_route`, `get_travel_times`, `get_satellite_index`, `french_parcels_in_area`, `zonal_statistics` and `get_forest_type` are left out of their list and stay callable by name; ChatGPT still lists them. See [Connect an agent](https://terra-lab.ai/docs/mcp#tools). - `extract_open_data` returns a small extract inline, in a `features` field of the answer (up to 50 features and 60 KB), next to the download links. ### 2026-11-11 - New tool: `zonal_statistics`, a raster summarised per polygon (population, land cover or elevation per district). - Five more layer operations: `count_in_polygons`, `find_nearest_features`, `select_by_location`, `join_by_location` and `filter_by_attribute`. - A call whose client left stops and is given back. ### 2026-10-30 - New tool: `get_travel_times`, distances and travel times from up to 25 origins to up to 25 destinations in one call. ### 2026-10-28 - Every page of terra-lab.ai registers [WebMCP tools](https://terra-lab.ai/docs/webmcp) for agents running in the browser, including the Data API tools on the signed-in visitor's account. ### 2026-10-27 - New tools: `get_satellite_index` (Sentinel-2 NDVI, NDWI, NBR or NDBI for a date, or their change between two dates) and `french_parcels_in_area` (every French parcel in an area, with its urban plan zone). - A satellite image counts as 10 calls: it uses the included calls first, then the call price (0.05 at most). - Single-operation tools for ChatGPT, one per operation of `measure` and `process_geometry`: `measure_distance`, `measure_area`, `circle_around_place`, `buffer_features`, `dissolve_features`, `intersect_layers`, `erase_with_layer`, `clip_features`, `simplify_features`, `feature_centroids` and `add_area_and_length`. - Developer documentation published at [terra-lab.ai/docs](https://terra-lab.ai/docs), with a markdown copy of every page and [/docs/llms.txt](https://terra-lab.ai/docs/llms.txt). - Tool descriptions state the `radius_m` limits of `get_satellite_image`, so agents get a valid call on the first try. - `HEAD` works on `/v1/openapi.json` and `/v1/meta/pricing`, for link checkers. ### 2026-10-26 - Out of free calls or balance, the `402` answer points to the account page in `account_url`. ### 2026-10-25 - New price grid: 100 calls included every month, then 5 per 1,000 calls and 0.05 per satellite image, from a prepaid balance. No subscription. See [Pricing](https://terra-lab.ai/docs/pricing). - A call that fails or finds nothing is no longer counted. A call refused for invalid input still counts. - `GET /v1/me` returns the exact balance in `balance.micros`. - `GET /v1/meta/pricing` publishes the grid as JSON. - `get_natural_risks` reads a weekly mirror of the Géorisques files. ### 2026-10-24 - TerraLab accounts on the MCP server, with OAuth 2.1 sign-in for agents and `tlk_` API keys for code. - REST API at `https://mcp.terra-lab.ai/v1`, with an [OpenAPI 3.1 document](https://mcp.terra-lab.ai/v1/openapi.json). - New tools: `find_datasets`, `extract_dataset`, `request_data`, `estimate_population`, `get_forest_type` and `get_natural_risks`. - Sentinel-2 images are cached 90 days by area, scene and rendering. ### 2026-10-23 - New tools: `get_route`, `get_travel_area`, `process_geometry` and `get_satellite_image`. - `extract_open_data` accepts `geopackage` as a format. ### 2026-10-19 - TerraLab app live in ChatGPT. - `get_elevation` area mode returns DEM, hillshade and slope GeoTIFFs for any area. - Every open data extract also offers a GeoPackage. Source: https://terra-lab.ai/docs/changelog · Updated 2026-11-23