Examples

Example LLM conversations using the MCP server.

MCP Examples

Real examples of how LLMs can use the MCP server to help users create maps.

Example 1: Simple Country Map

User: "I need a map of Canada"

LLM's internal process:

  1. Call list-locations?type=country&q=canada
  2. Get Canada's location ID
  3. Call get-api-example?scenario=country-map
  4. Customize with Canada's ID

LLM Response:

Here's the API request to generate a map of Canada:

curl -X POST 'https://api.smavatar.com/api/v1/projects/{your_project_id}/jobs/maps' \
  -H 'Authorization: Bearer {your_api_key}' \
  -H 'Content-Type: application/json' \
  -d '{
    "location_id": "fde40c8b-4d20-4839-960d-a7685ef3afc0",
    "width": 1400,
    "height": 900,
    "theme": "modern",
    "output_format": "png"
  }'

This will create a clean, modern-styled map of Canada. The job will complete in about 5 seconds.


Example 2: Quiz Map with Highlighting

User: "Create a US map quiz where students need to identify Idaho"

LLM's internal process:

  1. Call list-locations?type=country&q=united states
  2. Call list-locations?type=subdivision&q=idaho
  3. Get US location ID and Idaho's subdivision code
  4. Generate two requests: quiz (no labels) and answer key (with labels)

LLM Response:

I'll create two maps - a quiz version and an answer key.

Quiz Map (no labels):

curl -X POST '.../jobs/maps' -d '{
  "location_id": "bdd56f14-e776-418a-ab18-89c8138df978",
  "theme": "modern",
  "configuration": {
    "show_subdivision_labels": false,
    "highlight_subdivisions": [{
      "subdivision_code": "us-id",
      "fill_color": "#3498db",
      "opacity": 0.7,
      "show_label": false
    }]
  }
}'

Answer Key (with labels): Same request, but with "show_subdivision_labels": true and "show_label": true on the highlight.


Example 3: Map with Rivers

User: "Show me California with its major rivers"

LLM's internal process:

  1. Call list-locations?type=subdivision&q=california
  2. Call list-features?location_id={ca_id}&type=river (requires API key)
  3. Build request with river features

LLM Response:

Here's how to generate a map of California with its major rivers:

curl -X POST '.../jobs/maps' \
  -H 'Authorization: Bearer {api_key}' \
  -d '{
    "location_id": "{california-id}",
    "theme": "modern",
    "configuration": {
      "show_features": true,
      "show_river_labels": true
    }
  }'

This will show California with labeled rivers. The API automatically includes major rivers like the Sacramento and San Joaquin.


Example 4: Understanding Capabilities

User: "Can you create a 3D map of Paris streets?"

LLM's internal process:

  1. Call get-capabilities to check what's supported
  2. Find that 3D maps and street-level maps are NOT supported

LLM Response:

I checked SMAvatar's capabilities, and unfortunately it doesn't support 3D maps or street-level detail.

SMAvatar is designed for educational geography maps. Here's what it CAN do:

  • Country and state/province maps
  • Highlighting specific regions
  • Rivers and lakes
  • Multiple visual themes

For 3D street maps, you might want to look at Google Maps API or Mapbox instead.

Would you like me to create a country-level map of France instead?


Example 5: Multiple Highlights

User: "Create a map showing the Pacific states"

LLM's internal process:

  1. Call list-locations?type=country&q=us
  2. Call list-locations?type=subdivision&q=washington
  3. Call list-locations?type=subdivision&q=oregon
  4. Call list-locations?type=subdivision&q=california
  5. Build request with all three highlighted

LLM Response:

Here's a map highlighting the Pacific states (Washington, Oregon, California):

curl -X POST '.../jobs/maps' -d '{
  "location_id": "bdd56f14-e776-418a-ab18-89c8138df978",
  "theme": "modern",
  "configuration": {
    "highlight_subdivisions": [
      {"subdivision_code": "us-wa", "fill_color": "#3498db", "opacity": 0.7},
      {"subdivision_code": "us-or", "fill_color": "#3498db", "opacity": 0.7},
      {"subdivision_code": "us-ca", "fill_color": "#3498db", "opacity": 0.7}
    ]
  }
}'

Integrating MCP with Your LLM

To integrate SMAvatar MCP with your AI application:

  1. Register the tools - Add MCP tool definitions to your LLM's function calling
  2. Set the base URL - https://api.smavatar.com/api/mcp/tools/
  3. Handle responses - Parse JSON responses and format for users
  4. Include API key - For protected endpoints like list-features

See our system prompt template for a ready-to-use configuration.

Built with Nuxt UI • © 2025