Geospatial MCP server for AI assistants
Connect an AI assistant to your Sarkoa organization to query a GeoJSON layer, read a raster value at a point or build a map from your files. Use Sarkoa sign-in when your client offers the OAuth connection, or supply an organization API key in a client that supports Bearer headers.
Depending on the key scopes, your permissions and your plan, agents can work with your library: organizing and uploading files, authoring and styling custom maps, preparing them for print, running time series, leaving and resolving review comments, registering webhooks, and querying your vector layers and raster catalogue directly. That last part is the one people underestimate. An agent that can call query_features answers questions about your data instead of only drawing it.
Follow the agentic GIS field guide to take two matching inspection records from a query to a map a field team can open.
Set up
- Add Sarkoa as a remote MCP server in your AI app using the URL below.
- If the client offers Sarkoa sign-in, follow that flow. For API-key setup, create a key under Profile → API & Integrations and configure it in the client. Choose scopes for the tasks you want the assistant to perform. See Authentication.
Server URL: https://mcp.sarkoa.com/mcp
Claude Code
Add the remote HTTP server with the CLI:
claude mcp add --transport http sarkoa https://mcp.sarkoa.com/mcp --header "Authorization: Bearer YOUR_API_TOKEN"
See Claude Code's MCP setup for configuration scopes and secret handling.
Claude Desktop and Claude on the web
Add a custom connector in Claude's connector settings using the server URL above. For API-key authentication, configure a request header named Authorization with value Bearer YOUR_API_TOKEN. Use OAuth only when that connector offers a configured Sarkoa sign-in flow. Remote connectors use this UI; the local-server claude_desktop_config.json setup is a different mechanism. See Claude's remote connector instructions for availability and current settings.
Cursor
Add this to your MCP settings (mcp.json):
{
"mcpServers": {
"sarkoa": {
"url": "https://mcp.sarkoa.com/mcp",
"headers": {
"Authorization": "Bearer YOUR_API_TOKEN"
}
}
}
}
Confirm it works
Ask the agent to run whoami, then list_files. You should see your account and the files in your organization.
Try a read-only query on three inspection sites
Download the fictional inspection sites GeoJSON. In your Sarkoa organization, open Files, upload the sample and wait for processing to finish. Connect your assistant to that same organization and ask:
In inspection-sites.geojson, which sites have status “review”? Give me each site’s name and inspection count.
The assistant can use query_features to filter status by equality with review, request the name and inspection_count fields, and omit geometry. The sample returns West demonstration site (12) and East demonstration site (5). The third site, Central, has status ready. Open the finished inspection map and select a marker to check its attributes.
This query reads an original GeoJSON FeatureCollection up to 32 MiB. For a larger file, filter or split the source before uploading. See feature query limits.
Ask an AI assistant for elevation at a coordinate
Download the fictional elevation GeoTIFF, upload it in Files, and connect your assistant to the same organization. This grid stores invented elevations in metres near Ottawa.
In tutorial-elevation, read band 1 at longitude −75.707875, latitude 45.427875. Give the stored value and unit. Then check longitude −75.718875, latitude 45.438875. Report any missing reading explicitly.
With sample_raster, the first coordinate returns 109 m. The second lies inside the raster footprint and returns status nodata with a null value. The source uses −9999 as its missing-data marker. Reporting zero or −9999 m would change the meaning of the result.
Open the downloaded raster in QGIS and use Identify Features at the same WGS 84 coordinates to check band 1. Alternatively run gdallocationinfo -wgs84 -valonly tutorial-elevation.tif -75.707875 45.427875. It prints 109. At the second point it prints the source marker. For a vector example, try the three inspection sites above. Raster values at a point
Calculate mean elevation inside a polygon with an AI assistant
A point sample answers “how high is this location?” For an area such as a field or survey boundary, ask for zonal statistics. Try the fictional elevation GeoTIFF and northwest boundary (GeoJSON). The boundary overlaps a patch of missing elevation. Treating it as zero would pull the mean down.
- Upload the GeoTIFF to Files and wait until it is ready. Give your connected assistant the boundary file or its polygon coordinates. Once the upload finishes, a read-only key is sufficient for this query.
- Ask: “For band 1 of tutorial-elevation, calculate mean elevation inside this boundary. Use pixel centres. Report the valid count, the number excluded as NoData, the range, and whether an overview was used.”
- The assistant can inspect the raster, then call
zonal_statswith the polygon in longitude, latitude order,bands: [1]andall_touched: false. For this sample the hosted result was 102 m. Of 962 pixel centres inside, 715 had values and 247 were NoData. The valid values ranged from 101 to 103 m. The response reportedapproximate: false.
Cross-check in QGIS. Open the original GeoTIFF and boundary. In the Processing Toolbox, run Zonal statistics with the boundary as the polygon layer and elevation band 1 as the raster. Select Count, Mean, Minimum and Maximum. Open the output attribute table. The original grid gave 768 valid cells, mean 102 m, minimum 101 m, maximum 103 m. Sarkoa’s hosted grid was reprojected, so its cell centres fall in different places. Report which grid and inclusion rule produced your count.
For a larger boundary, check approximate and the pixel size before quoting a result. A coarser overview can change the mean and count. If a minimum level of detail matters, set min_resolution to the coarsest pixel size you will accept, in metres. Treat an area with zero valid cells as missing data.
Official MCP Registry
Sarkoa is published as com.sarkoa/mcp on the official MCP Registry. Clients and directories that ingest the registry can discover the same Streamable HTTP endpoint and Bearer API-key auth described above.
What agents can do
Tools are grouped below by what they act on. A Profile API key is bound to one organization.
For an OAuth connection, use whoami to inspect the available organization context and supply
organization_id when the tool asks you to choose one. A read-only key cannot perform write operations.
Identity and guidance
| Tool | What it does |
|---|---|
whoami |
Confirm the API key and show email, organization, scopes, and auth method |
guide |
Read the detailed rules for one subject, such as uploads, time series, raster styling or printing. Read-only |
Files and folders
| Tool | What it does |
|---|---|
list_files |
List files and folders in one location (parent_id optional; library root if omitted) |
list_folders |
List all folders (id, name, parent) so you can pick a destination |
create_folder |
Create a folder (parent_id optional) |
move_file |
Move a file or folder (folder_ref, or root=true for the library root) |
rename_file |
Change a file or folder's display name. The stored object is untouched |
get_file_status |
Show status and details for one file, including viewUrl, the link that opens it in the Sarkoa web viewer. (get_view_url, which returned the same link, is no longer listed but still answers clients that saved the older tool list) |
get_download_url |
Get a temporary link to download the original file |
delete_file |
Delete a file (the agent must confirm). A folder that still has contents also needs recursive=true |
retry_processing |
Requeue a file whose optimization failed. Call with dry_run=true first to read the failure report: a malformed source fails the same way again |
check_upload_quota |
Ask whether an upload of a given size would exceed the plan limit, before transferring the bytes |
inspect_asset |
Inspect fields, bands, statistics, and style options for a file before styling, including sizeChannel, strokeDashSupported and fillPatternSupported |
Uploads
| Tool | What it does |
|---|---|
upload_presign |
Start an upload and return where to send the file |
upload_part_url |
For large files: get the next upload chunk URL |
upload_complete |
Finish the upload so Sarkoa can optimize the file (optional parent_id to place it in a folder) |
Both upload_presign and upload_complete take replace_asset_id to replace an existing file's contents instead of adding a new file. See Replacing a file's contents. They also take celestial_body for a file on another world, and upload_complete takes source_crs. See Maps on other worlds.
Sharing
| Tool | What it does |
|---|---|
create_share_link |
Create a public /share/… link (optional expiry; password protection requires Essential+) |
list_shares |
List share records for a file |
revoke_share |
Revoke a share (the agent must confirm) |
Maps
| Tool | What it does |
|---|---|
list_maps |
List custom maps in your organization |
get_map |
Load a full map document (layers, styles, access, chrome) |
get_map_preview |
Return viewer and editor links for a map |
get_embed_code |
Return a ready-to-paste iframe plus the raw embed URL, and say so when the map is not public yet |
validate_map |
Check a map document without saving |
scaffold_map |
Build a ready-to-edit map document stub (does not save). Layers may include attribution_text / attribution_url. Optional preferred_map_mode (2d/3d), preferred_projection (mercator/globe) and celestial_body |
create_map |
Create a map from a full document, or a minimal title + layer list (same attribution and display fields as scaffold_map) |
replace_map |
Replace a map with a full desired-state document. Omission deletes: a per-layer key the document leaves out is removed |
update_map |
Apply typed map operations (add/update/remove layers, set styles, setView for display defaults, setAccess for who can open the map, setCompare for swipe and side-by-side compare, setCelestialBody to move an empty map to another world) |
clone_map |
Duplicate a map |
set_camera_path |
Add or replace a fly-through route (spec.cameraPaths) taken from a line layer on the map, with speed, height above ground, stops along the way and optional autoplay. It plays best with the map open in 3D with terrain |
remove_camera_path |
Remove one fly-through route from a map by its id |
set_tour |
Add or replace a keyframe tour (spec.tours): stops that are camera views with a title and short text, flight and hold times, and optionally the layers shown and the time slider's date at each. See Map tours |
remove_tour |
Remove one tour from a map by its id |
delete_map |
Delete a map (the agent must confirm) |
Styling a layer
| Tool | What it does |
|---|---|
classify_vector_style |
Build categorized class colours (distinct by default, or Category 10 / colour-blind-safe). Optional map_id + layer_id applies the style; shuffle recolours; patterns: "distinct" gives every class its own fill pattern (polygons). Keeps existing sizeBy, strokeDash, fillPattern and edgeBand |
set_layer_popup |
Choose which attributes a click shows, which is the heading, and up to two charts of the feature's own numbers. Without it, clicking a feature shows nothing |
set_layer_legend |
Set a vector or raster legend title and visibility. Vector class rows come from the vector style; raster-only fields such as units and endpoint labels are ignored with a warning on vector layers |
render_tile_preview |
Fetch one actual rendered raster tile as an image, to check a style instead of assuming it worked |
Basemap themes
| Tool | What it does |
|---|---|
list_basemap_features |
List supported base themes and editable feature IDs, types and paint properties. Pass group to narrow the results. Read this before creating overrides |
list_basemap_themes |
List your organization's saved themes and default theme. Apply a theme to a map with setBasemap and spec.basemap.customThemeId |
create_basemap_theme |
Save a named theme from base_theme and paint_overrides. Requires an owner or admin, Community or above, and maps:write. Up to 25 themes per organization |
update_basemap_theme |
Update a theme by theme_id. Paint overrides merge by default; null removes an override and replace_paint=true replaces all paint. Maps using the theme follow its changes |
delete_basemap_theme |
Delete a theme by theme_id with confirm=true. Maps fall back to its base theme, and an organization default pointing to it is cleared |
Map review
| Tool | What it does |
|---|---|
list_map_comments |
List review comments on a map, with open and resolved counts |
post_map_comment |
Post a comment anchored to a point, or reply to a thread (a reply inherits its parent's anchor) |
resolve_map_comment |
Mark a comment resolved, or reopen it |
delete_map_comment |
Delete a comment (the agent must confirm) |
Printing
| Tool | What it does |
|---|---|
preview_print_layout |
Lay out a printed sheet without saving it. Returns a composer link that carries the layout, plus a report and warnings on how the sheet came out. Needs only view access |
create_print_layout |
Save a named print layout and return its composer link with the same report and warnings. Needs edit access to the map |
list_print_layouts |
List a map's saved layouts, what its plan can print, and whether the key can save layouts |
get_print_layout |
One saved layout with its composer link and report, and the JSON to start an update from |
update_print_layout |
Rename a layout or replace its JSON (the whole of it, not a merge) |
delete_print_layout |
Delete a saved layout (the agent must confirm) |
export_print_layout |
Make the sheet (PDF or PNG) or its video on Sarkoa's servers, from a layout or a saved layout's id. Returns an export to check on |
get_print_export |
An export's state and, once the file is made, a download link that works for 15 minutes |
Public directory
These tools describe the listing workflow when Explore is enabled. Check current availability before relying on a public directory listing.
| Tool | What it does |
|---|---|
get_map_listing |
Read whether a map is listed in Explore, Sarkoa's public directory, and what listing it would take: its status, each check the map does not pass (with the layers involved), the terms and community guidelines to confirm, and the categories with a suggested one. Read-only |
set_map_listing |
List a map in Explore, or take it out with listed=false (the map itself is unchanged). Listing publishes the map in the directory and to search engines, so the agent calls it only when you ask, and confirm_guidelines carries your own answer. When the terms have changed, you accept them once in the map builder; an API key cannot accept them for you. A listed map appears at once; only a map with open reports waits for a moderator. Needs an owner, admin or editor of the organization and the maps:publish (or maps:write) scope |
Time series
| Tool | What it does |
|---|---|
list_series |
List time series with entry counts and time bounds |
create_series |
Create a series container to hold ordered frames. A name already in use returns that series instead, flagged series_reused with its frame count, and keeps its own render mode. Optional celestial_body for a series on another world |
series_append_presign |
Start adding one frame; returns a signed upload payload to PUT the bytes to |
list_series_entries |
List the frames in a series with timestamps, status, and format |
update_series_entry |
Change a frame's timing without re-uploading it |
series_health |
Check whether a series will actually animate, and why not |
sample_series |
Read a COG time series at one point or across one polygon. Choose a date range and follow nextCursor for more frames; each frame reports its own result or failure |
Asking questions of the data
| Tool | What it does |
|---|---|
query_features |
Filter a hosted vector layer by bounding box and attributes and get GeoJSON back, without downloading the file. See Feature query |
sample_raster |
Read the values a hosted raster stores at one point (lng, lat): every band, with nodata and transparent pixels named. See Raster values at a point |
zonal_stats |
Calculate count, mean, minimum, maximum, sum and standard deviation inside a WGS84 GeoJSON Polygon or MultiPolygon on a COG raster. Optional percentiles, histogram, bands or an expression |
stac_search |
Search the raster catalogue by bounding box, time range, and collection |
Webhooks
| Tool | What it does |
|---|---|
list_webhooks |
List endpoints and the event types available to subscribe to. Signing secrets are never returned |
create_webhook |
Register an HTTPS endpoint. Returns the signing secret exactly once, so surface it to the user immediately |
test_webhook |
Send a synthetic signed delivery now and report what the endpoint returned |
delete_webhook |
Remove an endpoint and its pending deliveries (the agent must confirm) |
Agents can also read sarkoa://files (file list), sarkoa://maps (map list), sarkoa://maps/{id} (one map), sarkoa://schemas/map/v1 (map document schema), sarkoa://schemas/map/v1/example (minimal valid document), and sarkoa://schemas/print/v1 (print layout schema).
Creating and styling maps
Maps use a versioned map document (sarkoa.com/maps/v1). A document describes the camera, basemap, access settings, and every layer style (fill, outline, categorized/graduated vector styles, raster palettes, popups, legends, and more). Layer titles you set appear in the layers panel; legend titles work for simple styles as well as categorized and graduated ones. Layer attribution_text / attribution_url (or layers[].attribution) set the cartographic credit in the bottom-right map control. preferred_map_mode (2d or 3d) and preferred_projection (mercator or globe) control how the map opens; visitors can still switch in the viewer.
Typical agent flow:
list_files(or reuse known file IDs).scaffold_map(or readsarkoa://schemas/map/v1/example) for a starting document.inspect_assetfor each layer you plan to style. For categorized vector layers, callclassify_vector_styleso classes get distinct colours (or passshuffle=trueto recolour). For point size or line width by a number, setvectorStyle.sizeByusinginspect_asset.sizeChannel. For dashed lines and polygon outlines, setstrokeDashwhenstrokeDashSupportedis true; for hatched, dotted or stippled polygons, setfillPatternwhenfillPatternSupportedis true.validate_mapwith your document, thencreate_map(full document or minimal{ title, layers }). Usedry_run=trueon create/replace when you want persistence checks (including duplicatelayerIdwithin the map) without saving.- Share
get_map_previewlinks with the user. - For follow-up edits, call
get_map, keep the returned revision, and pass it asexpected_revisiontoreplace_maporupdate_map.
If validation fails, the tool returns structured JSON with errors[].path so the agent can fix the right field. Public, password-protected, or email-invite maps require confirm_publish=true, and so does adding a layer to a map that is already public or password-protected. A public or password map shows its own layers to its visitors, so there is no need to make files public or create share links for it; the save response lists the layers it newly shows (map_exposes_layers). replace_map takes access from the document, so leaving spec.access out makes the map organization-only, and the response says so (access_mode_changed). Deleting a map requires confirm=true. If a tool listed on this page does not show up in your AI app, reload the MCP connection there.
Uploading files
Uploads go straight from the agent (or your machine) to Sarkoa storage.
- The agent calls
upload_presignwith the filename and size. - It uploads the file to the link that call returns (large files may use several chunk URLs via
upload_part_url). - It calls
upload_completeso Sarkoa registers the file and starts optimization. Passparent_idto place the file in a folder.
If the processing service cannot be reached at that moment, upload_complete still succeeds. The response carries a processor_trigger_deferred warning, the file stays Queued, and processing starts on its own within about ten minutes, so there is no need to upload it again. Calling upload_complete a second time for the same upload is also safe: it returns the file that already exists, marked deduplicated.
If your AI app cannot upload to those links, use the web app or CLI instead, then have the agent work with the file by name or ID.
Replacing a file's contents
When the data behind a map changes, have the agent replace the file rather than upload a new one. The file keeps its ID, so the maps that use it, and their styles, carry on without any edits.
upload_presignwith the filename, size andreplace_asset_idset to the file's ID.- Upload the bytes to the returned link, as for any upload.
upload_completewith the samereplace_asset_idand theobjectKeyfrom step 1.
The file stays Active on its current version while the new one is optimized. get_file_status shows a replacement block: processing, then succeeded, or failed with previous_version_live: true when the new version could not be built and the map still shows the old one. A succeeded replacement can carry warnings that name map layers styled by a field or band the new version no longer has. The new file has to be the same kind as the old one (vector or raster), and series frames are added with series_append_presign rather than replaced.
Call check_upload_quota before a large upload. Otherwise the bytes transfer first and the quota error arrives at the end, after the wait.
Maps on other worlds
Files, series and maps can be on another world: the Moon, Mars, Venus, Mercury, Ceres, Europa, Ganymede, Callisto, Io or Titan. Earth is the default everywhere, and an agent working on Earth needs none of this.
- Uploads.
upload_presignandupload_completetakecelestial_body:earth,moon,mars,venus,mercury,ceres,europa,ganymede,callisto,io,titan, orautoto read it from the file's CRS. With a world named, a file with no CRS is read as planetocentric latitude and east-positive longitude, whileautotakes it as Earth.upload_completealso takessource_crs(EPSG:n,ESRI:norIAU_2015:n), which a raster with no CRS must have. - Maps.
scaffold_maptakescelestial_body, and a full document setsspec.celestialBody.update_mapwithsetCelestialBodymoves a map that has no layers yet, and is refused withcelestial_body_lockedonce it has some. A layer on a different world returnscelestial_body_mismatch, with oneerrors[]entry per layer. - Series.
create_seriestakescelestial_body, and every frame must match. Name the world:autoleaves the series on Earth. - Reading.
stac_searchtakescelestial_bodyand searches one world at a time, scopingcollectionsfor you.inspect_assetreportscelestialBody, and raster answers addpixelSizeGroundM, the pixel's true width on that world.
A job that cannot be placed fails with celestial_body_unsupported_source or celestial_body_conflict, and its message says what to do. A file's world never changes after processing, so a mislabelled file is uploaded again. The full rules are in Maps of other worlds.
Waiting for processing without polling
The obvious loop after upload_complete is to call get_file_status until it changes. That works, and for one file it is fine. It is the wrong shape for a batch: it burns request quota and adds latency equal to the poll interval.
If the agent (or whatever it is automating) controls an HTTPS endpoint, register it once instead:
create_webhookwithasset.processing.succeededandasset.processing.failed. The signing secret comes back exactly once, so hand it to the user immediately.test_webhookto confirm the receiver actually answers before you depend on it.- Stop polling. Sarkoa posts a signed event, usually within a minute.
Full event catalogue, payload shape, and signature verification: Webhooks.
When polling really is the only option, poll no faster than about every five seconds and back off on retries.
Asking questions about the data
An agent can answer questions about a hosted layer as well as style it. Pick the tool that matches the question:
query_featuresfilters a vector layer by bounding box and attributes and returns GeoJSON, server-side, with no download. Runinspect_assetfirst to see the attribute names.sample_rasterreads what a raster stores at one point, so "how high is the ground here" gets the stored number rather than a guess from a tile's colour. Scale and offset are listed, never applied.zonal_statssummarizes a COG inside a polygon, such as the mean elevation within a project boundary. Passasset_idorfile_refand a WGS84 GeoJSON Polygon or MultiPolygon (at most 20,000 vertices). Nodata, transparent pixels and NaN are skipped. Results use raw stored values without applying scale or offset. Requests are limited to 1,048,576 sampled pixels; a large area can use an overview, markedapproximate=truewithpixelSize3857. Setmin_resolutionif a coarser overview would be unsuitable.sample_seriesreads the same location or area through a COG time series. Passseries_idand exactly one point (lng,lat) or polygon geometry in the request body. Use inclusivefromandtodates to request only the frames you need, and follownextCursor. Each frame includes its timestamp and a point or zonal result, or its own failure reason. The limit is 262,144 sampled pixels per frame; overview results are marked approximate. Values remain raw and requests count toward tile usage, with a batch discount.stac_searchfinds rasters by bounding box, time range, and collection.
See Feature query for vector queries, point samples and catalogue searches, including their size limits and what happens when a source is not queryable. For area and series summaries, inspect the returned resolution and approximation flags before reporting a result as precise.
Preparing a map for print
Sarkoa makes the PDF in the print composer, which runs in a browser. An agent sets up the sheet, then either hands you a link to it or has Sarkoa make the file on a server.
- The agent writes a print layout: paper, framing, title, and which elements go on the sheet. Every field is optional, and the schema is the
sarkoa://schemas/print/v1resource. - It calls
preview_print_layout, orcreate_print_layoutto save the layout under a name. - It reads the report and warnings. Legend rows that did not fit, or a paper size the plan reduced, come back here with the field to change, and the agent previews again until the sheet is right.
- It gives you the composer link. You open it and click Download PDF once the sheet looks right.
- Or it calls
export_print_layoutfor a PDF, a PNG or a video of the map over its time slider, checksget_print_exportuntil the file is made, and gives you the download link. The limits are in Exporting on the server.
Saving a layout needs edit access to the map. When the key only has view access, preview_print_layout still works, and its link carries the layout itself. Everything the composer can print, and the JSON that describes it, is in Printing maps.
Listing a map in Explore
Check the current Explore availability before relying on a directory listing.
Making a map public does not list it in Explore, and listing it is your decision rather than the agent's. get_map_listing tells the agent whether the map can be listed and what to fix first. It also returns the links to the terms and community guidelines you need to read. The agent calls set_map_listing only when you ask it to, and passes confirm_guidelines=true only after you have confirmed. If the terms have changed since you last accepted them, the agent asks you to accept them in the map builder first. A map that fails a check comes back as not_eligible with the reasons, and nothing is listed. What listing involves is covered in Listing in Explore.
Checking your own work
An agent that styles a raster and reports success has not actually verified anything. render_tile_preview fetches one real rendered tile and returns it as an image, so the model can look at the result before telling you it is done.
Tips for reliable agents
These habits help agents work smoothly with your files and maps:
- Use the links and file IDs returned by MCP tools. Do not ask the agent to invent viewer, download, or share URLs.
- List one folder at a time (
list_fileswithparent_id, or omit it for the library root). Uselist_folderswhen choosing a destination. Reuse those IDs instead of listing again. - Check one file with
get_file_status. While a file is still processing, wait several seconds between checks. - Request a download or upload link only when you need a new one (for example if a previous link expired).
- If the server asks the agent to slow down, wait before trying again.
- For uploads, follow the three-step flow above: get an upload link, send the file to that link, then call
upload_complete. Do not send file bytes through the MCP connection. - Before styling a map layer, call
inspect_assetand use its fields, bands, and statistics. For categorized colours, callclassify_vector_styleinstead of inventing hex values. Size points or lines withsizeBy; dash line layers withstrokeDash. Unrecognised style keys are dropped with a warning rather than applied. - After
get_map, pass the revision into later edits so concurrent changes are not overwritten. 8b. Ask for a map that opens on one layer. Every layer is switched on when a map opens unless the agent setsvisible: false, and a polygon or raster layer hides whatever sits under it. One filled layer on, with the alternatives and context layers off, reads at a glance, and visitors can still turn the others on from the layers panel. The agent gets anoverlapping_visible_layerswarning when two filled layers over the same area are both on. - Only delete a file, revoke a share, or publish a map (public, password, or email invite) when you explicitly ask for it. The agent must confirm before those tools run. Deleting a folder that still has contents also needs
recursive=true. - Use
whoamito confirm the connection works, not on every message. - If validation fails, have the agent read
errors[].pathin the tool error JSON instead of guessing. When a call succeeds but returnswarnings, read those too: they list the parts of the request that could not be used and were dropped. The codes are listed under Map documents. 11b. Argument names are checked. An argument a tool does not recognise is rejected with an error naming the closest match, and nothing is written. Either spelling works (title_fieldortitleField). - Ask for an embed with
get_embed_coderather than assembling a URL. A hand-built embed URL is the most common way an agent produces a frame that silently shows nothing. - Diagnose before retrying.
retry_processingwithdry_run=truereads the failure report; a malformed source will fail the same way on a second attempt. - Prefer a webhook over a polling loop for batches, and verify the receiver with
test_webhookbefore relying on it. - When a webhook is created, pass the signing secret straight to the user. It is returned once and cannot be retrieved later, only rotated.
- Have the agent fix what
preview_print_layoutwarns about before anything is printed. It can then give you the composer link to open and download from, or make the file itself withexport_print_layout. - Listing a map in Explore is your call. Publishing a map does not list it, and the agent should call
set_map_listingonly when you ask, with your own confirmation of the community guidelines. - Tell the agent which world a file is on.
autoreads a file's CRS, so a GeoJSON of lunar features with no CRS comes out as Earth unless the agent passescelestial_body=moon.
How agents get the detailed rules
When an agent connects, the server sends a short set of rules, kept under 4,000 characters so that no client cuts them off, and a list of subjects. The details for each subject (field names, limits, defaults, the mistakes agents commonly make) come from the guide tool, which the agent calls before it works on that subject: guide with topics: ["raster-style", "print"], say. A tool result that points at more reading names the subjects in guide_topics. inspect_asset does this for the kind of file it inspected, and a refused map save does it for the parts of the document that were refused.
The subjects are basics, uploads, time, map-authoring, popups-legends, vector-style, raster-style, analysis, 3d, visualization, flow, tours, basemap, compare, sharing, comments, print, worlds and battle-maps. The rules are numbered, and the numbers do not change, so guide with topics: ["21"] returns rule 21. Calling guide with no topics lists the subjects.
You can also install the optional Skills pack so hosts that load skill files pick up the same guidance.
Related
- Authentication
- CLI
- Skills (AI agents)
- Feature query:
query_features,sample_rasterandstac_searchin detail - Webhooks: the alternative to polling for status
- Map documents: the JSON the map tools read and write
- Printing maps: what the print tools prepare, and what the composer does with it
- Listing in Explore: what listing a map in the public directory involves
- Maps of other worlds: what is accepted and refused on the Moon, Mars and other worlds
- API reference
- Integrations