Skip to main content
Glama
ryft-io

IcebergMCP

by ryft-io

get_namespaces

Retrieve available namespaces from the Iceberg catalog to organize and access data lakehouse tables efficiently.

Instructions

Provides a list of namespaces from the Iceberg catalog.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The main handler function for the 'get_namespaces' tool. It uses the get_catalog helper to list namespaces from the GlueCatalog and returns them as a newline-separated string. The @mcp.tool() decorator registers the tool with the MCP server.
    @mcp.tool() def get_namespaces() -> str: """Provides a list of namespaces from the Iceberg catalog.""" catalog = get_catalog() namespaces = catalog.list_namespaces() return "\n".join(ns[0] for ns in namespaces)
  • Helper function to initialize the Iceberg GlueCatalog using AWS credentials obtained via boto3 session with profile from config and specified region.
    def get_catalog() -> GlueCatalog: try: session = boto3.Session(profile_name=iceberg_config.profile_name) credentials = session.get_credentials().get_frozen_credentials() catalog = GlueCatalog( "glue", **{ "client.access-key-id": credentials.access_key, "client.secret-access-key": credentials.secret_key, "client.session-token": credentials.token, "client.region": iceberg_config.region, }, ) except Exception as e: logger.error(f"Error creating AWS connection: {str(e)}") raise return catalog
  • Configuration values for AWS profile and region used by get_catalog to create the catalog instance.
    profile_name = os.environ.get("ICEBERG_MCP_PROFILE") region = os.environ.get("ICEBERG_AWS_REGION") or 'us-east-1'

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/ryft-io/iceberg-mcp'

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