Skip to main content
Glama

ping

Check server connectivity to verify QGIS MCP server availability and network status for GIS operations.

Instructions

Simple ping command to check server connectivity

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • MCP tool handler for the 'ping' tool. Proxies the ping command to the underlying QGIS socket server and returns the JSON-formatted response.
    @mcp.tool() def ping(ctx: Context) -> str: """Simple ping command to check server connectivity""" qgis = get_qgis_connection() result = qgis.send_command("ping") return json.dumps(result, indent=2)
  • Core implementation of the ping command in the QGIS MCP socket server, returning a simple pong response.
    def ping(self, **kwargs): """Simple ping command""" return {"pong": True}
  • Registration of the 'ping' handler (and other commands) in the QGIS MCP socket server's command dispatcher.
    handlers = { "ping": self.ping, "get_qgis_info": self.get_qgis_info, "load_project": self.load_project, "get_project_info": self.get_project_info, "execute_code": self.execute_code, "add_vector_layer": self.add_vector_layer, "add_raster_layer": self.add_raster_layer, "get_layers": self.get_layers, "remove_layer": self.remove_layer, "zoom_to_layer": self.zoom_to_layer, "get_layer_features": self.get_layer_features, "execute_processing": self.execute_processing, "save_project": self.save_project, "render_map": self.render_map, "create_new_project": self.create_new_project, }
  • Helper method in the socket client used by the MCP server to send the 'ping' command to QGIS.
    def ping(self): """Simple ping command to check server connectivity""" return self.send_command("ping")

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/syauqi-uqi/qgis_mcp_modify1'

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