carto-preview-builder-map
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
Chinesecarto-preview-builder-map
carto-preview-builder-map
Renders a lightweight inline preview of an existing saved CARTO Builder map via the CARTO MCP server's tool. The user references the map (by URL, ID, or name); the agent locates it and loads it inline.
load_builder_mapTool contract. This skill consumes the and tools exposed by the CARTO MCP server. The tools' input shapes and access-control rules (the user must own, be shared on, or have public access to the map) are documented in the tool's own MCP description — read it via the MCP host's tool-inspector or by calling . This skill stays focused on routing, name → ID resolution, and setting expectations on the lightweight preview; it does NOT duplicate the tool's spec.
load_builder_maplist_mapstools/listThis skill assumes the CARTO MCP server is attached (the and tools are in your tool list) AND the host supports MCP Apps (Claude.ai, Claude Desktop, ChatGPT). If either is missing, see "Step 1 — detect what's available" below.
load_builder_maplist_maps通过CARTO MCP服务器的工具,渲染已保存的CARTO Builder地图的轻量级内嵌预览。用户通过URL、ID或名称引用地图;Agent定位地图并将其内嵌加载。
load_builder_map工具约定。此技能使用CARTO MCP服务器提供的和工具。工具的输入格式和访问控制规则(用户必须拥有地图权限、被共享权限或地图为公开访问)记录在工具自身的MCP描述中——可通过MCP主机的工具检查器或调用查看。此技能专注于路由、名称→ID解析及明确轻量级预览的预期;不会重复工具的规格说明。
load_builder_maplist_mapstools/list此技能假设已连接CARTO MCP服务器(工具列表中包含和工具)且主机支持MCP应用(Claude.ai、Claude Desktop、ChatGPT)。若缺少任一条件,请参阅下方“步骤1——检测可用资源”。
load_builder_maplist_mapsStep 1 — detect what's available
步骤1——检测可用资源
| Check | How |
|---|---|
| Both tool names appear in your tool list. |
| Host renders MCP Apps | Hosts that DO: Claude.ai, Claude Desktop, ChatGPT. Hosts that DON'T (Gemini CLI, Codex CLI, plain MCP Inspector, current MCPJam) execute the tool but only show a text confirmation — no map widget. |
| Setup | What to do |
|---|---|
| Tools present + host renders | Proceed normally. |
| Tools present + host doesn't render | Tell the user the host can't render maps inline; suggest opening the Builder URL directly. |
| Tools not present | The MCP server isn't attached. Tell the user; don't try to reconstruct the saved map from scratch. |
| 检查项 | 检测方式 |
|---|---|
| 两个工具名称均出现在工具列表中。 |
| 主机可渲染MCP应用 | 支持的主机:Claude.ai、Claude Desktop、ChatGPT。不支持的主机(Gemini CLI、Codex CLI、普通MCP检查器、当前MCPJam)会执行工具,但仅显示文本确认——无地图小部件。 |
| 配置情况 | 操作建议 |
|---|---|
| 工具存在 + 主机可渲染 | 正常执行。 |
| 工具存在 + 主机不可渲染 | 告知用户该主机无法内嵌渲染地图;建议直接打开Builder URL。 |
| 工具不存在 | 未连接MCP服务器。告知用户;不要尝试从头重建已保存的地图。 |
Resolution rules (URL / ID / name)
解析规则(URL / ID / 名称)
| User input | What to do |
|---|---|
Builder URL | Extract |
| Bare UUID | Call |
| Name / topic ("the retail-stores map", "my last week's accidents analysis") | Call |
For name-based lookup, use if the user said "my map". Default sort is — most recently edited first.
mine_only: trueupdated_at desc| 用户输入 | 操作方式 |
|---|---|
Builder URL | 从URL中提取 |
| 纯UUID | 直接调用 |
| 名称/主题(“零售门店地图”、“我上周的事故分析地图”) | 先调用 |
对于基于名称的查找,若用户提到“我的地图”,请使用。默认排序为——最近编辑的地图优先。
mine_only: trueupdated_at descMatch handling (after list_maps
)
list_maps匹配处理(调用list_maps
后)
list_maps| Result | Action |
|---|---|
| 1 match | |
| >1 matches | List names + dates + thumbnails. Ask the user to pick. Don't guess. |
| 0 matches | Tell the user no saved map matches. Offer |
| 结果 | 操作 |
|---|---|
| 1个匹配项 | 调用 |
| 多个匹配项 | 列出名称+日期+缩略图。请用户选择。不要猜测。 |
| 无匹配项 | 告知用户没有匹配的已保存地图。提供 |
Set expectations on the preview (always)
明确预览的预期(始终执行)
The preview is lightweight:
- ✓ Layers, basemap, viewport, popups, legend — exactly as configured in Builder.
- ✗ Widgets, SQL parameters, map description, AI agent configuration, and other Builder-only features are NOT included.
After loading, tell the user: "Loaded [name] as a lightweight preview. Widgets, SQL parameters, and the map description aren't included — click 'Open in Builder' in the rendered widget for the full experience." Set this expectation BEFORE the user asks why the preview looks different from the live Builder map.
预览为轻量级:
- ✓ 图层、底图、视口、弹窗、图例——与Builder中的配置完全一致。
- ✗ 不包含小部件、SQL参数、地图描述、AI Agent配置及其他仅Builder具备的功能。
加载完成后,告知用户:“已加载[地图名称]的轻量级预览。小部件、SQL参数和地图描述未包含在内——点击渲染部件中的‘在Builder中打开’以获得完整体验。” 在用户询问预览为何与Builder中的实时地图不同之前,就明确此预期。
Post-CLI-creation preview workflow
CLI创建后的预览流程
When the user creates a permanent map via (from ), the response is a + Builder URL. With the MCP server attached, preview inline immediately:
carto maps createcarto-create-builder-mapsmapIdundefined当用户通过(来自)创建永久地图时,响应会包含和Builder URL。连接MCP服务器后,立即内嵌预览:
carto maps createcarto-create-builder-mapsmapIdundefinedcarto maps create returned { mapId: "abc-123", ... }
carto maps create返回 { mapId: "abc-123", ... }
load_builder_map({ mapId: "abc-123" })
This is the fastest authoring loop: edit, save via CLI, preview inline via MCP, repeat. Especially useful for styling iterations.
Caveat: still the lightweight preview. If the user is debugging widgets or SQL parameters, they need the full Builder experience.load_builder_map({ mapId: "abc-123" })
这是最快的创作循环:编辑、通过CLI保存、通过MCP内嵌预览、重复操作。对样式迭代尤其有用。
注意:仍为轻量级预览。若用户调试小部件或SQL参数,需使用完整的Builder体验。When to pick a different skill
何时选择其他技能
- Ad-hoc visualization, no saved map exists → (
carto-render-inline-map).view_map - Authoring / editing a permanent map → (CLI).
carto-create-builder-maps - Building a from-scratch deck.gl app → .
carto-develop-app
- 临时可视化,无已保存地图 → (
carto-render-inline-map)。view_map - 创作/编辑永久地图 → (CLI)。
carto-create-builder-maps - 从头构建deck.gl应用 → 。
carto-develop-app
Anti-patterns to avoid
需要避免的反模式
- Reconstructing a saved map via instead of
view_map. If the user references an existing map, ALWAYS tryload_builder_map+list_mapsfirst. Re-rendering loses fidelity (saved layers, popups, legend) AND it's slower.load_builder_map - Skipping when the user references a map by name. Don't guess the ID. Search first.
list_maps - Promising widgets, SQL parameters, or map description in the preview. They're not rendered. Set expectations upfront.
- Picking the most-recent match silently when returns multiple. Surface the choices and let the user pick.
list_maps
- 通过重建已保存地图而非使用
view_map。若用户引用现有地图,始终优先尝试load_builder_map+list_maps。重新渲染会丢失保真度(已保存的图层、弹窗、图例)且速度更慢。load_builder_map - 用户通过名称引用地图时跳过。不要猜测ID。先搜索。
list_maps - 承诺预览包含小部件、SQL参数或地图描述。这些内容不会被渲染。提前明确预期。
- 当返回多个匹配项时,静默选择最近的匹配项。列出选项并让用户选择。",
list_maps