Skip to main content
Glama

list_regions

Retrieve all available Linode cloud regions to determine where to deploy or manage instances.

Instructions

List all available Linode regions

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handler function for the 'list_regions' tool. It uses the LinodeClient to fetch all regions, processes them into a list of dictionaries with id, country, status, and capabilities, and returns the JSON string. Includes error handling. Registered via the @mcp_server.tool() decorator.
    @mcp_server.tool() def list_regions() -> str: """List all available Linode regions""" try: # Get the regions list regions_list = linode_client.regions() # Process each region in the collection result = [] # Type annotation to help linter for item in regions_list: # Cast to Region type to resolve linting issues region = cast(Region, item) result.append({ "id": region.id, "country": region.country, "status": region.status, "capabilities": region.capabilities }) return json.dumps(result) except Exception as e: logger.error(f"Error listing regions: {str(e)}") return json.dumps({"error": str(e)})
  • The call to register_tools(mcp, linode_client) which triggers the registration of the list_regions tool (and others) via decorators in linode_tools.py.
    # Register tools from the linode_tools module logger.debug("Registering Linode tools with MCP server") register_tools(mcp, linode_client)
  • The register_tools function where the @mcp_server.tool() decorators are applied to define and register the list_regions tool.
    def register_tools(mcp_server: Any, linode_client: LinodeClient):

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/komer3/linode-mcp'

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