MapScale
Thailand maps, geocoding, autocomplete, routing, and MapLibre quickstarts.
我該用這個嗎
品質與安全性
發現項目(7)
- HIGH
- MEDIUM在 mapscale_static_map 中
- MEDIUM在 mapscale_analysis 中
- LOW在 mapscale_route 中
- LOW在 mapscale_place_by_slug 中
- LOW在 mapscale_style_url 中
- INFO在 mapscale_static_map 中
根據工具定義與協定合規性的自動化分析。
上下文成本
這是每次將伺服器的工具載入模型上下文時所消耗的約略 token 數量。數量越高,可用於其他工作的注意力就越少。
安裝
一鍵安裝
將以下內容加入你的 `claude_desktop_config.json` 檔案:
{
"mcpServers": {
"mapscale": {
"url": "https://api.mapscale.io/mcp"
}
}
}遠端端點
https://api.mapscale.io/mcpstreamable-http它能做什麼
工具清單
工具(27)
🟢mapscale_products(need)
Lists MapScale's products (APIs, SDKs, datasets and tools) with what each does, whether it needs an API key, and its docs URL. Optional filter by need.
輸入結構描述
{
"type": "object",
"properties": {
"need": {
"type": "string",
"description": "Optional keyword filter, e.g. \"autocomplete\", \"routing\", \"wordpress\", \"react native\". MCP client UTF-8 budget: 512 bytes.",
"maxLength": 512
}
}
}🟢mapscale_thailand_quickstart(framework)
Returns copy-paste code for adding a MapLibre map of Thailand to a project: a complete, working example for maplibre-html, next, react, or react-native, including a keyless demo path (OpenStreetMap-based PMTiles) and the hosted style URL path that needs a MapScale publishable key. Useful when a project needs a Thailand basemap with Thai or English labels.
輸入結構描述
{
"type": "object",
"properties": {
"framework": {
"type": "string",
"enum": [
"maplibre-html",
"next",
"react",
"react-native"
],
"default": "maplibre-html",
"description": "Which framework's quickstart to return. MCP client UTF-8 budget: 512 bytes.",
"maxLength": 512
}
}
}🟢mapscale_style_url(lang, accent, hide)
Build the MapScale MapLibre style URL (self-contained: tiles+glyphs on the same origin). Drop straight into `new maplibregl.Map({ style })`. Params: lang (th/en), accent (6-digit hex), hide (layer groups).
輸入結構描述
{
"type": "object",
"properties": {
"lang": {
"type": "string",
"enum": [
"th",
"en"
],
"default": "th",
"maxLength": 512,
"description": "MCP client UTF-8 budget: 512 bytes."
},
"accent": {
"type": "string",
"description": "6-digit hex, # optional (e.g. 0c4a4a) MCP client UTF-8 budget: 512 bytes.",
"maxLength": 512
},
"hide": {
"type": "array",
"items": {
"type": "string",
"enum": [
"street",
"transit",
"districts",
"buildings",
"water",
"landuse"
]
}
}
}
}🟢mapscale_newsroom_map(dataset, data, points, title, subtitle, ...)
Make a choropleth map of Thailand by province or district with NO API key and no studio clicks: returns the MapScale newsroom studio link, a bare-map link, ready-to-paste responsive embed code and SVG/PNG image links, for a curated dataset (elderly share, rainfall, income, population density, forest, rice...) or the user's own numbers by province/district name (English or Thai). Free for editorial use with a 'Map: MapScale' credit linking to mapscale.io. Use for any "map these numbers" / "map X across Thailand" request from a journalist or writer.
輸入結構描述
{
"type": "object",
"properties": {
"dataset": {
"type": "string",
"description": "Curated Thailand dataset: population, elderly, rain (3-month rainfall vs normal), rainfall-normal, income, city (built-up share), forest, farms, rice, durian (registered durian-growing households by province, 2024), district-population, air (PM2.5, 2024-2025), warming, temperature, flood (2011; flood-extent by year), flash-flood, fires, landslides, sinkholes, earthquake (2025). Used when data and points are absent. MCP client UTF-8 budget: 512 bytes.",
"maxLength": 512
},
"data": {
"type": "array",
"maxItems": 1000,
"description": "The user's own numbers, one per province or district: [{place, value}]. place is an English or Thai name or a PCODE such as TH10.",
"items": {
"type": "object",
"properties": {
"place": {
"type": "string"
},
"value": {
"type": "number"
}
},
"required": [
"place",
"value"
]
}
},
"points": {
"type": "array",
"maxItems": 2000,
"description": "Point data instead of regions: [{lat, lng, label?, value?}].",
"items": {
"type": "object",
"properties": {
"lat": {
"type": "number"
},
"lng": {
"type": "number"
},
"label": {
"type": "string"
},
"value": {
"type": "number"
}
},
"required": [
"lat",
"lng"
]
}
},
"title": {
"type": "string",
"description": "Map title (max 200 characters). MCP client UTF-8 budget: 512 bytes.",
"maxLength": 512
},
"subtitle": {
"type": "string",
"description": "Map subtitle (max 200 characters). MCP client UTF-8 budget: 512 bytes.",
"maxLength": 512
},
"source": {
"type": "string",
"description": "The data source the journalist should credit (max 300 characters). MCP client UTF-8 budget: 512 bytes.",
"maxLength": 512
},
"colors": {
"type": "string",
"enum": [
"blue",
"green",
"orange",
"purple",
"red",
"viridis",
"dry-wet",
"cool-warm"
],
"description": "Colour ramp. MCP client UTF-8 budget: 512 bytes.",
"maxLength": 512
},
"style": {
"type": "string",
"enum": [
"paper",
"quiet",
"monochrome",
"midnight",
"light",
"dark"
],
"description": "Map look; light and dark also work. MCP client UTF-8 budget: 512 bytes.",
"maxLength": 512
},
"lang": {
"type": "string",
"enum": [
"en",
"th"
],
"description": "Map label language. MCP client UTF-8 budget: 512 bytes.",
"maxLength": 512
},
"locale": {
"type": "string",
"enum": [
"en",
"th"
],
"default": "en",
"description": "Language of the studio page the links open. MCP client UTF-8 budget: 512 bytes.",
"maxLength": 512
},
"shape": {
"type": "string",
"enum": [
"wide",
"square",
"tall"
],
"default": "wide",
"description": "Embed and image shape. MCP client UTF-8 budget: 512 bytes.",
"maxLength": 512
},
"year": {
"type": "integer",
"description": "Year to show for a dataset with history (it has a year slider, province charts and an animated GIF in the studio): warming and temperature 1900-2024, pm25 and unhealthy-air 2024-2025, flood-extent 2009-2014 (default 2011). Other datasets ignore it; an unknown year is dropped. Images (SVG/PNG) honour it."
},
"play": {
"type": "boolean",
"description": "Embed link only: play the year-by-year animation once when the map loads (datasets with history)."
},
"compare": {
"type": "integer",
"description": "Datasets with history: a second year. The map then shows the CHANGE (year minus compare), with a diverging cool-warm palette centred on 0. Example: dataset=warming, year=2024, compare=1950."
},
"region": {
"type": "string",
"enum": [
"north",
"northeast",
"central",
"east",
"west",
"south"
],
"description": "Zoom to one of the six regions; the rest of Thailand is drawn pale. MCP client UTF-8 budget: 512 bytes.",
"maxLength": 512
},
"focus": {
"type": "array",
"maxItems": 20,
"items": {
"type": "string"
},
"description": "Zoom to these provinces (PCODEs like TH50 or names); wins over region."
},
"highlight": {
"type": "array",
"maxItems": 8,
"items": {
"type": "string"
},
"description": "Provinces (PCODEs like TH10 or names) to outline and label with name and value."
},
"values": {
"type": "boolean",
"description": "Label every province with its value."
},
"notes": {
"type": "array",
"maxItems": 5,
"description": "Callouts pinned to provinces: [{pcode, text}] (text max 80 characters, no statistics).",
"items": {
"type": "object",
"properties": {
"pcode": {
"type": "string"
},
"text": {
"type": "string"
}
},
"required": [
"pcode",
"text"
]
}
},
"chart": {
"type": "string",
"enum": [
"none",
"line",
"rank"
],
"description": "Which chart tab opens by default in the studio and embed (datasets with history). MCP client UTF-8 budget: 512 bytes.",
"maxLength": 512
},
"top": {
"type": "integer",
"minimum": 3,
"maximum": 15,
"description": "Bars in the ranking chart."
},
"caption": {
"type": "string",
"description": "Text under the map (max 300 characters). Never write numbers: use placeholders such as {TH50.value}, {TH50.change}, {TH50.name}, {TH50.rank}, {median.value}, {median.change}, {year}, {compareYear}, {unit}; the page fills them from the data. MCP client UTF-8 budget: 512 bytes.",
"maxLength": 512
},
"stats": {
"type": "array",
"maxItems": 4,
"description": "Big-number cards under the map: [{pcode, metric: value|change, label?}]. The number comes from the data.",
"items": {
"type": "object",
"properties": {
"pcode": {
"type": "string"
},
"metric": {
"type": "string",
"enum": [
"value",
"change"
]
},
"label": {
"type": "string"
}
},
"required": [
"pcode",
"metric"
]
}
}
}
}🟢mapscale_status
Check the MapScale API's health/dependency status (public endpoint, no key).
輸入結構描述
{
"type": "object",
"properties": {}
}🟢mapscale_geocode(q, lang, limit, bbox, proximity, ...)
Geocode a query to coordinates. Accepts Thai-script or English queries (addresses, POIs, Thai administrative areas such as province, district and subdistrict) and returns a Mapbox-shaped GeoJSON FeatureCollection built on OpenStreetMap data. Requires a secret (sk_) key.
輸入結構描述
{
"type": "object",
"properties": {
"q": {
"type": "string",
"description": "Free-text query, e.g. \"siam paragon\" or \"ซีคอน สแควร์\" MCP client UTF-8 budget: 2048 bytes.",
"maxLength": 2048
},
"lang": {
"type": "string",
"enum": [
"th",
"en"
],
"description": "Result language MCP client UTF-8 budget: 512 bytes.",
"maxLength": 512
},
"limit": {
"type": "integer",
"default": 5,
"minimum": 1,
"maximum": 25
},
"bbox": {
"type": "string",
"description": "minLng,minLat,maxLng,maxLat bias MCP client UTF-8 budget: 128 bytes.",
"maxLength": 128
},
"proximity": {
"type": "string",
"description": "\"lng,lat\" bias MCP client UTF-8 budget: 128 bytes.",
"maxLength": 128
},
"country": {
"type": "string",
"description": "ISO-2 filter, e.g. TH MCP client UTF-8 budget: 512 bytes.",
"maxLength": 512
}
},
"required": [
"q"
]
}🟢mapscale_reverse(point, lang)
Reverse-geocode a lng,lat point (Thai admin areas, addresses).
輸入結構描述
{
"type": "object",
"properties": {
"point": {
"type": "string",
"description": "\"lng,lat\" e.g. \"100.5018,13.7563\" MCP client UTF-8 budget: 128 bytes.",
"maxLength": 128
},
"lang": {
"type": "string",
"enum": [
"th",
"en"
],
"maxLength": 512,
"description": "MCP client UTF-8 budget: 512 bytes."
}
},
"required": [
"point"
]
}🟢mapscale_autocomplete(q, session_token, lang, limit)
Address/place autocomplete session call — Google Places-shaped {predictions:[…]} for building a Thai address search box. Pass a stable session_token per user session.
輸入結構描述
{
"type": "object",
"properties": {
"q": {
"type": "string",
"maxLength": 2048,
"description": "MCP client UTF-8 budget: 2048 bytes."
},
"session_token": {
"type": "string",
"maxLength": 512,
"description": "MCP client UTF-8 budget: 512 bytes."
},
"lang": {
"type": "string",
"enum": [
"th",
"en"
],
"maxLength": 512,
"description": "MCP client UTF-8 budget: 512 bytes."
},
"limit": {
"type": "integer",
"default": 5,
"minimum": 1,
"maximum": 25
}
},
"required": [
"q"
]
}🟢mapscale_place(id)
Fetch full place details by id from geocode/autocomplete results (photon:… or places uuids).
輸入結構描述
{
"type": "object",
"properties": {
"id": {
"type": "string",
"maxLength": 512,
"description": "MCP client UTF-8 budget: 512 bytes."
}
},
"required": [
"id"
]
}🟢mapscale_route(coordinates, profile)
Driving/walking route between waypoints (Thailand-tuned Valhalla). Mapbox-shaped response. Coordinates are [lng, lat] pairs.
輸入結構描述
{
"type": "object",
"properties": {
"coordinates": {
"type": "array",
"description": "2..25 [lng, lat] pairs, start to end (MCP client budget)",
"items": {
"type": "array",
"items": {
"type": "number"
}
}
},
"profile": {
"type": "string",
"enum": [
"driving",
"walking"
],
"default": "driving",
"maxLength": 512,
"description": "MCP client UTF-8 budget: 512 bytes."
}
},
"required": [
"coordinates"
]
}🟢mapscale_matrix(sources, targets, profile)
Travel-time/distance matrix (≤25×25) — logistics, store-finder sort. sources and targets are [lng, lat] pair arrays.
輸入結構描述
{
"type": "object",
"properties": {
"sources": {
"type": "array",
"minItems": 1,
"maxItems": 25,
"items": {
"type": "array",
"items": {
"type": "number"
}
}
},
"targets": {
"type": "array",
"minItems": 1,
"maxItems": 25,
"items": {
"type": "array",
"items": {
"type": "number"
}
}
},
"profile": {
"type": "string",
"enum": [
"driving",
"walking"
],
"default": "driving",
"maxLength": 512,
"description": "MCP client UTF-8 budget: 512 bytes."
}
},
"required": [
"sources",
"targets"
]
}🟢mapscale_isochrone(point, contours, profile)
Isochrone contours around a point as GeoJSON — contours in minutes ("5,10,15") or kilometers ("1km,2km").
輸入結構描述
{
"type": "object",
"properties": {
"point": {
"type": "string",
"description": "\"lng,lat\" MCP client UTF-8 budget: 128 bytes.",
"maxLength": 128
},
"contours": {
"type": "string",
"default": "10,20,30",
"description": "\"5,10,15\" or \"1km,2km\" MCP client UTF-8 budget: 512 bytes.",
"maxLength": 512
},
"profile": {
"type": "string",
"enum": [
"driving",
"walking"
],
"default": "driving",
"maxLength": 512,
"description": "MCP client UTF-8 budget: 512 bytes."
}
},
"required": [
"point"
]
}🟢mapscale_datasets_list
List the datasets uploaded to your MapScale account (GeoJSON served as vector tiles). Each entry has id, name, slug, tilesetId (ds_<uuid>), feature count, geometry type and bbox. Requires a secret (sk_) key and an API deployment with the datasets endpoint.
輸入結構描述
{
"type": "object",
"properties": {}
}🟡mapscale_dataset_upload(name, geojson, slug, public)
Upload a small GeoJSON FeatureCollection (WGS84, up to 1000 features and 256 KB inline) as a dataset and serve it as vector tiles at /tiles/v1/ds_<id>/{z}/{x}/{y}.mvt. Larger files: POST to /v1/datasets directly. Requires a secret (sk_) key. Creates a stored dataset, so confirm with the user first.
輸入結構描述
{
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "Display name, 1-120 characters. MCP client UTF-8 budget: 512 bytes.",
"maxLength": 512
},
"geojson": {
"type": "object",
"description": "GeoJSON FeatureCollection, e.g. {\"type\":\"FeatureCollection\",\"features\":[...]}. A JSON string is also accepted."
},
"slug": {
"type": "string",
"description": "Optional layer name inside the tiles: lowercase letters, digits, - and _. Defaults to a slug of name. MCP client UTF-8 budget: 512 bytes.",
"maxLength": 512
},
"public": {
"type": "boolean",
"default": false,
"description": "Let any key read the tiles. Default false (private to your account)."
}
},
"required": [
"name",
"geojson"
]
}🟢mapscale_catalog(id)
Browse the MapScale Thailand data catalog (hazard, boundary and reference layers). Without an id returns the layer list; with an id returns that layer's details. Requires an API deployment with the catalog endpoint.
輸入結構描述
{
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Optional catalog layer id from the list. MCP client UTF-8 budget: 512 bytes.",
"maxLength": 512
}
}
}⚪mapscale_analysis(operation, params)
Run a spatial analysis on GeoJSON: buffer, aggregate, nearest or intersect. `params` is the JSON request body for that operation, as documented in the MapScale analysis reference (https://mapscale.io/docs). Requires a secret (sk_) key and an API deployment with the analysis endpoints.
輸入結構描述
{
"type": "object",
"properties": {
"operation": {
"type": "string",
"enum": [
"buffer",
"aggregate",
"nearest",
"intersect"
],
"maxLength": 512,
"description": "MCP client UTF-8 budget: 512 bytes."
},
"params": {
"type": "object",
"description": "JSON body for the chosen operation."
}
},
"required": [
"operation",
"params"
]
}🟢mapscale_styles_list
List the saved map styles in your MapScale account. Each can be loaded in MapLibre from its /styles/v1/st_<id> URL. Requires a secret (sk_) key and an API deployment with the styles endpoint.
輸入結構描述
{
"type": "object",
"properties": {}
}🟢mapscale_places_search(q, lang, limit, types, province_ids)
Search MapScale's own places index: POIs, admin areas (province, district, subdistrict), custom areas and major streets. Returns ranked candidates with stable feature keys. `types` is a comma-separated filter (e.g. condo,school,province). Requires an API key.
輸入結構描述
{
"type": "object",
"properties": {
"q": {
"type": "string",
"description": "Search text, 1-120 characters. MCP client UTF-8 budget: 2048 bytes.",
"maxLength": 2048
},
"lang": {
"type": "string",
"enum": [
"th",
"en"
],
"description": "Result language. MCP client UTF-8 budget: 512 bytes.",
"maxLength": 512
},
"limit": {
"type": "integer",
"default": 30,
"minimum": 1,
"maximum": 50
},
"types": {
"type": "string",
"description": "Comma-separated place types to keep. MCP client UTF-8 budget: 512 bytes.",
"maxLength": 512
},
"province_ids": {
"type": "string",
"description": "Comma-separated province ids to restrict to. MCP client UTF-8 budget: 512 bytes.",
"maxLength": 512
}
},
"required": [
"q"
]
}🟢mapscale_places_nearby(point, radius, limit, types, lang)
Find MapScale POIs near a point, ordered by crow-fly distance (baseScore is metres). Optional `types` filter is comma-separated POI types. Requires an API key.
輸入結構描述
{
"type": "object",
"properties": {
"point": {
"type": "string",
"description": "\"lng,lat\" e.g. \"100.5018,13.7563\" MCP client UTF-8 budget: 128 bytes.",
"maxLength": 128
},
"radius": {
"type": "integer",
"default": 5000,
"minimum": 1,
"maximum": 50000,
"description": "Metres."
},
"limit": {
"type": "integer",
"default": 20,
"minimum": 1,
"maximum": 100
},
"types": {
"type": "string",
"description": "Comma-separated POI types to keep. MCP client UTF-8 budget: 512 bytes.",
"maxLength": 512
},
"lang": {
"type": "string",
"enum": [
"th",
"en"
],
"maxLength": 512,
"description": "MCP client UTF-8 budget: 512 bytes."
}
},
"required": [
"point"
]
}🟢mapscale_place_by_slug(slug, lang)
Resolve one MapScale POI or custom area by its stable URL slug (custom areas include their polygon and bounding box). Requires an API key.
輸入結構描述
{
"type": "object",
"properties": {
"slug": {
"type": "string",
"description": "Stable place slug, up to 255 characters. MCP client UTF-8 budget: 512 bytes.",
"maxLength": 512
},
"lang": {
"type": "string",
"enum": [
"th",
"en"
],
"maxLength": 512,
"description": "MCP client UTF-8 budget: 512 bytes."
}
},
"required": [
"slug"
]
}🟢mapscale_admin_area_reverse(point, lang)
Point-in-polygon lookup: the Thai administrative area (province, district, subdistrict) containing a lng,lat point. Requires an API key.
輸入結構描述
{
"type": "object",
"properties": {
"point": {
"type": "string",
"description": "\"lng,lat\" e.g. \"100.5018,13.7563\" MCP client UTF-8 budget: 128 bytes.",
"maxLength": 128
},
"lang": {
"type": "string",
"enum": [
"th",
"en"
],
"maxLength": 512,
"description": "MCP client UTF-8 budget: 512 bytes."
}
},
"required": [
"point"
]
}🟢mapscale_environmental(op, areas, metrics, as_of, points, ...)
Environmental data lookups, chosen by `op`. admin_area_metrics: latest metric per admin area (areas [{level, code}], metrics [keys], optional as_of). flood_exposure: flood-event recurrence for up to 500 keyed points. elevation: Copernicus GLO-30 elevation for up to 500 keyed points. waterways: hydrography GeoJSON in a bbox. sources: provenance and coverage of the environmental datasets. All operations only read data. Requires an API key.
輸入結構描述
{
"type": "object",
"properties": {
"op": {
"type": "string",
"enum": [
"admin_area_metrics",
"flood_exposure",
"elevation",
"waterways",
"sources"
],
"maxLength": 512,
"description": "MCP client UTF-8 budget: 512 bytes."
},
"areas": {
"type": "array",
"maxItems": 100,
"description": "admin_area_metrics: [{level: country|province|district|subdistrict, code}].",
"items": {
"type": "object",
"properties": {
"level": {
"type": "string",
"enum": [
"country",
"province",
"district",
"subdistrict"
]
},
"code": {
"type": "string"
}
},
"required": [
"level",
"code"
]
}
},
"metrics": {
"type": "array",
"maxItems": 100,
"description": "admin_area_metrics: metric keys, lowercase [a-z0-9_.-].",
"items": {
"type": "string"
}
},
"as_of": {
"type": "string",
"description": "admin_area_metrics: ISO 8601 date-time for a point-in-time read. MCP client UTF-8 budget: 512 bytes.",
"maxLength": 512
},
"points": {
"type": "array",
"maxItems": 500,
"description": "flood_exposure and elevation: [{key, lat, lng}] with caller-chosen keys.",
"items": {
"type": "object",
"properties": {
"key": {
"type": "string"
},
"lat": {
"type": "number"
},
"lng": {
"type": "number"
}
},
"required": [
"key",
"lat",
"lng"
]
}
},
"event_keys": {
"type": "array",
"maxItems": 50,
"description": "flood_exposure: optional flood event keys to restrict to.",
"items": {
"type": "string"
}
},
"bbox": {
"type": "string",
"description": "waterways: \"minLng,minLat,maxLng,maxLat\". MCP client UTF-8 budget: 128 bytes.",
"maxLength": 128
},
"kinds": {
"type": "string",
"description": "waterways: comma-separated waterway kinds. MCP client UTF-8 budget: 512 bytes.",
"maxLength": 512
},
"source_version": {
"type": "string",
"description": "waterways: pin a source release. MCP client UTF-8 budget: 512 bytes.",
"maxLength": 512
},
"limit": {
"type": "integer",
"description": "waterways 1..5000 (default 1000); sources 1..200 (default 100)."
},
"datasets": {
"type": "string",
"description": "sources: comma-separated dataset filter. MCP client UTF-8 budget: 512 bytes.",
"maxLength": 512
}
},
"required": [
"op"
]
}🟢mapscale_static_map(center, zoom, width, height, retina, ...)
Build the URL of a static PNG map of Thailand (no download, no network call) plus a markdown image line. Give `center` [lng, lat] and `zoom`; optional size, retina, labels language, accent colour and up to 24 markers. The URL carries the key as `?key=` only when a publishable pk_ key is configured, otherwise a pk_live_YOUR_KEY placeholder.
輸入結構描述
{
"type": "object",
"properties": {
"center": {
"type": "array",
"items": {
"type": "number"
},
"minItems": 2,
"maxItems": 2,
"description": "[longitude, latitude]"
},
"zoom": {
"type": "number",
"default": 14,
"minimum": 0,
"maximum": 22
},
"width": {
"type": "integer",
"default": 600,
"minimum": 1,
"maximum": 1280
},
"height": {
"type": "integer",
"default": 400,
"minimum": 1,
"maximum": 1280
},
"retina": {
"type": "boolean",
"default": false,
"description": "Render at 2x pixel density."
},
"lang": {
"type": "string",
"enum": [
"th",
"en"
],
"maxLength": 512,
"description": "MCP client UTF-8 budget: 512 bytes."
},
"accent": {
"type": "string",
"description": "6-digit hex, # optional (e.g. 0c4a4a) MCP client UTF-8 budget: 512 bytes.",
"maxLength": 512
},
"markers": {
"type": "array",
"maxItems": 24,
"items": {
"type": "object",
"properties": {
"lng": {
"type": "number"
},
"lat": {
"type": "number"
},
"style": {
"type": "string",
"enum": [
"pin",
"chip",
"dot"
]
},
"label": {
"type": "string",
"description": "Up to 40 characters."
}
},
"required": [
"lng",
"lat"
]
}
}
},
"required": [
"center"
]
}🟢mapscale_assistant_plan(prompt, locale, dataset_ids, current)
Turn a sentence (English or Thai) into up to three validated map actions: style, buffer/aggregate/nearest analysis, ranking, or a clarifying question. With a secret key and dataset_ids (1-4 dataset UUIDs) it plans against your datasets. Without a key it answers against a fixed 12-shop demo dataset (prompt up to 300 characters, rate limited).
輸入結構描述
{
"type": "object",
"properties": {
"prompt": {
"type": "string",
"description": "Request, e.g. 'color the stores by visits'. MCP client UTF-8 budget: 512 bytes.",
"maxLength": 512
},
"locale": {
"type": "string",
"enum": [
"en",
"th"
],
"default": "en",
"maxLength": 512,
"description": "MCP client UTF-8 budget: 512 bytes."
},
"dataset_ids": {
"type": "array",
"minItems": 1,
"maxItems": 4,
"items": {
"type": "string"
},
"description": "Dataset UUIDs from mapscale_datasets_list. Needs a secret key."
},
"current": {
"type": "object",
"description": "Style currently applied, for follow-ups: {kind, property}.",
"properties": {
"kind": {
"type": "string"
},
"property": {
"type": "string"
}
}
}
},
"required": [
"prompt"
]
}🟢mapscale_atlas(op, bbox, layers, layer_id, ids, ...)
Public Thailand atlas data (no key needed), chosen by `op`. catalog: layer registry. province_metrics: latest environmental metrics per province. traffic_incidents: current traffic incidents. snapshot: layer metadata for a bbox (bbox, layers). layer: GeoJSON for one catalog layer with delivery vector (layer_id, bbox); base-map, admin-boundaries and places are style layers (delivery style) and are not returned as features. intelligence: server intelligence layers for a bbox (bbox, ids). cameras: public camera catalogue (optional bbox). air_quality_history: OpenAQ series (location_id, sensor_id, from, to). forecast: TMD forecast (lat, lng). bus_stop: route associations (stop_id). project_site: OSM plot and buildings (project_id).
輸入結構描述
{
"type": "object",
"properties": {
"op": {
"type": "string",
"enum": [
"catalog",
"province_metrics",
"traffic_incidents",
"snapshot",
"layer",
"intelligence",
"cameras",
"air_quality_history",
"forecast",
"bus_stop",
"project_site"
],
"maxLength": 512,
"description": "MCP client UTF-8 budget: 512 bytes."
},
"bbox": {
"type": "string",
"description": "\"minLng,minLat,maxLng,maxLat\"; viewports up to 2 degrees. MCP client UTF-8 budget: 128 bytes.",
"maxLength": 128
},
"layers": {
"type": "string",
"description": "snapshot: comma-separated layer ids (up to 4). MCP client UTF-8 budget: 512 bytes.",
"maxLength": 512
},
"layer_id": {
"type": "string",
"description": "layer: layer id from the catalog. MCP client UTF-8 budget: 512 bytes.",
"maxLength": 512
},
"ids": {
"type": "string",
"description": "intelligence: comma-separated intelligence ids (fires, events, factories, pollution, wind, waves, water, roads, noise, subsidence, flood-risk, population, income, condos, moobans, companies, tsunami, chiang-mai-flood, aqi-history, trains, buses). Catalog ids water-levels and flood-evidence are accepted as aliases of water and flood-risk. MCP client UTF-8 budget: 512 bytes.",
"maxLength": 512
},
"simulated": {
"type": "string",
"description": "intelligence: comma-separated simulated layer ids. MCP client UTF-8 budget: 512 bytes.",
"maxLength": 512
},
"province": {
"type": "string",
"description": "intelligence: province filter. MCP client UTF-8 budget: 512 bytes.",
"maxLength": 512
},
"industry": {
"type": "string",
"description": "intelligence: industry filter. MCP client UTF-8 budget: 512 bytes.",
"maxLength": 512
},
"at": {
"type": "string",
"description": "snapshot, intelligence: ISO 8601 date-time. MCP client UTF-8 budget: 512 bytes.",
"maxLength": 512
},
"from": {
"type": "string",
"description": "layer, air_quality_history: ISO 8601 date-time. MCP client UTF-8 budget: 512 bytes.",
"maxLength": 512
},
"to": {
"type": "string",
"description": "layer, air_quality_history: ISO 8601 date-time. MCP client UTF-8 budget: 512 bytes.",
"maxLength": 512
},
"limit": {
"type": "integer",
"description": "layer and air_quality_history: 1..500 (default 250)."
},
"cursor": {
"type": "string",
"description": "layer, air_quality_history: nextCursor from a prior page. MCP client UTF-8 budget: 512 bytes.",
"maxLength": 512
},
"location_id": {
"type": "integer",
"description": "air_quality_history: OpenAQ location id."
},
"sensor_id": {
"type": "integer",
"description": "air_quality_history: OpenAQ sensor id."
},
"lat": {
"type": "number",
"description": "forecast: latitude."
},
"lng": {
"type": "number",
"description": "forecast: longitude."
},
"stop_id": {
"type": "string",
"description": "bus_stop: stop id. MCP client UTF-8 budget: 512 bytes.",
"maxLength": 512
},
"project_id": {
"type": "string",
"description": "project_site: project UUID. MCP client UTF-8 budget: 512 bytes.",
"maxLength": 512
}
},
"required": [
"op"
]
}🟢mapscale_intelligence(product, op, q, id, cursor)
Read MapScale Intelligence data for one product (land, civic or defense), chosen by `op`: search (q), overview, usage (usage and limits), or a listing of entities, evidence, reports, alerts, assessments, incidents, dependencies, cases, watches or jobs (optional cursor); report returns one report by id. Read-only. Requires a secret (sk_) key with Intelligence access.
輸入結構描述
{
"type": "object",
"properties": {
"product": {
"type": "string",
"enum": [
"land",
"civic",
"defense"
],
"maxLength": 512,
"description": "MCP client UTF-8 budget: 512 bytes."
},
"op": {
"type": "string",
"enum": [
"search",
"overview",
"usage",
"report",
"entities",
"evidence",
"reports",
"alerts",
"assessments",
"incidents",
"dependencies",
"cases",
"watches",
"jobs"
],
"maxLength": 512,
"description": "MCP client UTF-8 budget: 512 bytes."
},
"q": {
"type": "string",
"description": "search: query, 2-200 characters. MCP client UTF-8 budget: 2048 bytes.",
"maxLength": 2048
},
"id": {
"type": "string",
"description": "report: report UUID. MCP client UTF-8 budget: 512 bytes.",
"maxLength": 512
},
"cursor": {
"type": "string",
"description": "Listings: nextCursor UUID from a prior page. MCP client UTF-8 budget: 512 bytes.",
"maxLength": 512
}
},
"required": [
"product",
"op"
]
}🟢mapscale_show_thailand_map(place, center, zoom, markers, title)
Show an interactive map of Thailand inline (MapLibre on OpenStreetMap data). Give a `place` (a major Thai city/province such as Bangkok, Chiang Mai, Phuket — other places need a MapScale key) or an explicit `center` [lng, lat], plus an optional `zoom` (1-18) and `markers` ([{lng, lat, name}]). Use for any "show me X on a map" request about Thailand.
輸入結構描述
{
"type": "object",
"properties": {
"place": {
"type": "string",
"description": "Place name, e.g. 'Chiang Mai'. MCP client UTF-8 budget: 512 bytes.",
"maxLength": 512
},
"center": {
"type": "array",
"items": {
"type": "number"
},
"minItems": 2,
"maxItems": 2,
"description": "[longitude, latitude]; overrides `place`."
},
"zoom": {
"type": "number",
"minimum": 1,
"maximum": 18,
"description": "Default 11."
},
"markers": {
"type": "array",
"maxItems": 50,
"items": {
"type": "object",
"properties": {
"lng": {
"type": "number"
},
"lat": {
"type": "number"
},
"name": {
"type": "string"
}
},
"required": [
"lng",
"lat"
]
}
},
"title": {
"type": "string",
"description": "Short caption shown on the map. MCP client UTF-8 budget: 512 bytes.",
"maxLength": 512
}
}
}社群
證據