Skip to main content
Glama

setBasemap

Change the base map style for 3D globe visualization. Select from dark, satellite, or standard map types to customize the underlying terrain display in CesiumJS.

Instructions

切换底图风格(暗色/卫星影像/标准)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
basemapYes底图类型:dark=暗色, satellite=卫星影像, standard=标准

Implementation Reference

  • The actual implementation of the setBasemap tool which updates the Cesium imagery layers based on the provided basemap parameter.
    setBasemap(params: SetBasemapParams): string {
      const basemap = params.basemap ?? 'dark'
      this._viewer.imageryLayers.removeAll()
    
      switch (basemap) {
        case 'satellite':
          this._viewer.imageryLayers.addImageryProvider(
            new Cesium.UrlTemplateImageryProvider({
              url: 'https://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}',
              maximumLevel: 18,
            }),
          )
          break
        case 'standard':
          this._viewer.imageryLayers.addImageryProvider(
            new Cesium.UrlTemplateImageryProvider({
              url: 'https://tile.openstreetmap.org/{z}/{x}/{y}.png',
              maximumLevel: 19,
            }),
          )
          break
        case 'dark':
        default:
          this._viewer.imageryLayers.addImageryProvider(
            new Cesium.UrlTemplateImageryProvider({
  • Type definition for the input parameters of the setBasemap tool.
    export interface SetBasemapParams {
      basemap: 'dark' | 'satellite' | 'standard' | string
    }
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries full burden. It states the action ('切换' - switch/change) which implies a mutation, but doesn't disclose behavioral traits such as whether this requires specific permissions, if changes are reversible, potential side effects on other map elements, or response format. For a mutation tool with zero annotation coverage, this is a significant gap in transparency.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence in Chinese that directly states the tool's purpose with the style options listed concisely. It's front-loaded with the core action and wastes no words, making it easy to parse quickly.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given this is a mutation tool with no annotations and no output schema, the description is incomplete. It doesn't explain what happens after invocation (e.g., success feedback, error conditions), nor does it cover behavioral aspects like permissions or side effects. The schema handles parameters well, but overall context for safe and effective use is lacking.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, with the single parameter 'basemap' fully documented in the schema (including enum values and descriptions). The description mentions the same three style options ('暗色/卫星影像/标准' - dark/satellite/standard) but adds no additional meaning beyond what the schema provides. Baseline is 3 when schema does the heavy lifting.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('切换底图风格' - switch basemap style) and the resource (basemap), with specific style options listed. It distinguishes from siblings like 'setView' or 'setLayerVisibility' by focusing on basemap styling rather than viewport or layer properties. However, it doesn't explicitly differentiate from all siblings (e.g., 'updateLayerStyle' could be conceptually similar for layers).

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention prerequisites (e.g., whether a map must be initialized), when-not-to-use scenarios, or direct alternatives among siblings like 'updateLayerStyle' for other visual changes. The context is implied (changing basemap style) but lacks explicit usage instructions.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/gaopengbin/cesium-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server