From fc4c4223a84094d01958dec349ecc1d79f43aaf9 Mon Sep 17 00:00:00 2001 From: yunqiqiliang <132561395+yunqiqiliang@users.noreply.github.com> Date: Fri, 10 Oct 2025 11:53:50 +0800 Subject: [PATCH 01/12] Add ClickZetta Lakehouse MCP Server - 61 tools for SQL operations, data management, vector search - Docker stdio transport for Claude Desktop integration - Configuration via mounted connections.json - Includes static tools.json to avoid runtime discovery --- .../mcp-clickzetta-server-stdio/server.yaml | 78 ++ .../mcp-clickzetta-server-stdio/tools.json | 1188 +++++++++++++++++ 2 files changed, 1266 insertions(+) create mode 100644 servers/mcp-clickzetta-server-stdio/server.yaml create mode 100644 servers/mcp-clickzetta-server-stdio/tools.json diff --git a/servers/mcp-clickzetta-server-stdio/server.yaml b/servers/mcp-clickzetta-server-stdio/server.yaml new file mode 100644 index 00000000..5f162514 --- /dev/null +++ b/servers/mcp-clickzetta-server-stdio/server.yaml @@ -0,0 +1,78 @@ +name: mcp-clickzetta-server-stdio +image: czqiliang/mcp-clickzetta-server:latest +type: server + +meta: + category: database + tags: + - database + - lakehouse + - sql + - data-engineering + - clickzetta + +about: + title: ClickZetta Lakehouse MCP Server + description: | + A Model Context Protocol (MCP) server for interacting with ClickZetta Lakehouse. + Provides 60+ tools for SQL query execution, table management, data operations, + vector search, knowledge retrieval, and advanced analytics. + + Key features: + - Execute SQL queries (SELECT, INSERT, UPDATE, DELETE, DDL) + - Vector/semantic search for knowledge retrieval + - Table and schema management + - Data import/export with multiple formats + - Advanced analytics and insights + - Multi-connection support with context switching + icon: https://raw.githubusercontent.com/yunqiqiliang/mcp-clickzetta-server/main/image/logo.png + homepage: https://github.com/yunqiqiliang/mcp-clickzetta-server + license: Apache-2.0 + +source: + project: https://github.com/yunqiqiliang/mcp-clickzetta-server + +config: + description: | + Configure ClickZetta Lakehouse connection via mounted configuration file. + + Before starting, create a configuration file at ~/.clickzetta/connections.json + based on the template from: + https://raw.githubusercontent.com/yunqiqiliang/mcp-clickzetta-server/main/config/connections-template.json + + The configuration file should contain your ClickZetta credentials: + - service: API endpoint (e.g., api.clickzetta.com) + - username: Your ClickZetta username + - password: Your ClickZetta password + - instance: Instance name + - workspace: Workspace name + - schema: Schema name + - vcluster: Virtual cluster name (default: default_ap) + + The server supports stdio transport for Claude Desktop integration. + Port 8502:8501 is mapped for optional web UI access. + + volumes: + - name: clickzetta-config + path: /app/.clickzetta + description: Mount directory containing connections.json configuration file + + # No secrets section - all config via mounted file + # No env section - config file takes precedence + +run: + command: docker + args: + - run + - -i + - --rm + - --stop-timeout + - "60" + - -p + - "8502:8501" + - -v + - ${HOME}/.clickzetta:/app/.clickzetta + - czqiliang/mcp-clickzetta-server:latest + +# Note: tools.json file should be placed alongside this server.yaml +# to avoid runtime tool discovery during registry build process diff --git a/servers/mcp-clickzetta-server-stdio/tools.json b/servers/mcp-clickzetta-server-stdio/tools.json new file mode 100644 index 00000000..1bddf024 --- /dev/null +++ b/servers/mcp-clickzetta-server-stdio/tools.json @@ -0,0 +1,1188 @@ +[ + { + "name": "get_product_knowledge", + "description": "从向量数据库中搜索ClickZetta产品知识,使用语义相似性搜索。", + "arguments": [ + { + "name": "question", + "type": "string", + "desc": "User question to search, such as 自定义函数, 常用DDL语句, 数据导入导出. The question or topic y" + }, + { + "name": "vector_search_limit_n", + "type": "integer", + "desc": "Limit the return results, default value is 3. Number of most relevant results to" + }, + { + "name": "table_name", + "type": "string", + "desc": "table name, default is knowledge_base" + } + ] + }, + { + "name": "read_query", + "description": "执行只读SQL查询并返回结果,支持自动结果限制。", + "arguments": [ + { + "name": "query", + "type": "string", + "desc": "只读SQL查询语句,如SELECT、DESCRIBE、SHOW、EXPLAIN等。使用LIMIT控制结果行数(最大100行)。" + }, + { + "name": "verbose", + "type": "boolean", + "desc": "If true, returns detailed SQL execution information including the query and meta" + } + ] + }, + { + "name": "vector_search", + "description": "对表执行向量搜索/知识检索/文档检索。", + "arguments": [ + { + "name": "table_name", + "type": "string", + "desc": "table name" + }, + { + "name": "content_column_name", + "type": "string", + "desc": "可选,存储内容的列名。如不指定会智能推断,优先顺序:text, content, document, body, description 等" + }, + { + "name": "embedding_column_name", + "type": "string", + "desc": "可选,存储向量的列名。如不指定会智能推断,优先顺序:embeddings, embedding, semantic_vector, vector 等" + } + ] + }, + { + "name": "match_all", + "description": "使用MATCH_ALL函数对表进行全文搜索。", + "arguments": [ + { + "name": "table_name", + "type": "string", + "desc": "Table name to search in" + }, + { + "name": "content_column_name", + "type": "string", + "desc": "Column containing searchable content (optional - will auto-detect if not provide" + }, + { + "name": "question", + "type": "string", + "desc": "Search query/question" + } + ] + }, + { + "name": "write_query", + "description": "执行写操作SQL语句(INSERT/UPDATE/DELETE/CREATE/DROP等)。", + "arguments": [ + { + "name": "query", + "type": "string", + "desc": "SQL query to execute (INSERT/UPDATE/DELETE/CREATE/DROP etc.)" + }, + { + "name": "verbose", + "type": "boolean", + "desc": "If true, returns detailed execution information. If false, returns minimal succe" + } + ] + }, + { + "name": "switch_context", + "description": "在当前连接内切换上下文(SCHEMA和VCLUSTER),或智能路由到workspace切换。", + "arguments": [ + { + "name": "schema", + "type": "string", + "desc": "Schema name to switch to (optional)" + }, + { + "name": "vcluster", + "type": "string", + "desc": "VCluster name to switch to (optional)" + }, + { + "name": "workspace", + "type": "string", + "desc": "Workspace name - if provided, will route to switch_workspace tool instead" + } + ] + }, + { + "name": "desc_object_history", + "description": "查看对象的历史版本和变更记录。", + "arguments": [ + { + "name": "object_type", + "type": "string", + "desc": "Object type (TABLE/VIEW/FUNCTION/PIPE etc.)" + }, + { + "name": "object_name", + "type": "string", + "desc": "Object name to describe history for" + }, + { + "name": "limit", + "type": "integer", + "desc": "Maximum number of history records to return (default: 10)" + } + ] + }, + { + "name": "get_current_context", + "description": "获取当前连接的上下文信息。", + "arguments": [] + }, + { + "name": "show_table_load_history", + "description": "查询表的COPY操作加载历史记录。", + "arguments": [ + { + "name": "table_name", + "type": "string", + "desc": "Table name to query load history for (required)" + } + ] + }, + { + "name": "show_job_history", + "description": "查询系统级作业执行历史记录。", + "arguments": [ + { + "name": "limit", + "type": "integer", + "desc": "Maximum number of history records to return (default: 20)" + }, + { + "name": "workspace_name", + "type": "string", + "desc": "Filter by workspace name" + }, + { + "name": "virtual_cluster", + "type": "string", + "desc": "Filter by virtual cluster name" + } + ] + }, + { + "name": "create_schema", + "description": "创建新的SCHEMA(数据模式)。", + "arguments": [ + { + "name": "schema_name", + "type": "string", + "desc": "新建的 schema 名称" + }, + { + "name": "if_not_exists", + "type": "boolean", + "desc": "可选,若为 true 则仅在不存在时创建" + }, + { + "name": "comment", + "type": "string", + "desc": "可选,schema 的描述性注释" + } + ] + }, + { + "name": "create_catalog_connection", + "description": "创建CATALOG CONNECTION以访问外部元数据目录。", + "arguments": [ + { + "name": "connection_name", + "type": "string", + "desc": "CATALOG CONNECTION 名称" + }, + { + "name": "catalog_type", + "type": "string", + "desc": "Catalog 类型,支持 HIVE、OSS_CATALOG、DATABRICKS" + }, + { + "name": "if_not_exists", + "type": "boolean", + "desc": "可选,若为 true 则仅在不存在时创建" + } + ] + }, + { + "name": "create_external_catalog", + "description": "创建EXTERNAL CATALOG以挂载外部元数据目录。", + "arguments": [ + { + "name": "catalog_name", + "type": "string", + "desc": "EXTERNAL CATALOG 名称,如 my_hive_catalog" + }, + { + "name": "connection", + "type": "string", + "desc": "已创建的 CATALOG CONNECTION 名称" + }, + { + "name": "options", + "type": "object", + "desc": "可选,OPTIONS 其它参数,键值对" + } + ] + }, + { + "name": "create_external_schema", + "description": "创建EXTERNAL SCHEMA以将外部数据库挂载为Lakehouse模式。", + "arguments": [ + { + "name": "schema_name", + "type": "string", + "desc": "EXTERNAL SCHEMA 名称,如 my_schema" + }, + { + "name": "connection", + "type": "string", + "desc": "已创建的 CATALOG CONNECTION 名称" + }, + { + "name": "database", + "type": "string", + "desc": "外部 catalog 下的数据库名" + } + ] + }, + { + "name": "create_external_table", + "description": "根据ClickZetta官方文档创建外部表。", + "arguments": [ + { + "name": "table_name", + "type": "string", + "desc": "外部表名称(必需)" + }, + { + "name": "table_format", + "type": "string", + "desc": "外部表格式类型:\n• DELTA - Delta Lake格式,存储在对象存储\n⚠️ 根据ClickZetta官方文档,目前只支持Delta Lake格式\n❌" + }, + { + "name": "columns", + "type": [ + "string", + "array" + ], + "desc": "列定义,支持两种格式:\n• 字符串格式: 'order_id INT, product_id STRING, sale_amount DOUBLE'\n• 数组格" + } + ] + }, + { + "name": "create_api_connection", + "description": "创建API CONNECTION用于云函数连接,支持阿里云FC、腾讯云函数、AWS Lambda。", + "arguments": [ + { + "name": "connection_name", + "type": "string", + "desc": "API CONNECTION 名称,如 ai_function_connection" + }, + { + "name": "provider", + "type": "string", + "desc": "云函数提供商(必需)" + }, + { + "name": "region", + "type": "string", + "desc": "云服务区域(必需),如 cn-hangzhou、ap-beijing、us-east-1" + } + ] + }, + { + "name": "create_storage_connection", + "description": "创建STORAGE CONNECTION以访问外部存储系统。", + "arguments": [ + { + "name": "connection_name", + "type": "string", + "desc": "连接名称,如 hdfs_conn、oss_conn、cos_conn、s3_conn" + }, + { + "name": "connection_type", + "type": "string", + "desc": "连接类型" + }, + { + "name": "endpoint", + "type": "string", + "desc": "服务端点地址" + } + ] + }, + { + "name": "create_volume", + "description": "创建EXTERNAL VOLUME以访问对象存储。", + "arguments": [ + { + "name": "volume_name", + "type": "string", + "desc": "VOLUME 名称,如 sh_image_volume、my_tx_volume、aws_s3_volume_arn" + }, + { + "name": "volume_type", + "type": "string", + "desc": "对象存储类型,支持 oss/cos/s3" + }, + { + "name": "bucket", + "type": "string", + "desc": "对象存储桶名,A bucket name must be comprised of lower-case characters, numbers or dash" + } + ] + }, + { + "name": "create_table", + "description": "创建ClickZetta表,支持完整的CREATE TABLE语法。", + "arguments": [ + { + "name": "table_name", + "type": "string", + "desc": "表名称" + }, + { + "name": "if_not_exists", + "type": "boolean", + "desc": "可选,若为true则仅在表不存在时创建" + }, + { + "name": "creation_method", + "type": "string", + "desc": "表创建方式" + } + ] + }, + { + "name": "create_function", + "description": "创建基于SQL的用户自定义函数(UDF)。", + "arguments": [ + { + "name": "function_name", + "type": "string", + "desc": "函数名称,可用schema限定(如:public.my_func)" + }, + { + "name": "return_type", + "type": "string", + "desc": "标量函数返回类型:INT、DOUBLE、STRING、BOOLEAN等" + }, + { + "name": "returns_table", + "type": "array", + "desc": "表函数返回结构(与return_type互斥)" + } + ] + }, + { + "name": "create_external_function", + "description": "🚀 创建外部函数(EXTERNAL FUNCTION)- 基于云函数服务执行Python/Java代码。", + "arguments": [ + { + "name": "function_name", + "type": "string", + "desc": "外部函数名称,可用schema限定(如:public.my_func)" + }, + { + "name": "class_name", + "type": "string", + "desc": "🎯 函数处理器(Handler)- ClickZetta要求使用module.class格式:\n• ✅ 正确格式:'my_function.my_functio" + }, + { + "name": "resource_uris", + "type": [ + "array", + "string" + ], + "desc": "📂 函数代码资源位置 - 自动验证文件存在性:\n• 🔍 Volume验证:检查volume://路径的文件是否真实存在\n• ⚠️ 云存储警告:OSS/S3路径无" + } + ] + }, + { + "name": "create_index", + "description": "创建索引,支持VECTOR/INVERTED/BLOOMFILTER三种类型。", + "arguments": [ + { + "name": "index_type", + "type": "string", + "desc": "索引类型" + }, + { + "name": "index_name", + "type": "string", + "desc": "索引名称" + }, + { + "name": "table_name", + "type": "string", + "desc": "表名称(可包含schema)" + } + ] + }, + { + "name": "create_pipe", + "description": "创建PIPE管道,用于自动化数据导入 - 智能优化版本。", + "arguments": [ + { + "name": "pipe_name", + "type": "string", + "desc": "PIPE名称(必需)" + }, + { + "name": "target_table", + "type": "string", + "desc": "目标表名(智能模式:自动生成COPY语句)" + }, + { + "name": "source_volume", + "type": "string", + "desc": "源VOLUME名称(智能模式:自动生成COPY语句)" + } + ] + }, + { + "name": "create_table_stream", + "description": "创建表流,用于捕获表的变更数据。", + "arguments": [ + { + "name": "stream_name", + "type": "string", + "desc": "流名称" + }, + { + "name": "table_name", + "type": "string", + "desc": "源表名称" + }, + { + "name": "stream_type", + "type": "string", + "desc": "流类型" + } + ] + }, + { + "name": "create_dynamic_table", + "description": "创建动态表,自动维护查询结果的实时更新。", + "arguments": [ + { + "name": "table_name", + "type": "string", + "desc": "动态表名称" + }, + { + "name": "query", + "type": "string", + "desc": "定义动态表的SQL查询" + }, + { + "name": "refresh_mode", + "type": "string", + "desc": "刷新模式" + } + ] + }, + { + "name": "create_knowledge_base", + "description": "使用非结构化ETL管道从文档构建新的知识库。", + "arguments": [ + { + "name": "documents_source_type", + "type": "string", + "desc": "文档源类型,如 'volume' 或 's3' 或 'local'" + }, + { + "name": "volume_name", + "type": "string", + "desc": "Volume名称,volume类型必需" + }, + { + "name": "documents_source_path", + "type": "string", + "desc": "文档源路径,必须由用户提供" + } + ] + }, + { + "name": "create_vcluster", + "description": "创建虚拟计算集群(Virtual Cluster)。", + "arguments": [ + { + "name": "cluster_name", + "type": "string", + "desc": "集群名称" + }, + { + "name": "cluster_type", + "type": "string", + "desc": "集群类型" + }, + { + "name": "cluster_size", + "type": "integer", + "desc": "集群规格,1-256 CRU" + } + ] + }, + { + "name": "generate_external_function_template", + "description": "🚀 生成外部函数模板代码 - 基于clickzetta_aisql项目的成功经验。", + "arguments": [ + { + "name": "function_name", + "type": "string", + "desc": "函数名称,将作为Python类名和ZIP文件名" + }, + { + "name": "template_type", + "type": "string", + "desc": "模板类型" + }, + { + "name": "system_prompt", + "type": "string", + "desc": "AI系统提示词(仅ai_text_processing类型使用)" + } + ] + }, + { + "name": "test_external_function_locally", + "description": "🧪 本地测试外部函数 - 部署前验证和调试。", + "arguments": [ + { + "name": "python_file", + "type": "string", + "desc": "Python文件路径" + }, + { + "name": "function_name", + "type": "string", + "desc": "函数名称(可选,自动推断)" + }, + { + "name": "test_cases", + "type": "array", + "desc": "测试用例列表" + } + ] + }, + { + "name": "switch_vcluster_schema", + "description": "切换当前VCLUSTER(虚拟集群)和/或SCHEMA,在当前workspace内切换计算资源和数据范围。", + "arguments": [ + { + "name": "schema_name", + "type": "string", + "desc": "要切换到的schema名称(可选)" + }, + { + "name": "vcluster_name", + "type": "string", + "desc": "要切换到的vcluster名称(可选)" + } + ] + }, + { + "name": "switch_workspace", + "description": "切换当前连接的workspace。", + "arguments": [ + { + "name": "workspace_name", + "type": "string", + "desc": "目标workspace名称" + }, + { + "name": "list_workspaces", + "type": "boolean", + "desc": "是否列出所有可用的workspace" + }, + { + "name": "update_config", + "type": "boolean", + "desc": "是否永久更新连接配置文件" + } + ] + }, + { + "name": "show_object_list", + "description": "列出数据库对象,支持智能筛选、统计分析和过滤建议。", + "arguments": [ + { + "name": "show_command", + "type": "string", + "desc": "Legacy parameter (backward compatible). You can use the following syntax to cons" + }, + { + "name": "object_type", + "type": "string", + "desc": "Type of objects to list (recommended over show_command)" + }, + { + "name": "in_schema", + "type": "string", + "desc": "Optional schema name to filter objects within. Note: VOLUMES does not support IN" + } + ] + }, + { + "name": "desc_object", + "description": "获取数据库对象的详细信息。", + "arguments": [ + { + "name": "object_type", + "type": "string", + "desc": "Type of the object. Supported: WORKSPACE, TABLE, VIEW, TABLE STREAM, SCHEMA, CON" + }, + { + "name": "object_name", + "type": "string", + "desc": "Name of the object to describe (can include schema qualification like 'schema.ta" + }, + { + "name": "extended", + "type": "boolean", + "desc": "Use EXTENDED mode for more detailed information (tables/views)" + } + ] + }, + { + "name": "refresh_dynamic_table", + "description": "手动刷新动态表数据。示例:REFRESH DYNAMIC TABLE my_dt;", + "arguments": [ + { + "name": "table_name", + "type": "string", + "desc": "动态表名称" + } + ] + }, + { + "name": "restore_object", + "description": "将表、动态表或物化视图恢复到指定历史时间点。", + "arguments": [ + { + "name": "object_type", + "type": "string", + "desc": "对象类型,支持 'table'、'dynamic table'、'materialized view'" + }, + { + "name": "object_name", + "type": "string", + "desc": "对象名称" + }, + { + "name": "timestamp", + "type": "string", + "desc": "要恢复到的时间点,支持多种格式:\n• 完整格式: '2024-01-26 17:44:45.349'\n• 秒级格式: '2024-01-26 17:44:45'" + } + ] + }, + { + "name": "undrop_object", + "description": "恢复被删除的表、动态表或物化视图。示例:UNDROP TABLE my_table; 支持对象类型:table、dynamic table、materialized view。", + "arguments": [ + { + "name": "object_type", + "type": "string", + "desc": "对象类型,支持 'table'、'dynamic table'、'materialized view'" + }, + { + "name": "object_name", + "type": "string", + "desc": "对象名称" + } + ] + }, + { + "name": "drop_object", + "description": "🚨 安全删除各种类型的数据库对象,支持确认机制和UNDROP提示。", + "arguments": [ + { + "name": "object_name", + "type": "string", + "desc": "要删除的对象名称" + }, + { + "name": "object_type", + "type": "string", + "desc": "对象类型(如TABLE、VIEW、SCHEMA等)" + }, + { + "name": "if_exists", + "type": "boolean", + "desc": "是否使用IF EXISTS(默认True,对象不存在时不报错)" + } + ] + }, + { + "name": "manage_share", + "description": "管理SHARE对象 - 统一的跨实例数据共享管理工具。", + "arguments": [ + { + "name": "operation", + "type": "string", + "desc": "操作类型" + }, + { + "name": "share_name", + "type": "string", + "desc": "SHARE名称(list操作可选)" + }, + { + "name": "table_name", + "type": "string", + "desc": "表名(grant_table/revoke_table操作需要)" + } + ] + }, + { + "name": "import_data_src", + "description": "从URL、文件路径或Volume导入数据到表。", + "arguments": [ + { + "name": "from_url", + "type": "string", + "desc": "数据源地址,支持三种格式(注意格式支持差异):\n\n1. Volume URL (推荐): volume://my_volume/folder/data.json" + }, + { + "name": "dest_table", + "type": "string", + "desc": "目标表名称" + }, + { + "name": "write_mode", + "type": "string", + "desc": "数据写入模式:\n• 'create' - 新建表模式,要求目标表不存在,如果表已存在会报错并提示更换表名\n• 'overwrite' - 覆盖模式,替换已存在表" + } + ] + }, + { + "name": "import_data_from_db", + "description": "从外部数据库导入数据到ClickZetta表。", + "arguments": [ + { + "name": "db_type", + "type": "string", + "desc": "数据库类型(如:'mysql'、'postgresql'、'sqlite')" + }, + { + "name": "host", + "type": "string", + "desc": "数据库服务器主机名或IP地址(SQLite不需要)" + }, + { + "name": "port", + "type": "integer", + "desc": "数据库服务器端口号(SQLite不需要)" + } + ] + }, + { + "name": "preview_volume_data", + "description": "对VOLUME上的半结构化文件进行SQL查询分析或导入到表。", + "arguments": [ + { + "name": "copy_statement", + "type": "string", + "desc": "完整的COPY INTO语句,如:COPY INTO target_table FROM @volume/path/ FILE_FORMAT=(TYPE='CS" + }, + { + "name": "source_volume", + "type": "string", + "desc": "VOLUME 名称,如 volume_name、TABLE table_name、USER" + }, + { + "name": "format", + "type": "string", + "desc": "文件格式,如 csv、parquet、bson、orc 等" + } + ] + }, + { + "name": "add_data_insight", + "description": "添加数据洞察到备忘录中,记录分析过程中发现的重要信息", + "arguments": [ + { + "name": "insight", + "type": "string", + "desc": "Data insight discovered from analysis" + } + ] + }, + { + "name": "put_file_to_volume", + "description": "🚀 将文件上传到ClickZetta Lakehouse的VOLUME存储。", + "arguments": [ + { + "name": "source_path", + "type": "string", + "desc": "文件路径或HTTP(S) URL。如果只提供文件名,会自动在默认上传目录中搜索:\n• /app/.clickzetta/data/uploads (容器环境)\n" + }, + { + "name": "content", + "type": "string", + "desc": "📝 直接上传文件内容(文本格式)- 外部函数开发利器:\n• 🎯 主要用途:Python外部函数代码直接上传\n• ✅ 支持格式:.py源码、.sql脚本、.txt" + }, + { + "name": "target_volume", + "type": "string", + "desc": "🎯 目标Volume存储位置:\n• 📂 推荐Volume:\n - external_functions_prod(生产环境外部函数)\n - external" + } + ] + }, + { + "name": "get_file_from_volume", + "description": "将ClickZetta Lakehouse Volume的文件下载到本地目录。", + "arguments": [ + { + "name": "source_volume", + "type": "string", + "desc": "源 Volume 名称,如 volume_name、TABLE table_name、USER" + }, + { + "name": "source_file", + "type": "string", + "desc": "Volume 内的文件名,支持逗号分隔或 list" + }, + { + "name": "target_local_path", + "type": "string", + "desc": "本地目标目录路径(可选)。文件将以原名下载到此目录。\n未指定时自动使用默认下载目录:\n• /app/.clickzetta/data/downloads (容器" + } + ] + }, + { + "name": "list_files_on_volume", + "description": "列举Volume中的文件列表。", + "arguments": [ + { + "name": "target_volume", + "type": "string", + "desc": "Volume 名称,如 volume_name、TABLE table_name、USER" + }, + { + "name": "target_subdirectory", + "type": "string", + "desc": "可选,子目录" + }, + { + "name": "pattern", + "type": "string", + "desc": "可选,文件名正则表达式筛选模式(标准regex语法,非shell glob)。\n常用示例:\n• '.*\\.json$' - JSON文件\n• '.*\\.(jso" + } + ] + }, + { + "name": "remove_file_from_volume", + "description": "从Volume删除文件或目录。", + "arguments": [ + { + "name": "target_volume", + "type": "string", + "desc": "Volume 名称,如 volume_name、TABLE table_name、USER" + }, + { + "name": "target_file", + "type": "string", + "desc": "要删除的文件名,支持逗号分隔或 list" + }, + { + "name": "target_subdirectory", + "type": "string", + "desc": "要删除的子目录" + } + ] + }, + { + "name": "alter_dynamic_table", + "description": "修改动态表属性。", + "arguments": [ + { + "name": "table_name", + "type": "string", + "desc": "动态表名称" + }, + { + "name": "operation", + "type": "string", + "desc": "操作类型。直接支持的操作:\n• suspend - 暂停动态表调度\n• resume - 恢复动态表调度\n• set_comment - 修改表注释\n• ren" + }, + { + "name": "column_name", + "type": "string", + "desc": "列名(列操作时必需)" + } + ] + }, + { + "name": "alter_pipe", + "description": "修改 PIPE 属性。支持的操作:suspend/resume、set_virtual_cluster、set_batch_interval、set_batch_size、set_max_skip_batch_count、set_copy_job_hint。每次只能修改一个属性。", + "arguments": [ + { + "name": "pipe_name", + "type": "string", + "desc": "PIPE名称" + }, + { + "name": "operation", + "type": "string", + "desc": "操作类型" + }, + { + "name": "virtual_cluster", + "type": "string", + "desc": "虚拟集群名称" + } + ] + }, + { + "name": "modify_dynamic_table_data", + "description": "对动态表执行插入、更新、删除、合并操作。", + "arguments": [ + { + "name": "sql", + "type": "string", + "desc": "要执行的SQL语句(必需)。支持:\n• INSERT INTO table_name VALUES (...)\n• INSERT INTO table_name" + }, + { + "name": "table_name", + "type": "string", + "desc": "目标动态表名称(可选)。\n💡 如果不提供,系统会自动从SQL中提取表名" + } + ] + }, + { + "name": "alter_vcluster", + "description": "修改计算集群(Virtual Cluster)。", + "arguments": [ + { + "name": "cluster_name", + "type": "string", + "desc": "计算集群名称" + }, + { + "name": "operation", + "type": "string", + "desc": "操作类型:\n• RESUME - 启动集群\n• SUSPEND - 停止集群\n• CANCEL_ALL_JOBS - 取消集群中的所有作业\n• SET - 修改" + }, + { + "name": "if_exists", + "type": "boolean", + "desc": "可选,若为 true 则仅在集群存在时执行操作" + } + ] + }, + { + "name": "get_operation_guide", + "description": "获取ClickZetta特定操作和任务的综合指南。", + "arguments": [ + { + "name": "to_do_something", + "type": "string", + "desc": "The thing you want to do, should be one of the following: analyze_slow_query, an" + } + ] + }, + { + "name": "add_knowledge_entry", + "description": "将用户输入的知识添加到向量数据库中。", + "arguments": [ + { + "name": "knowledge_table_name", + "type": "string", + "desc": "目标知识库表名,例如:'product_knowledge', 'technical_specs'等" + }, + { + "name": "knowledge", + "type": "string", + "desc": "要添加的知识内容。示例:\n'云器Lakehouse的SQL是和Spark SQL、Snowflake高度兼容,云器的Zettapark是和pySpark、Sno" + } + ] + }, + { + "name": "get_external_function_guide", + "description": "获取Python外部函数开发的完整指南和最佳实践。", + "arguments": [ + { + "name": "topic", + "type": "string", + "desc": "指南主题" + }, + { + "name": "format", + "type": "string", + "desc": "返回格式" + } + ] + }, + { + "name": "package_external_function", + "description": "智能打包Python外部函数及其依赖。", + "arguments": [ + { + "name": "source_file", + "type": "string", + "desc": "Python源文件路径,如'/path/to/function.py'。与source_content参数互斥" + }, + { + "name": "source_content", + "type": "string", + "desc": "Python源代码内容(推荐)。与source_file参数互斥,避免文件路径问题" + }, + { + "name": "dependencies", + "type": "array", + "desc": "依赖包列表,如['requests', 'numpy==1.21.0']。对于numpy等C扩展包会特别警告" + } + ] + }, + { + "name": "get_external_function_template", + "description": "获取ClickZetta外部函数开发模板。", + "arguments": [ + { + "name": "template_type", + "type": "string", + "desc": "模板类型:\n• basic: 基础函数模板\n• ai_text: AI文本处理函数(摘要、翻译、情感分析)\n• ai_multimodal: AI多模态函数(图" + }, + { + "name": "function_name", + "type": "string", + "desc": "函数名称(用于模板中的类名)" + }, + { + "name": "include_dependencies", + "type": "boolean", + "desc": "是否包含依赖包信息" + } + ] + }, + { + "name": "smart_crawl_to_volume", + "description": "智能抓取URL内容到VOLUME。", + "arguments": [ + { + "name": "url", + "type": "string", + "desc": "要抓取的URL" + }, + { + "name": "volume", + "type": "string", + "desc": "目标ClickZetta Volume" + }, + { + "name": "volume_dir", + "type": "string", + "desc": "目标Volume的子目录" + } + ] + }, + { + "name": "run_happy_paths", + "description": "执行Lakehouse快乐路径演示。", + "arguments": [ + { + "name": "language", + "type": "string", + "desc": "The language for the Happy Path guidance" + } + ] + }, + { + "name": "switch_lakehouse_instance", + "description": "切换多云环境或Lakehouse环境。", + "arguments": [ + { + "name": "connection_name", + "type": "string", + "desc": "要切换到的连接名称(注意:这是配置中的连接名,不是ClickZetta实例ID)" + }, + { + "name": "list_connections", + "type": "boolean", + "desc": "是否列出所有可用连接" + }, + { + "name": "reload", + "type": "boolean", + "desc": "是否重新加载配置文件" + } + ] + }, + { + "name": "smart_crawl_url", + "description": "智能网页内容抓取工具。", + "arguments": [ + { + "name": "url", + "type": "string", + "desc": "要抓取的URL地址" + }, + { + "name": "css_selector", + "type": "string", + "desc": "CSS选择器,用于提取特定内容" + }, + { + "name": "word_count_threshold", + "type": "integer", + "desc": "内容块的最小词数阈值" + } + ] + }, + { + "name": "crawl_single_page", + "description": "单页面网页抓取工具。", + "arguments": [ + { + "name": "url", + "type": "string", + "desc": "要抓取的网页URL" + }, + { + "name": "css_selector", + "type": "string", + "desc": "CSS选择器,用于提取特定内容" + }, + { + "name": "word_count_threshold", + "type": "integer", + "desc": "内容块的最小词数阈值" + } + ] + }, + { + "name": "lakehouse_metadata_insights", + "description": "湖仓元数据洞察工具(仅基于sys.information_schema里的元数据进行分析)", + "arguments": [ + { + "name": "show_capabilities", + "type": "boolean", + "desc": "是否只显示工具能力介绍(不执行分析)。设置为true时,将详细介绍所有可用的分析类别和场景,帮助用户了解工具功能。" + }, + { + "name": "general_guidance", + "type": "boolean", + "desc": "是否提供通用分析指导(不执行分析)。当现有20种预定义分析无法满足需求时,提供基于sys.information_schema的自定义分析指导,包括表结构、分析" + }, + { + "name": "show_sql", + "type": "boolean", + "desc": "是否只显示指定分析对应的SQL查询(不执行分析)。设置为true时,需要同时提供analysis_name参数,将返回该分析所使用的SQL查询语句、查询目的和相" + } + ] + } +] \ No newline at end of file From ffe7f9b59a635ce98913aa6f8f57432c5419bf7a Mon Sep 17 00:00:00 2001 From: yunqiqiliang <132561395+yunqiqiliang@users.noreply.github.com> Date: Fri, 10 Oct 2025 12:01:40 +0800 Subject: [PATCH 02/12] Update icon to SVG format for better scaling --- servers/mcp-clickzetta-server-stdio/server.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/servers/mcp-clickzetta-server-stdio/server.yaml b/servers/mcp-clickzetta-server-stdio/server.yaml index 5f162514..791fa872 100644 --- a/servers/mcp-clickzetta-server-stdio/server.yaml +++ b/servers/mcp-clickzetta-server-stdio/server.yaml @@ -25,7 +25,7 @@ about: - Data import/export with multiple formats - Advanced analytics and insights - Multi-connection support with context switching - icon: https://raw.githubusercontent.com/yunqiqiliang/mcp-clickzetta-server/main/image/logo.png + icon: https://raw.githubusercontent.com/yunqiqiliang/mcp-clickzetta-server/main/image/logo.svg homepage: https://github.com/yunqiqiliang/mcp-clickzetta-server license: Apache-2.0 From e52723494098a4515931c275b537970bdc257a5d Mon Sep 17 00:00:00 2001 From: yunqiqiliang <132561395+yunqiqiliang@users.noreply.github.com> Date: Fri, 10 Oct 2025 14:14:58 +0800 Subject: [PATCH 03/12] fix: Use public Gist URL for logo - Changed from private repo URL to public Gist - Ensures logo is accessible in Docker MCP Catalog --- servers/mcp-clickzetta-server-stdio/server.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/servers/mcp-clickzetta-server-stdio/server.yaml b/servers/mcp-clickzetta-server-stdio/server.yaml index 791fa872..0e3ec3eb 100644 --- a/servers/mcp-clickzetta-server-stdio/server.yaml +++ b/servers/mcp-clickzetta-server-stdio/server.yaml @@ -25,7 +25,7 @@ about: - Data import/export with multiple formats - Advanced analytics and insights - Multi-connection support with context switching - icon: https://raw.githubusercontent.com/yunqiqiliang/mcp-clickzetta-server/main/image/logo.svg + icon: https://gist.githubusercontent.com/yunqiqiliang/56cd2ee3c1d0d4c39de1f729607aeaa0/raw/8023327c55006f51cba3013fd7fac78cab3a7396/clickzetta_logo.svg homepage: https://github.com/yunqiqiliang/mcp-clickzetta-server license: Apache-2.0 From 2b86f1d11288eb676f309a0d947934500278b603 Mon Sep 17 00:00:00 2001 From: yunqiqiliang <132561395+yunqiqiliang@users.noreply.github.com> Date: Fri, 10 Oct 2025 14:29:09 +0800 Subject: [PATCH 04/12] docs: Add comprehensive README for mcp-clickzetta-server - Quick start guide with configuration instructions - Docker run examples and MCP client setup - Usage examples and tool overview - Security best practices - Links to full documentation --- servers/mcp-clickzetta-server-stdio/README.md | 164 ++++++++++++++++++ 1 file changed, 164 insertions(+) create mode 100644 servers/mcp-clickzetta-server-stdio/README.md diff --git a/servers/mcp-clickzetta-server-stdio/README.md b/servers/mcp-clickzetta-server-stdio/README.md new file mode 100644 index 00000000..594b7d45 --- /dev/null +++ b/servers/mcp-clickzetta-server-stdio/README.md @@ -0,0 +1,164 @@ +# ClickZetta Lakehouse MCP Server + +A Model Context Protocol (MCP) server for interacting with ClickZetta Lakehouse platform, providing comprehensive data management and analytics capabilities. + +## Overview + +This server enables AI assistants to interact with ClickZetta Lakehouse through 60+ tools for SQL operations, vector search, data management, and analytics. Perfect for data engineers and analysts working with ClickZetta's cloud-native data lakehouse. + +## Features + +- **SQL Operations**: Execute SELECT, INSERT, UPDATE, DELETE, and DDL statements +- **Vector & Semantic Search**: Knowledge retrieval and similarity search +- **Schema Management**: List tables, describe schemas, manage database objects +- **Data Import/Export**: Multiple format support (CSV, JSON, Parquet, etc.) +- **Advanced Analytics**: Query insights and data analysis +- **Multi-Connection Support**: Manage multiple ClickZetta environments + +## Quick Start + +### Prerequisites + +1. **ClickZetta Account**: [Sign up here](https://accounts.clickzetta.com/register) +2. **Docker**: Ensure Docker is installed and running +3. **Configuration File**: Create `~/.clickzetta/connections.json` + +### Configuration Template + +Download and edit the configuration file: + +```bash +# Create config directory +mkdir -p ~/.clickzetta + +# Download template +curl -o ~/.clickzetta/connections.json \ + https://raw.githubusercontent.com/yunqiqiliang/mcp-clickzetta-server/main/config/connections-template.json + +# Edit with your credentials +nano ~/.clickzetta/connections.json +``` + +Required fields in `connections.json`: +- `username`: Your ClickZetta username +- `password`: Your ClickZetta password +- `service`: API endpoint (e.g., `cn-shanghai-alicloud.api.clickzetta.com`) +- `instance`: Your instance name +- `workspace`: Workspace name +- `schema`: Schema name +- `vcluster`: Virtual cluster name + +### Docker Run + +```bash +docker run -i --rm \ + --stop-timeout 60 \ + -p 8502:8501 \ + -v ${HOME}/.clickzetta:/app/.clickzetta \ + czqiliang/mcp-clickzetta-server:latest +``` + +### MCP Client Configuration + +For Claude Desktop (`claude_desktop_config.json`): + +```json +{ + "mcpServers": { + "mcp-clickzetta-stdio": { + "command": "docker", + "args": [ + "run", + "-i", + "--rm", + "--stop-timeout", "60", + "-p", "8502:8501", + "-v", "${HOME}/.clickzetta:/app/.clickzetta", + "czqiliang/mcp-clickzetta-server:latest" + ] + } + } +} +``` + +## Usage Examples + +Once connected, you can ask your AI assistant: + +- "List all tables in my ClickZetta workspace" +- "Describe the structure of the customer_data table" +- "Run a SQL query to analyze sales by region" +- "Perform vector search for similar product descriptions" +- "Import CSV data into a new table" +- "Switch to my production ClickZetta connection" + +## Configuration Options + +The server supports flexible configuration through: + +1. **Configuration File** (recommended): `~/.clickzetta/connections.json` +2. **Environment Variables**: For Docker deployments +3. **Command-line Parameters**: Override specific settings + +### System Configuration + +Optional settings in `connections.json`: + +```json +{ + "system_config": { + "allow_write": false, + "prefetch": true, + "log_level": "INFO", + "exclude_tools": [] + }, + "connections": [...] +} +``` + +### Security + +- **Read-only by default**: Set `allow_write: true` to enable write operations +- **SQL injection prevention**: Automatic input validation +- **Credential security**: Never commit credentials to version control +- **Volume mount**: Configuration file stays on your local machine + +## Tools Overview + +The server provides 60+ tools across categories: + +- **Query Tools**: `read_query`, `write_query`, `create_table` +- **Schema Tools**: `list_tables`, `describe_table`, `show_object_list` +- **Search Tools**: `vector_search`, `match_all` +- **Data Import**: `import_data_into_table_from_url`, `import_data_into_table_from_database` +- **Analytics**: `append_insight`, `get_knowledge_about_how_to_do_something` +- **Connection Management**: `switch_lakehouse_connection`, `create_lakehouse_connection` +- **Index Management**: `create_index` (VECTOR, INVERTED, BLOOMFILTER) + +Full tool documentation available in [tools.json](tools.json). + +## Documentation + +- **GitHub Repository**: [yunqiqiliang/mcp-clickzetta-server](https://github.com/yunqiqiliang/mcp-clickzetta-server) +- **Configuration Guide**: [Lakehouse MCP Configuration Guide](https://github.com/yunqiqiliang/mcp-clickzetta-server/blob/main/docs/user_guide/Lakehouse_MCP_CONFIGURATION_GUIDE.md) +- **User Guide**: [Complete User Guide](https://github.com/yunqiqiliang/mcp-clickzetta-server/blob/main/docs/user_guide/Lakehouse_MCP_USER_GUIDE.md) +- **Release Notes**: [v2.0.0 Release Notes](https://github.com/yunqiqiliang/mcp-clickzetta-server/blob/main/docs/RELEASE_NOTES_v2.0.0.md) + +## Support + +- **Issues**: [GitHub Issues](https://github.com/yunqiqiliang/mcp-clickzetta-server/issues) +- **ClickZetta Documentation**: [yunqi.tech/documents](https://www.yunqi.tech/documents) +- **License**: Apache-2.0 + +## Version + +Latest version: 3.3+ + +Key updates: +- v3.3: Intelligent session recovery + standard MCP endpoints +- v2.0: Unified configuration system + simplified Docker deployment +- Multi-connection management and environment support + +--- + +**Ready to start?** Create your configuration file and add the server to your MCP client! From 43ae39c6d418951eb0b876ef513bfa610495e94c Mon Sep 17 00:00:00 2001 From: yunqiqiliang <132561395+yunqiqiliang@users.noreply.github.com> Date: Fri, 10 Oct 2025 14:30:46 +0800 Subject: [PATCH 05/12] refactor: Rename server to mcp-clickzetta-server - Simplified directory name from mcp-clickzetta-server-stdio to mcp-clickzetta-server - Updated server name in server.yaml to match - More concise and easier to reference --- .../README.md | 0 .../server.yaml | 2 +- .../tools.json | 0 3 files changed, 1 insertion(+), 1 deletion(-) rename servers/{mcp-clickzetta-server-stdio => mcp-clickzetta-server}/README.md (100%) rename servers/{mcp-clickzetta-server-stdio => mcp-clickzetta-server}/server.yaml (98%) rename servers/{mcp-clickzetta-server-stdio => mcp-clickzetta-server}/tools.json (100%) diff --git a/servers/mcp-clickzetta-server-stdio/README.md b/servers/mcp-clickzetta-server/README.md similarity index 100% rename from servers/mcp-clickzetta-server-stdio/README.md rename to servers/mcp-clickzetta-server/README.md diff --git a/servers/mcp-clickzetta-server-stdio/server.yaml b/servers/mcp-clickzetta-server/server.yaml similarity index 98% rename from servers/mcp-clickzetta-server-stdio/server.yaml rename to servers/mcp-clickzetta-server/server.yaml index 0e3ec3eb..01b8b99b 100644 --- a/servers/mcp-clickzetta-server-stdio/server.yaml +++ b/servers/mcp-clickzetta-server/server.yaml @@ -1,4 +1,4 @@ -name: mcp-clickzetta-server-stdio +name: mcp-clickzetta-server image: czqiliang/mcp-clickzetta-server:latest type: server diff --git a/servers/mcp-clickzetta-server-stdio/tools.json b/servers/mcp-clickzetta-server/tools.json similarity index 100% rename from servers/mcp-clickzetta-server-stdio/tools.json rename to servers/mcp-clickzetta-server/tools.json From d24c42f622aef908559ff49a32f904c2ca92cc01 Mon Sep 17 00:00:00 2001 From: yunqiqiliang <132561395+yunqiqiliang@users.noreply.github.com> Date: Fri, 10 Oct 2025 14:40:55 +0800 Subject: [PATCH 06/12] docs: Add local configuration template and update README - Include connections-template.json in repository - Update README to create config file directly instead of downloading - Resolves issue with private repository file access - Provides working copy-paste configuration example --- servers/mcp-clickzetta-server/README.md | 31 +++++++++++++++---- .../connections-template.json | 26 ++++++++++++++++ 2 files changed, 51 insertions(+), 6 deletions(-) create mode 100644 servers/mcp-clickzetta-server/connections-template.json diff --git a/servers/mcp-clickzetta-server/README.md b/servers/mcp-clickzetta-server/README.md index 594b7d45..3c8f995d 100644 --- a/servers/mcp-clickzetta-server/README.md +++ b/servers/mcp-clickzetta-server/README.md @@ -25,20 +25,39 @@ This server enables AI assistants to interact with ClickZetta Lakehouse through ### Configuration Template -Download and edit the configuration file: +Create the configuration file manually: ```bash # Create config directory mkdir -p ~/.clickzetta -# Download template -curl -o ~/.clickzetta/connections.json \ - https://raw.githubusercontent.com/yunqiqiliang/mcp-clickzetta-server/main/config/connections-template.json +# Create configuration file +cat > ~/.clickzetta/connections.json << 'EOF' +{ + "connections": [ + { + "is_default": true, + "connection_name": "my_clickzetta", + "service": "cn-shanghai-alicloud.api.clickzetta.com", + "username": "YOUR_USERNAME", + "password": "YOUR_PASSWORD", + "instance": "YOUR_INSTANCE", + "workspace": "quick_start", + "schema": "public", + "vcluster": "default_ap" + } + ], + "system_config": { + "allow_write": false, + "prefetch": true, + "log_level": "INFO" + } +} +EOF -# Edit with your credentials +# Edit with your actual credentials nano ~/.clickzetta/connections.json ``` - Required fields in `connections.json`: - `username`: Your ClickZetta username - `password`: Your ClickZetta password diff --git a/servers/mcp-clickzetta-server/connections-template.json b/servers/mcp-clickzetta-server/connections-template.json new file mode 100644 index 00000000..ee626d39 --- /dev/null +++ b/servers/mcp-clickzetta-server/connections-template.json @@ -0,0 +1,26 @@ +{ + "connections": [ + { + "is_default": true, + "connection_name": "my_clickzetta", + "service": "cn-shanghai-alicloud.api.clickzetta.com", + "username": "YOUR_USERNAME", + "password": "YOUR_PASSWORD", + "instance": "YOUR_INSTANCE", + "workspace": "quick_start", + "schema": "public", + "vcluster": "default_ap", + "description": "ClickZetta connection configuration", + "hints": { + "sdk.job.timeout": 300, + "query_tag": "mcp_server" + } + } + ], + "system_config": { + "allow_write": false, + "prefetch": true, + "log_level": "INFO", + "exclude_tools": [] + } +} From f10c63be8a90cb37b473f3ebe5045afd42e378eb Mon Sep 17 00:00:00 2001 From: yunqiqiliang <132561395+yunqiqiliang@users.noreply.github.com> Date: Fri, 10 Oct 2025 14:47:16 +0800 Subject: [PATCH 07/12] docs: Remove private repository links from README - Replace GitHub documentation links with practical inline guides - Add configuration parameter reference table - Add common service endpoints - Add troubleshooting section - Remove inaccessible private repo Issues link - All links now point to public resources (Docker Hub, yunqi.tech) --- servers/mcp-clickzetta-server/README.md | 43 +++++++++++++++++++++---- 1 file changed, 37 insertions(+), 6 deletions(-) diff --git a/servers/mcp-clickzetta-server/README.md b/servers/mcp-clickzetta-server/README.md index 3c8f995d..0d59b19c 100644 --- a/servers/mcp-clickzetta-server/README.md +++ b/servers/mcp-clickzetta-server/README.md @@ -158,14 +158,45 @@ Full tool documentation available in [tools.json](tools.json). ## Documentation -- **GitHub Repository**: [yunqiqiliang/mcp-clickzetta-server](https://github.com/yunqiqiliang/mcp-clickzetta-server) -- **Configuration Guide**: [Lakehouse MCP Configuration Guide](https://github.com/yunqiqiliang/mcp-clickzetta-server/blob/main/docs/user_guide/Lakehouse_MCP_CONFIGURATION_GUIDE.md) -- **User Guide**: [Complete User Guide](https://github.com/yunqiqiliang/mcp-clickzetta-server/blob/main/docs/user_guide/Lakehouse_MCP_USER_GUIDE.md) -- **Release Notes**: [v2.0.0 Release Notes](https://github.com/yunqiqiliang/mcp-clickzetta-server/blob/main/docs/RELEASE_NOTES_v2.0.0.md) +For more information about ClickZetta Lakehouse and MCP server configuration: -## Support +- **Docker Image**: [czqiliang/mcp-clickzetta-server](https://hub.docker.com/r/czqiliang/mcp-clickzetta-server) +- **ClickZetta Platform**: [yunqi.tech/documents](https://www.yunqi.tech/documents) +- **License**: Apache-2.0 + +### Key Configuration Parameters + +| Parameter | Description | Example | +|-----------|-------------|---------| +| `service` | API endpoint based on your region | `cn-shanghai-alicloud.api.clickzetta.com` | +| `instance` | Your instance name from console URL | `19d58db8` | +| `workspace` | Workspace name | `quick_start` | +| `schema` | Schema name | `public` | +| `vcluster` | Virtual cluster name | `default_ap` | + +### Common Service Endpoints + +- **China (Shanghai, Aliyun)**: `cn-shanghai-alicloud.api.clickzetta.com` +- **China (Beijing, Tencent)**: `ap-beijing-tencentcloud.api.clickzetta.com` +- **Singapore (AWS)**: `ap-southeast-1-aws.api.singdata.com` -- **Issues**: [GitHub Issues](https://github.com/yunqiqiliang/mcp-clickzetta-server/issues) +### Troubleshooting + +**Connection Issues**: +- Verify credentials at [accounts.clickzetta.com](https://accounts.clickzetta.com) +- Check service endpoint matches your region +- Ensure instance name is correct (from browser URL) + +**Permission Issues**: +- Set `allow_write: false` for read-only access (recommended) +- Set `allow_write: true` only if you need data modification capabilities + +**Tool Issues**: +- Use `exclude_tools` in system_config to disable specific tools +- Check logs with `log_level: DEBUG` for detailed information + +## Support +- **Issues**: [GitHub Issues](ClickZetta Support via yunqi.tech) - **ClickZetta Documentation**: [yunqi.tech/documents](https://www.yunqi.tech/documents) - **License**: Apache-2.0 From af6444bbae610a9636a5fdbfacc2b706f1a586cf Mon Sep 17 00:00:00 2001 From: yunqiqiliang <132561395+yunqiqiliang@users.noreply.github.com> Date: Fri, 10 Oct 2025 14:52:39 +0800 Subject: [PATCH 08/12] fix: Remove private repository links from server.yaml - Change homepage to public ClickZetta docs - Change project source to Docker Hub - Replace template download URL with inline JSON example - Reference local connections-template.json file - All links now point to accessible public resources --- servers/mcp-clickzetta-server/server.yaml | 38 ++++++++++++++--------- 1 file changed, 23 insertions(+), 15 deletions(-) diff --git a/servers/mcp-clickzetta-server/server.yaml b/servers/mcp-clickzetta-server/server.yaml index 01b8b99b..f1b989e0 100644 --- a/servers/mcp-clickzetta-server/server.yaml +++ b/servers/mcp-clickzetta-server/server.yaml @@ -26,31 +26,39 @@ about: - Advanced analytics and insights - Multi-connection support with context switching icon: https://gist.githubusercontent.com/yunqiqiliang/56cd2ee3c1d0d4c39de1f729607aeaa0/raw/8023327c55006f51cba3013fd7fac78cab3a7396/clickzetta_logo.svg - homepage: https://github.com/yunqiqiliang/mcp-clickzetta-server + homepage: https://www.yunqi.tech/documents license: Apache-2.0 source: - project: https://github.com/yunqiqiliang/mcp-clickzetta-server + project: https://hub.docker.com/r/czqiliang/mcp-clickzetta-server config: description: | Configure ClickZetta Lakehouse connection via mounted configuration file. - Before starting, create a configuration file at ~/.clickzetta/connections.json - based on the template from: - https://raw.githubusercontent.com/yunqiqiliang/mcp-clickzetta-server/main/config/connections-template.json + Create ~/.clickzetta/connections.json with your credentials: - The configuration file should contain your ClickZetta credentials: - - service: API endpoint (e.g., api.clickzetta.com) - - username: Your ClickZetta username - - password: Your ClickZetta password - - instance: Instance name - - workspace: Workspace name - - schema: Schema name - - vcluster: Virtual cluster name (default: default_ap) + { + "connections": [{ + "is_default": true, + "connection_name": "my_clickzetta", + "service": "cn-shanghai-alicloud.api.clickzetta.com", + "username": "YOUR_USERNAME", + "password": "YOUR_PASSWORD", + "instance": "YOUR_INSTANCE", + "workspace": "quick_start", + "schema": "public", + "vcluster": "default_ap" + }], + "system_config": { + "allow_write": false, + "prefetch": true, + "log_level": "INFO" + } + } - The server supports stdio transport for Claude Desktop integration. - Port 8502:8501 is mapped for optional web UI access. + See connections-template.json in this directory for a complete example. + The server uses stdio transport for Claude Desktop integration. volumes: - name: clickzetta-config From e84ef207ff38a6aba704698a6d55eefb8161ef98 Mon Sep 17 00:00:00 2001 From: yunqiqiliang <132561395+yunqiqiliang@users.noreply.github.com> Date: Fri, 10 Oct 2025 15:05:27 +0800 Subject: [PATCH 09/12] docs: Add official documentation links to README - Add Links section following mcp-registry standard format - Include official Lakehouse MCP Server guide at top - Reference Docker Hub, ClickZetta platform, and MCP protocol - Clean up duplicate Support/Version sections - Improve documentation structure and discoverability --- servers/mcp-clickzetta-server/README.md | 27 ++++++++++--------------- 1 file changed, 11 insertions(+), 16 deletions(-) diff --git a/servers/mcp-clickzetta-server/README.md b/servers/mcp-clickzetta-server/README.md index 0d59b19c..fd6c25e6 100644 --- a/servers/mcp-clickzetta-server/README.md +++ b/servers/mcp-clickzetta-server/README.md @@ -156,13 +156,18 @@ The server provides 60+ tools across categories: Full tool documentation available in [tools.json](tools.json). -## Documentation - -For more information about ClickZetta Lakehouse and MCP server configuration: +## Links +- **Official MCP Server Guide**: [Lakehouse MCP Server Documentation](https://www.yunqi.tech/documents/LakehouseMCPServer_intro) - **Docker Image**: [czqiliang/mcp-clickzetta-server](https://hub.docker.com/r/czqiliang/mcp-clickzetta-server) - **ClickZetta Platform**: [yunqi.tech/documents](https://www.yunqi.tech/documents) -- **License**: Apache-2.0 +- **MCP Protocol**: [Model Context Protocol](https://modelcontextprotocol.io) + +## License + +Apache-2.0 + +## Configuration Reference ### Key Configuration Parameters @@ -195,19 +200,9 @@ For more information about ClickZetta Lakehouse and MCP server configuration: - Use `exclude_tools` in system_config to disable specific tools - Check logs with `log_level: DEBUG` for detailed information -## Support -- **Issues**: [GitHub Issues](ClickZetta Support via yunqi.tech) -- **ClickZetta Documentation**: [yunqi.tech/documents](https://www.yunqi.tech/documents) -- **License**: Apache-2.0 - -## Version - -Latest version: 3.3+ +--- -Key updates: -- v3.3: Intelligent session recovery + standard MCP endpoints -- v2.0: Unified configuration system + simplified Docker deployment -- Multi-connection management and environment support +**Ready to start?** Create your configuration file and add the server to your MCP client! --- From aba43377f364928d8e55adac901764a2bc5e3eca Mon Sep 17 00:00:00 2001 From: yunqiqiliang <132561395+yunqiqiliang@users.noreply.github.com> Date: Fri, 10 Oct 2025 15:07:47 +0800 Subject: [PATCH 10/12] docs: Refine README documentation links and cleanup - Update link title to 'Official ClickZetta Lakehouse MCP Server Guide' for clarity - Remove duplicate ending line - Improve readability and precision --- servers/mcp-clickzetta-server/README.md | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/servers/mcp-clickzetta-server/README.md b/servers/mcp-clickzetta-server/README.md index fd6c25e6..1c714a17 100644 --- a/servers/mcp-clickzetta-server/README.md +++ b/servers/mcp-clickzetta-server/README.md @@ -158,7 +158,7 @@ Full tool documentation available in [tools.json](tools.json). ## Links -- **Official MCP Server Guide**: [Lakehouse MCP Server Documentation](https://www.yunqi.tech/documents/LakehouseMCPServer_intro) +- **Official ClickZetta Lakehouse MCP Server Guide**: [Lakehouse MCP Server Documentation](https://www.yunqi.tech/documents/LakehouseMCPServer_intro) - **Docker Image**: [czqiliang/mcp-clickzetta-server](https://hub.docker.com/r/czqiliang/mcp-clickzetta-server) - **ClickZetta Platform**: [yunqi.tech/documents](https://www.yunqi.tech/documents) - **MCP Protocol**: [Model Context Protocol](https://modelcontextprotocol.io) @@ -203,7 +203,3 @@ Apache-2.0 --- **Ready to start?** Create your configuration file and add the server to your MCP client! - ---- - -**Ready to start?** Create your configuration file and add the server to your MCP client! From 13e5e3262a9859eac53ad6f4de54575308807530 Mon Sep 17 00:00:00 2001 From: yunqiqiliang <132561395+yunqiqiliang@users.noreply.github.com> Date: Fri, 10 Oct 2025 15:09:21 +0800 Subject: [PATCH 11/12] docs: Add missing username and password parameters - Add username parameter (ClickZetta account username) - Add password parameter (ClickZetta account password) - Complete all 7 required configuration parameters - Maintain consistent parameter ordering --- servers/mcp-clickzetta-server/README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/servers/mcp-clickzetta-server/README.md b/servers/mcp-clickzetta-server/README.md index 1c714a17..d8d31766 100644 --- a/servers/mcp-clickzetta-server/README.md +++ b/servers/mcp-clickzetta-server/README.md @@ -174,6 +174,8 @@ Apache-2.0 | Parameter | Description | Example | |-----------|-------------|---------| | `service` | API endpoint based on your region | `cn-shanghai-alicloud.api.clickzetta.com` | +| `username` | ClickZetta account username | `user@example.com` | +| `password` | ClickZetta account password | `your_password` | | `instance` | Your instance name from console URL | `19d58db8` | | `workspace` | Workspace name | `quick_start` | | `schema` | Schema name | `public` | From 79544f8b5fb6bed314425c87f6298758f1997a99 Mon Sep 17 00:00:00 2001 From: yunqiqiliang <132561395+yunqiqiliang@users.noreply.github.com> Date: Fri, 10 Oct 2025 16:32:51 +0800 Subject: [PATCH 12/12] docs: translate tools metadata to english --- servers/mcp-clickzetta-server/tools.json | 394 +++++++++++------------ 1 file changed, 197 insertions(+), 197 deletions(-) diff --git a/servers/mcp-clickzetta-server/tools.json b/servers/mcp-clickzetta-server/tools.json index 1bddf024..d3275350 100644 --- a/servers/mcp-clickzetta-server/tools.json +++ b/servers/mcp-clickzetta-server/tools.json @@ -1,12 +1,12 @@ [ { "name": "get_product_knowledge", - "description": "从向量数据库中搜索ClickZetta产品知识,使用语义相似性搜索。", + "description": "Search ClickZetta product knowledge from vector database using semantic similarity search.", "arguments": [ { "name": "question", "type": "string", - "desc": "User question to search, such as 自定义函数, 常用DDL语句, 数据导入导出. The question or topic y" + "desc": "User question to search, for example \"custom functions\", \"common DDL statements\", or \"data import/export\". Provide the question or topic you want to look up." }, { "name": "vector_search_limit_n", @@ -22,12 +22,12 @@ }, { "name": "read_query", - "description": "执行只读SQL查询并返回结果,支持自动结果限制。", + "description": "Execute read-only SQL queries and return results with automatic result limiting.", "arguments": [ { "name": "query", "type": "string", - "desc": "只读SQL查询语句,如SELECT、DESCRIBE、SHOW、EXPLAIN等。使用LIMIT控制结果行数(最大100行)。" + "desc": "Read-only SQL statement such as SELECT, DESCRIBE, SHOW, or EXPLAIN. Use LIMIT to control the number of rows returned (maximum 100)." }, { "name": "verbose", @@ -38,7 +38,7 @@ }, { "name": "vector_search", - "description": "对表执行向量搜索/知识检索/文档检索。", + "description": "Perform vector search/knowledge retrieval/document retrieval on a table.", "arguments": [ { "name": "table_name", @@ -48,18 +48,18 @@ { "name": "content_column_name", "type": "string", - "desc": "可选,存储内容的列名。如不指定会智能推断,优先顺序:text, content, document, body, description 等" + "desc": "Optional column name that stores the document content. If omitted it will be inferred automatically using the priority order: text, content, document, body, description, etc." }, { "name": "embedding_column_name", "type": "string", - "desc": "可选,存储向量的列名。如不指定会智能推断,优先顺序:embeddings, embedding, semantic_vector, vector 等" + "desc": "Optional column name that stores embeddings. If omitted it will be inferred automatically using the priority order: embeddings, embedding, semantic_vector, vector, etc." } ] }, { "name": "match_all", - "description": "使用MATCH_ALL函数对表进行全文搜索。", + "description": "Perform full-text search on a table using the MATCH_ALL function.", "arguments": [ { "name": "table_name", @@ -80,7 +80,7 @@ }, { "name": "write_query", - "description": "执行写操作SQL语句(INSERT/UPDATE/DELETE/CREATE/DROP等)。", + "description": "Execute write operation SQL statements (INSERT/UPDATE/DELETE/CREATE/DROP, etc.).", "arguments": [ { "name": "query", @@ -96,7 +96,7 @@ }, { "name": "switch_context", - "description": "在当前连接内切换上下文(SCHEMA和VCLUSTER),或智能路由到workspace切换。", + "description": "Switch context (SCHEMA and VCLUSTER) within the current connection, or intelligently route to workspace switching.", "arguments": [ { "name": "schema", @@ -117,7 +117,7 @@ }, { "name": "desc_object_history", - "description": "查看对象的历史版本和变更记录。", + "description": "View historical versions and change records of an object.", "arguments": [ { "name": "object_type", @@ -138,12 +138,12 @@ }, { "name": "get_current_context", - "description": "获取当前连接的上下文信息。", + "description": "Get current connection context information.", "arguments": [] }, { "name": "show_table_load_history", - "description": "查询表的COPY操作加载历史记录。", + "description": "Query table COPY operation load history.", "arguments": [ { "name": "table_name", @@ -154,7 +154,7 @@ }, { "name": "show_job_history", - "description": "查询系统级作业执行历史记录。", + "description": "Query system-level job execution history.", "arguments": [ { "name": "limit", @@ -175,101 +175,101 @@ }, { "name": "create_schema", - "description": "创建新的SCHEMA(数据模式)。", + "description": "Create a new SCHEMA (data schema).", "arguments": [ { "name": "schema_name", "type": "string", - "desc": "新建的 schema 名称" + "desc": "Name of the schema to create." }, { "name": "if_not_exists", "type": "boolean", - "desc": "可选,若为 true 则仅在不存在时创建" + "desc": "Optional. When true, create only if the target does not already exist." }, { "name": "comment", "type": "string", - "desc": "可选,schema 的描述性注释" + "desc": "Optional descriptive comment for the schema." } ] }, { "name": "create_catalog_connection", - "description": "创建CATALOG CONNECTION以访问外部元数据目录。", + "description": "Create CATALOG CONNECTION to access external metadata catalogs.", "arguments": [ { "name": "connection_name", "type": "string", - "desc": "CATALOG CONNECTION 名称" + "desc": "Name of the CATALOG CONNECTION to use." }, { "name": "catalog_type", "type": "string", - "desc": "Catalog 类型,支持 HIVE、OSS_CATALOG、DATABRICKS" + "desc": "Catalog type. Supported values: HIVE, OSS_CATALOG, DATABRICKS." }, { "name": "if_not_exists", "type": "boolean", - "desc": "可选,若为 true 则仅在不存在时创建" + "desc": "Optional. When true, create only if the target does not already exist." } ] }, { "name": "create_external_catalog", - "description": "创建EXTERNAL CATALOG以挂载外部元数据目录。", + "description": "Create EXTERNAL CATALOG to mount external metadata catalogs.", "arguments": [ { "name": "catalog_name", "type": "string", - "desc": "EXTERNAL CATALOG 名称,如 my_hive_catalog" + "desc": "Name of the EXTERNAL CATALOG, for example `my_hive_catalog`." }, { "name": "connection", "type": "string", - "desc": "已创建的 CATALOG CONNECTION 名称" + "desc": "Name of the existing CATALOG CONNECTION." }, { "name": "options", "type": "object", - "desc": "可选,OPTIONS 其它参数,键值对" + "desc": "Optional OPTIONS map with additional key-value parameters." } ] }, { "name": "create_external_schema", - "description": "创建EXTERNAL SCHEMA以将外部数据库挂载为Lakehouse模式。", + "description": "Create EXTERNAL SCHEMA to mount external databases as Lakehouse schemas.", "arguments": [ { "name": "schema_name", "type": "string", - "desc": "EXTERNAL SCHEMA 名称,如 my_schema" + "desc": "Name of the EXTERNAL SCHEMA, for example `my_schema`." }, { "name": "connection", "type": "string", - "desc": "已创建的 CATALOG CONNECTION 名称" + "desc": "Name of the existing CATALOG CONNECTION." }, { "name": "database", "type": "string", - "desc": "外部 catalog 下的数据库名" + "desc": "Database name inside the external catalog." } ] }, { "name": "create_external_table", - "description": "根据ClickZetta官方文档创建外部表。", + "description": "Create external tables according to ClickZetta official documentation.", "arguments": [ { "name": "table_name", "type": "string", - "desc": "外部表名称(必需)" + "desc": "External table name (required)." }, { "name": "table_format", "type": "string", - "desc": "外部表格式类型:\n• DELTA - Delta Lake格式,存储在对象存储\n⚠️ 根据ClickZetta官方文档,目前只支持Delta Lake格式\n❌" + "desc": "External table format type:\n- DELTA: Delta Lake format stored in object storage.\nNote: According to ClickZetta documentation, only Delta Lake format is currently supported." }, { "name": "columns", @@ -277,128 +277,128 @@ "string", "array" ], - "desc": "列定义,支持两种格式:\n• 字符串格式: 'order_id INT, product_id STRING, sale_amount DOUBLE'\n• 数组格" + "desc": "Column definitions. Two formats are supported:\n- String form: 'order_id INT, product_id STRING, sale_amount DOUBLE'\n- Array form: ['order_id INT', 'product_id STRING', 'sale_amount DOUBLE']" } ] }, { "name": "create_api_connection", - "description": "创建API CONNECTION用于云函数连接,支持阿里云FC、腾讯云函数、AWS Lambda。", + "description": "Create API CONNECTION for cloud function connectivity, supporting Alibaba Cloud FC, Tencent Cloud Functions, and AWS Lambda.", "arguments": [ { "name": "connection_name", "type": "string", - "desc": "API CONNECTION 名称,如 ai_function_connection" + "desc": "Name of the API CONNECTION, for example `ai_function_connection`." }, { "name": "provider", "type": "string", - "desc": "云函数提供商(必需)" + "desc": "Cloud function provider (required)." }, { "name": "region", "type": "string", - "desc": "云服务区域(必需),如 cn-hangzhou、ap-beijing、us-east-1" + "desc": "Cloud region (required), for example `cn-hangzhou`, `ap-beijing`, or `us-east-1`." } ] }, { "name": "create_storage_connection", - "description": "创建STORAGE CONNECTION以访问外部存储系统。", + "description": "Create STORAGE CONNECTION to access external storage systems.", "arguments": [ { "name": "connection_name", "type": "string", - "desc": "连接名称,如 hdfs_conn、oss_conn、cos_conn、s3_conn" + "desc": "Connection name, for example `hdfs_conn`, `oss_conn`, `cos_conn`, or `s3_conn`." }, { "name": "connection_type", "type": "string", - "desc": "连接类型" + "desc": "Connection type." }, { "name": "endpoint", "type": "string", - "desc": "服务端点地址" + "desc": "Service endpoint address." } ] }, { "name": "create_volume", - "description": "创建EXTERNAL VOLUME以访问对象存储。", + "description": "Create EXTERNAL VOLUME to access object storage.", "arguments": [ { "name": "volume_name", "type": "string", - "desc": "VOLUME 名称,如 sh_image_volume、my_tx_volume、aws_s3_volume_arn" + "desc": "Volume name, for example `sh_image_volume`, `my_tx_volume`, or `aws_s3_volume_arn`." }, { "name": "volume_type", "type": "string", - "desc": "对象存储类型,支持 oss/cos/s3" + "desc": "Object storage type. Supported values: oss, cos, s3." }, { "name": "bucket", "type": "string", - "desc": "对象存储桶名,A bucket name must be comprised of lower-case characters, numbers or dash" + "desc": "Object storage bucket name. Bucket names must contain only lowercase letters, numbers, or hyphens." } ] }, { "name": "create_table", - "description": "创建ClickZetta表,支持完整的CREATE TABLE语法。", + "description": "Create ClickZetta tables with full CREATE TABLE syntax support.", "arguments": [ { "name": "table_name", "type": "string", - "desc": "表名称" + "desc": "Table name." }, { "name": "if_not_exists", "type": "boolean", - "desc": "可选,若为true则仅在表不存在时创建" + "desc": "Optional. When true, create the table only if it does not already exist." }, { "name": "creation_method", "type": "string", - "desc": "表创建方式" + "desc": "Table creation mode." } ] }, { "name": "create_function", - "description": "创建基于SQL的用户自定义函数(UDF)。", + "description": "Create SQL-based User Defined Functions (UDF).", "arguments": [ { "name": "function_name", "type": "string", - "desc": "函数名称,可用schema限定(如:public.my_func)" + "desc": "Function name, optionally qualified with schema (for example `public.my_func`)." }, { "name": "return_type", "type": "string", - "desc": "标量函数返回类型:INT、DOUBLE、STRING、BOOLEAN等" + "desc": "Scalar function return type, such as INT, DOUBLE, STRING, or BOOLEAN." }, { "name": "returns_table", "type": "array", - "desc": "表函数返回结构(与return_type互斥)" + "desc": "Table function return structure (mutually exclusive with `return_type`)." } ] }, { "name": "create_external_function", - "description": "🚀 创建外部函数(EXTERNAL FUNCTION)- 基于云函数服务执行Python/Java代码。", + "description": "🚀 Create EXTERNAL FUNCTION - Execute Python/Java code based on cloud function services.", "arguments": [ { "name": "function_name", "type": "string", - "desc": "外部函数名称,可用schema限定(如:public.my_func)" + "desc": "External function name, optionally schema-qualified (for example `public.my_func`)." }, { "name": "class_name", "type": "string", - "desc": "🎯 函数处理器(Handler)- ClickZetta要求使用module.class格式:\n• ✅ 正确格式:'my_function.my_functio" + "desc": "Function handler. ClickZetta requires the `module.ClassName` format.\n- Example: `my_function.MyHandlerClass`." }, { "name": "resource_uris", @@ -406,218 +406,218 @@ "array", "string" ], - "desc": "📂 函数代码资源位置 - 自动验证文件存在性:\n• 🔍 Volume验证:检查volume://路径的文件是否真实存在\n• ⚠️ 云存储警告:OSS/S3路径无" + "desc": "Function code resource location. The system automatically validates that the file exists.\n- Volume check: verifies that a `volume://` path is present.\n- Cloud storage warning: OSS/S3 paths cannot be fully validated in advance." } ] }, { "name": "create_index", - "description": "创建索引,支持VECTOR/INVERTED/BLOOMFILTER三种类型。", + "description": "Create indexes supporting three types: VECTOR/INVERTED/BLOOMFILTER.", "arguments": [ { "name": "index_type", "type": "string", - "desc": "索引类型" + "desc": "Index type." }, { "name": "index_name", "type": "string", - "desc": "索引名称" + "desc": "Index name." }, { "name": "table_name", "type": "string", - "desc": "表名称(可包含schema)" + "desc": "Table name (schema-qualified if needed)." } ] }, { "name": "create_pipe", - "description": "创建PIPE管道,用于自动化数据导入 - 智能优化版本。", + "description": "Create PIPE pipeline for automated data import - Intelligently optimized version.", "arguments": [ { "name": "pipe_name", "type": "string", - "desc": "PIPE名称(必需)" + "desc": "PIPE name (required)." }, { "name": "target_table", "type": "string", - "desc": "目标表名(智能模式:自动生成COPY语句)" + "desc": "Target table name. In smart mode a COPY statement will be generated automatically." }, { "name": "source_volume", "type": "string", - "desc": "源VOLUME名称(智能模式:自动生成COPY语句)" + "desc": "Source volume name. In smart mode a COPY statement will be generated automatically." } ] }, { "name": "create_table_stream", - "description": "创建表流,用于捕获表的变更数据。", + "description": "Create table stream to capture table change data.", "arguments": [ { "name": "stream_name", "type": "string", - "desc": "流名称" + "desc": "Stream name." }, { "name": "table_name", "type": "string", - "desc": "源表名称" + "desc": "Source table name." }, { "name": "stream_type", "type": "string", - "desc": "流类型" + "desc": "Stream type." } ] }, { "name": "create_dynamic_table", - "description": "创建动态表,自动维护查询结果的实时更新。", + "description": "Create dynamic table that automatically maintains real-time updates of query results.", "arguments": [ { "name": "table_name", "type": "string", - "desc": "动态表名称" + "desc": "Dynamic table name." }, { "name": "query", "type": "string", - "desc": "定义动态表的SQL查询" + "desc": "SQL query that defines the dynamic table." }, { "name": "refresh_mode", "type": "string", - "desc": "刷新模式" + "desc": "Refresh mode." } ] }, { "name": "create_knowledge_base", - "description": "使用非结构化ETL管道从文档构建新的知识库。", + "description": "Build new knowledge base from documents using unstructured ETL pipeline.", "arguments": [ { "name": "documents_source_type", "type": "string", - "desc": "文档源类型,如 'volume' 或 's3' 或 'local'" + "desc": "Document source type, for example `volume`, `s3`, or `local`." }, { "name": "volume_name", "type": "string", - "desc": "Volume名称,volume类型必需" + "desc": "Volume name (required when source type is `volume`)." }, { "name": "documents_source_path", "type": "string", - "desc": "文档源路径,必须由用户提供" + "desc": "Document source path (required)." } ] }, { "name": "create_vcluster", - "description": "创建虚拟计算集群(Virtual Cluster)。", + "description": "Create Virtual Cluster for compute resources.", "arguments": [ { "name": "cluster_name", "type": "string", - "desc": "集群名称" + "desc": "Cluster name." }, { "name": "cluster_type", "type": "string", - "desc": "集群类型" + "desc": "Cluster type." }, { "name": "cluster_size", "type": "integer", - "desc": "集群规格,1-256 CRU" + "desc": "Cluster size in CRUs (1-256)." } ] }, { "name": "generate_external_function_template", - "description": "🚀 生成外部函数模板代码 - 基于clickzetta_aisql项目的成功经验。", + "description": "🚀 Generate external function template code - Based on successful experience from clickzetta_aisql project.", "arguments": [ { "name": "function_name", "type": "string", - "desc": "函数名称,将作为Python类名和ZIP文件名" + "desc": "Function name. It will also be used as the Python class name and ZIP file name." }, { "name": "template_type", "type": "string", - "desc": "模板类型" + "desc": "Template type." }, { "name": "system_prompt", "type": "string", - "desc": "AI系统提示词(仅ai_text_processing类型使用)" + "desc": "AI system prompt (used only for the `ai_text_processing` template)." } ] }, { "name": "test_external_function_locally", - "description": "🧪 本地测试外部函数 - 部署前验证和调试。", + "description": "🧪 Test external function locally - Validate and debug before deployment.", "arguments": [ { "name": "python_file", "type": "string", - "desc": "Python文件路径" + "desc": "Path to a Python file." }, { "name": "function_name", "type": "string", - "desc": "函数名称(可选,自动推断)" + "desc": "Function name (optional). If omitted it will be inferred automatically." }, { "name": "test_cases", "type": "array", - "desc": "测试用例列表" + "desc": "List of test cases." } ] }, { "name": "switch_vcluster_schema", - "description": "切换当前VCLUSTER(虚拟集群)和/或SCHEMA,在当前workspace内切换计算资源和数据范围。", + "description": "Switch current VCLUSTER (virtual cluster) and/or SCHEMA, changing compute resources and data scope within current workspace.", "arguments": [ { "name": "schema_name", "type": "string", - "desc": "要切换到的schema名称(可选)" + "desc": "Schema name to switch to (optional)." }, { "name": "vcluster_name", "type": "string", - "desc": "要切换到的vcluster名称(可选)" + "desc": "VCluster name to switch to (optional)." } ] }, { "name": "switch_workspace", - "description": "切换当前连接的workspace。", + "description": "Switch the current connection's workspace.", "arguments": [ { "name": "workspace_name", "type": "string", - "desc": "目标workspace名称" + "desc": "Target workspace name." }, { "name": "list_workspaces", "type": "boolean", - "desc": "是否列出所有可用的workspace" + "desc": "Whether to list all available workspaces." }, { "name": "update_config", "type": "boolean", - "desc": "是否永久更新连接配置文件" + "desc": "Whether to persistently update the connection configuration file." } ] }, { "name": "show_object_list", - "description": "列出数据库对象,支持智能筛选、统计分析和过滤建议。", + "description": "List database objects with intelligent filtering, statistical analysis, and filtering suggestions.", "arguments": [ { "name": "show_command", @@ -638,7 +638,7 @@ }, { "name": "desc_object", - "description": "获取数据库对象的详细信息。", + "description": "Get detailed information about database objects.", "arguments": [ { "name": "object_type", @@ -659,160 +659,160 @@ }, { "name": "refresh_dynamic_table", - "description": "手动刷新动态表数据。示例:REFRESH DYNAMIC TABLE my_dt;", + "description": "Manually refresh dynamic table data. Example: REFRESH DYNAMIC TABLE my_dt;", "arguments": [ { "name": "table_name", "type": "string", - "desc": "动态表名称" + "desc": "Dynamic table name." } ] }, { "name": "restore_object", - "description": "将表、动态表或物化视图恢复到指定历史时间点。", + "description": "Restore table, dynamic table, or materialized view to specified historical point in time.", "arguments": [ { "name": "object_type", "type": "string", - "desc": "对象类型,支持 'table'、'dynamic table'、'materialized view'" + "desc": "Object type. Supported values: `table`, `dynamic table`, `materialized view`." }, { "name": "object_name", "type": "string", - "desc": "对象名称" + "desc": "Object name." }, { "name": "timestamp", "type": "string", - "desc": "要恢复到的时间点,支持多种格式:\n• 完整格式: '2024-01-26 17:44:45.349'\n• 秒级格式: '2024-01-26 17:44:45'" + "desc": "Point in time to restore to. Supported formats include:\n- Full precision: '2024-01-26 17:44:45.349'\n- Seconds precision: '2024-01-26 17:44:45'" } ] }, { "name": "undrop_object", - "description": "恢复被删除的表、动态表或物化视图。示例:UNDROP TABLE my_table; 支持对象类型:table、dynamic table、materialized view。", + "description": "Recover deleted table, dynamic table, or materialized view. Example: UNDROP TABLE my_table; Supported object types: table, dynamic table, materialized view.", "arguments": [ { "name": "object_type", "type": "string", - "desc": "对象类型,支持 'table'、'dynamic table'、'materialized view'" + "desc": "Object type. Supported values: `table`, `dynamic table`, `materialized view`." }, { "name": "object_name", "type": "string", - "desc": "对象名称" + "desc": "Object name." } ] }, { "name": "drop_object", - "description": "🚨 安全删除各种类型的数据库对象,支持确认机制和UNDROP提示。", + "description": "🚨 Safely drop various types of database objects with confirmation mechanism and UNDROP hints.", "arguments": [ { "name": "object_name", "type": "string", - "desc": "要删除的对象名称" + "desc": "Name of the object to drop." }, { "name": "object_type", "type": "string", - "desc": "对象类型(如TABLE、VIEW、SCHEMA等)" + "desc": "Object type (for example TABLE, VIEW, SCHEMA, etc.)." }, { "name": "if_exists", "type": "boolean", - "desc": "是否使用IF EXISTS(默认True,对象不存在时不报错)" + "desc": "Whether to use IF EXISTS (default true) so the command succeeds even if the object is missing." } ] }, { "name": "manage_share", - "description": "管理SHARE对象 - 统一的跨实例数据共享管理工具。", + "description": "Manage SHARE objects - Unified cross-instance data sharing management tool.", "arguments": [ { "name": "operation", "type": "string", - "desc": "操作类型" + "desc": "Operation type." }, { "name": "share_name", "type": "string", - "desc": "SHARE名称(list操作可选)" + "desc": "SHARE name (optional for list operations)." }, { "name": "table_name", "type": "string", - "desc": "表名(grant_table/revoke_table操作需要)" + "desc": "Table name (required for grant_table/revoke_table operations)." } ] }, { "name": "import_data_src", - "description": "从URL、文件路径或Volume导入数据到表。", + "description": "Import data from URL, file path, or Volume into table.", "arguments": [ { "name": "from_url", "type": "string", - "desc": "数据源地址,支持三种格式(注意格式支持差异):\n\n1. Volume URL (推荐): volume://my_volume/folder/data.json" + "desc": "Data source location. Three formats are supported (each with different capabilities):\n1. Volume URL (recommended): volume://my_volume/folder/data.json" }, { "name": "dest_table", "type": "string", - "desc": "目标表名称" + "desc": "Target table name." }, { "name": "write_mode", "type": "string", - "desc": "数据写入模式:\n• 'create' - 新建表模式,要求目标表不存在,如果表已存在会报错并提示更换表名\n• 'overwrite' - 覆盖模式,替换已存在表" + "desc": "Data write mode:\n- 'create': create a new table; fails if the target table already exists.\n- 'overwrite': replace the existing table." } ] }, { "name": "import_data_from_db", - "description": "从外部数据库导入数据到ClickZetta表。", + "description": "Import data from external database into ClickZetta table.", "arguments": [ { "name": "db_type", "type": "string", - "desc": "数据库类型(如:'mysql'、'postgresql'、'sqlite')" + "desc": "Database type, for example 'mysql', 'postgresql', or 'sqlite'." }, { "name": "host", "type": "string", - "desc": "数据库服务器主机名或IP地址(SQLite不需要)" + "desc": "Database server host name or IP address (not required for SQLite)." }, { "name": "port", "type": "integer", - "desc": "数据库服务器端口号(SQLite不需要)" + "desc": "Database server port (not required for SQLite)." } ] }, { "name": "preview_volume_data", - "description": "对VOLUME上的半结构化文件进行SQL查询分析或导入到表。", + "description": "Perform SQL query analysis on semi-structured files in VOLUME or import into table.", "arguments": [ { "name": "copy_statement", "type": "string", - "desc": "完整的COPY INTO语句,如:COPY INTO target_table FROM @volume/path/ FILE_FORMAT=(TYPE='CS" + "desc": "Complete COPY INTO statement, for example: COPY INTO target_table FROM @volume/path/ FILE_FORMAT=(TYPE='CSV' ...)." }, { "name": "source_volume", "type": "string", - "desc": "VOLUME 名称,如 volume_name、TABLE table_name、USER" + "desc": "Volume name, for example `volume_name`, `TABLE table_name`, or `USER`." }, { "name": "format", "type": "string", - "desc": "文件格式,如 csv、parquet、bson、orc 等" + "desc": "File format, such as csv, parquet, bson, or orc." } ] }, { "name": "add_data_insight", - "description": "添加数据洞察到备忘录中,记录分析过程中发现的重要信息", + "description": "Add data insights to memo, recording important findings discovered during analysis.", "arguments": [ { "name": "insight", @@ -823,170 +823,170 @@ }, { "name": "put_file_to_volume", - "description": "🚀 将文件上传到ClickZetta Lakehouse的VOLUME存储。", + "description": "🚀 Upload files to ClickZetta Lakehouse VOLUME storage.", "arguments": [ { "name": "source_path", "type": "string", - "desc": "文件路径或HTTP(S) URL。如果只提供文件名,会自动在默认上传目录中搜索:\n• /app/.clickzetta/data/uploads (容器环境)\n" + "desc": "File path or HTTP(S) URL. If only a file name is provided, the system searches the default upload directories:\n- /app/.clickzetta/data/uploads (inside the container)\n- ~/.clickzetta/data/uploads (local environment)." }, { "name": "content", "type": "string", - "desc": "📝 直接上传文件内容(文本格式)- 外部函数开发利器:\n• 🎯 主要用途:Python外部函数代码直接上传\n• ✅ 支持格式:.py源码、.sql脚本、.txt" + "desc": "Upload file content directly (text) - ideal for external function development.\n- Primary use: upload Python external function code directly.\n- Supported formats: .py source, .sql scripts, .txt files." }, { "name": "target_volume", "type": "string", - "desc": "🎯 目标Volume存储位置:\n• 📂 推荐Volume:\n - external_functions_prod(生产环境外部函数)\n - external" + "desc": "Target Volume storage location.\n- Recommended volumes:\n - external_functions_prod (production external functions)\n - external_functions_dev (development/testing)\n- You may also provide a custom volume path." } ] }, { "name": "get_file_from_volume", - "description": "将ClickZetta Lakehouse Volume的文件下载到本地目录。", + "description": "Download files from ClickZetta Lakehouse Volume to local directory.", "arguments": [ { "name": "source_volume", "type": "string", - "desc": "源 Volume 名称,如 volume_name、TABLE table_name、USER" + "desc": "Source volume name, for example `volume_name`, `TABLE table_name`, or `USER`." }, { "name": "source_file", "type": "string", - "desc": "Volume 内的文件名,支持逗号分隔或 list" + "desc": "File names inside the Volume. Supports comma-separated values or a list." }, { "name": "target_local_path", "type": "string", - "desc": "本地目标目录路径(可选)。文件将以原名下载到此目录。\n未指定时自动使用默认下载目录:\n• /app/.clickzetta/data/downloads (容器" + "desc": "Local destination directory (optional). Files will be downloaded there using their original names. If omitted, the default download directories are used:\n- /app/.clickzetta/data/downloads (inside the container)\n- ~/.clickzetta/data/downloads (local environment)." } ] }, { "name": "list_files_on_volume", - "description": "列举Volume中的文件列表。", + "description": "List files in Volume.", "arguments": [ { "name": "target_volume", "type": "string", - "desc": "Volume 名称,如 volume_name、TABLE table_name、USER" + "desc": "Volume name, for example `volume_name`, `TABLE table_name`, or `USER`." }, { "name": "target_subdirectory", "type": "string", - "desc": "可选,子目录" + "desc": "Optional subdirectory." }, { "name": "pattern", "type": "string", - "desc": "可选,文件名正则表达式筛选模式(标准regex语法,非shell glob)。\n常用示例:\n• '.*\\.json$' - JSON文件\n• '.*\\.(jso" + "desc": "Optional file-name regular expression filter (standard regex syntax, not shell globbing).\nExamples:\n- '.*\\.json$' - JSON files\n- '.*\\.(json|ndjson)$' - JSON and NDJSON files" } ] }, { "name": "remove_file_from_volume", - "description": "从Volume删除文件或目录。", + "description": "Delete files or directories from Volume.", "arguments": [ { "name": "target_volume", "type": "string", - "desc": "Volume 名称,如 volume_name、TABLE table_name、USER" + "desc": "Volume name, for example `volume_name`, `TABLE table_name`, or `USER`." }, { "name": "target_file", "type": "string", - "desc": "要删除的文件名,支持逗号分隔或 list" + "desc": "File names to delete. Supports comma-separated values or a list." }, { "name": "target_subdirectory", "type": "string", - "desc": "要删除的子目录" + "desc": "Subdirectory to delete." } ] }, { "name": "alter_dynamic_table", - "description": "修改动态表属性。", + "description": "Modify dynamic table properties.", "arguments": [ { "name": "table_name", "type": "string", - "desc": "动态表名称" + "desc": "Dynamic table name." }, { "name": "operation", "type": "string", - "desc": "操作类型。直接支持的操作:\n• suspend - 暂停动态表调度\n• resume - 恢复动态表调度\n• set_comment - 修改表注释\n• ren" + "desc": "Operation type. Supported actions include:\n- suspend: pause dynamic table scheduling\n- resume: resume dynamic table scheduling\n- set_comment: update the table comment\n- rename: rename the table" }, { "name": "column_name", "type": "string", - "desc": "列名(列操作时必需)" + "desc": "Column name (required for column operations)." } ] }, { "name": "alter_pipe", - "description": "修改 PIPE 属性。支持的操作:suspend/resume、set_virtual_cluster、set_batch_interval、set_batch_size、set_max_skip_batch_count、set_copy_job_hint。每次只能修改一个属性。", + "description": "Modify PIPE properties. Supported operations: suspend/resume, set_virtual_cluster, set_batch_interval, set_batch_size, etc.", "arguments": [ { "name": "pipe_name", "type": "string", - "desc": "PIPE名称" + "desc": "PIPE name." }, { "name": "operation", "type": "string", - "desc": "操作类型" + "desc": "Operation type." }, { "name": "virtual_cluster", "type": "string", - "desc": "虚拟集群名称" + "desc": "Virtual cluster name." } ] }, { "name": "modify_dynamic_table_data", - "description": "对动态表执行插入、更新、删除、合并操作。", + "description": "Perform insert, update, delete, and merge operations on dynamic tables.", "arguments": [ { "name": "sql", "type": "string", - "desc": "要执行的SQL语句(必需)。支持:\n• INSERT INTO table_name VALUES (...)\n• INSERT INTO table_name" + "desc": "SQL statement to execute (required). Supported examples:\n- INSERT INTO table_name VALUES (...)\n- INSERT INTO table_name SELECT ..." }, { "name": "table_name", "type": "string", - "desc": "目标动态表名称(可选)。\n💡 如果不提供,系统会自动从SQL中提取表名" + "desc": "Target dynamic table name (optional).\nTip: If omitted, the system will attempt to extract the table name from the SQL." } ] }, { "name": "alter_vcluster", - "description": "修改计算集群(Virtual Cluster)。", + "description": "Modify Virtual Cluster (compute cluster).", "arguments": [ { "name": "cluster_name", "type": "string", - "desc": "计算集群名称" + "desc": "Compute cluster name." }, { "name": "operation", "type": "string", - "desc": "操作类型:\n• RESUME - 启动集群\n• SUSPEND - 停止集群\n• CANCEL_ALL_JOBS - 取消集群中的所有作业\n• SET - 修改" + "desc": "Operation type:\n- RESUME: start the cluster\n- SUSPEND: stop the cluster\n- CANCEL_ALL_JOBS: cancel all running jobs on the cluster\n- SET: modify cluster properties" }, { "name": "if_exists", "type": "boolean", - "desc": "可选,若为 true 则仅在集群存在时执行操作" + "desc": "Optional. When true, perform the action only if the cluster already exists." } ] }, { "name": "get_operation_guide", - "description": "获取ClickZetta特定操作和任务的综合指南。", + "description": "Get comprehensive guides for ClickZetta-specific operations and tasks.", "arguments": [ { "name": "to_do_something", @@ -997,102 +997,102 @@ }, { "name": "add_knowledge_entry", - "description": "将用户输入的知识添加到向量数据库中。", + "description": "Add user-input knowledge to vector database.", "arguments": [ { "name": "knowledge_table_name", "type": "string", - "desc": "目标知识库表名,例如:'product_knowledge', 'technical_specs'等" + "desc": "Target knowledge-base table name, such as 'product_knowledge' or 'technical_specs'." }, { "name": "knowledge", "type": "string", - "desc": "要添加的知识内容。示例:\n'云器Lakehouse的SQL是和Spark SQL、Snowflake高度兼容,云器的Zettapark是和pySpark、Sno" + "desc": "Knowledge content to add. Example:\n\"ClickZetta Lakehouse SQL is highly compatible with Spark SQL and Snowflake. Zettapark integrates seamlessly with PySpark and Snowpark ...\"" } ] }, { "name": "get_external_function_guide", - "description": "获取Python外部函数开发的完整指南和最佳实践。", + "description": "Get complete guide and best practices for Python external function development.", "arguments": [ { "name": "topic", "type": "string", - "desc": "指南主题" + "desc": "Guidance topic." }, { "name": "format", "type": "string", - "desc": "返回格式" + "desc": "Return format." } ] }, { "name": "package_external_function", - "description": "智能打包Python外部函数及其依赖。", + "description": "Intelligently package Python external functions and their dependencies.", "arguments": [ { "name": "source_file", "type": "string", - "desc": "Python源文件路径,如'/path/to/function.py'。与source_content参数互斥" + "desc": "Path to the Python source file (for example '/path/to/function.py'). Mutually exclusive with `source_content`." }, { "name": "source_content", "type": "string", - "desc": "Python源代码内容(推荐)。与source_file参数互斥,避免文件路径问题" + "desc": "Python source code content (recommended). Mutually exclusive with `source_file` to avoid path issues." }, { "name": "dependencies", "type": "array", - "desc": "依赖包列表,如['requests', 'numpy==1.21.0']。对于numpy等C扩展包会特别警告" + "desc": "List of dependency packages, for example ['requests', 'numpy==1.21.0']. A warning is shown for C-extension packages such as numpy." } ] }, { "name": "get_external_function_template", - "description": "获取ClickZetta外部函数开发模板。", + "description": "Get ClickZetta external function development template.", "arguments": [ { "name": "template_type", "type": "string", - "desc": "模板类型:\n• basic: 基础函数模板\n• ai_text: AI文本处理函数(摘要、翻译、情感分析)\n• ai_multimodal: AI多模态函数(图" + "desc": "Template type:\n- basic: basic function template\n- ai_text: AI text processing (summarization, translation, sentiment analysis)\n- ai_multimodal: AI multimodal functions (image, audio, etc.)" }, { "name": "function_name", "type": "string", - "desc": "函数名称(用于模板中的类名)" + "desc": "Function name used as the class name in the generated template." }, { "name": "include_dependencies", "type": "boolean", - "desc": "是否包含依赖包信息" + "desc": "Whether to include dependency information." } ] }, { "name": "smart_crawl_to_volume", - "description": "智能抓取URL内容到VOLUME。", + "description": "Intelligently crawl URL content to VOLUME.", "arguments": [ { "name": "url", "type": "string", - "desc": "要抓取的URL" + "desc": "URL to crawl." }, { "name": "volume", "type": "string", - "desc": "目标ClickZetta Volume" + "desc": "Target ClickZetta Volume." }, { "name": "volume_dir", "type": "string", - "desc": "目标Volume的子目录" + "desc": "Target subdirectory within the Volume." } ] }, { "name": "run_happy_paths", - "description": "执行Lakehouse快乐路径演示。", + "description": "Execute Lakehouse happy path demonstrations.", "arguments": [ { "name": "language", @@ -1103,86 +1103,86 @@ }, { "name": "switch_lakehouse_instance", - "description": "切换多云环境或Lakehouse环境。", + "description": "Switch between multi-cloud or Lakehouse environments.", "arguments": [ { "name": "connection_name", "type": "string", - "desc": "要切换到的连接名称(注意:这是配置中的连接名,不是ClickZetta实例ID)" + "desc": "Connection name to switch to (this is the configuration name, not the ClickZetta instance ID)." }, { "name": "list_connections", "type": "boolean", - "desc": "是否列出所有可用连接" + "desc": "Whether to list all available connections." }, { "name": "reload", "type": "boolean", - "desc": "是否重新加载配置文件" + "desc": "Whether to reload the configuration file." } ] }, { "name": "smart_crawl_url", - "description": "智能网页内容抓取工具。", + "description": "Intelligent web content crawling tool.", "arguments": [ { "name": "url", "type": "string", - "desc": "要抓取的URL地址" + "desc": "URL address to crawl." }, { "name": "css_selector", "type": "string", - "desc": "CSS选择器,用于提取特定内容" + "desc": "CSS selector used to extract specific content." }, { "name": "word_count_threshold", "type": "integer", - "desc": "内容块的最小词数阈值" + "desc": "Minimum word-count threshold for content blocks." } ] }, { "name": "crawl_single_page", - "description": "单页面网页抓取工具。", + "description": "Single-page web crawling tool.", "arguments": [ { "name": "url", "type": "string", - "desc": "要抓取的网页URL" + "desc": "Web page URL to crawl." }, { "name": "css_selector", "type": "string", - "desc": "CSS选择器,用于提取特定内容" + "desc": "CSS selector used to extract specific content." }, { "name": "word_count_threshold", "type": "integer", - "desc": "内容块的最小词数阈值" + "desc": "Minimum word-count threshold for content blocks." } ] }, { "name": "lakehouse_metadata_insights", - "description": "湖仓元数据洞察工具(仅基于sys.information_schema里的元数据进行分析)", + "description": "Lakehouse metadata insights tool (analysis based only on metadata in sys.information_schema).", "arguments": [ { "name": "show_capabilities", "type": "boolean", - "desc": "是否只显示工具能力介绍(不执行分析)。设置为true时,将详细介绍所有可用的分析类别和场景,帮助用户了解工具功能。" + "desc": "Whether to show only the tool capability overview without running any analysis. When true, the tool lists all available analysis categories and scenarios to help users understand its features." }, { "name": "general_guidance", "type": "boolean", - "desc": "是否提供通用分析指导(不执行分析)。当现有20种预定义分析无法满足需求时,提供基于sys.information_schema的自定义分析指导,包括表结构、分析" + "desc": "Whether to provide general analysis guidance without executing it. When the 20 predefined analyses are insufficient, this option offers guidance on creating custom analyses based on sys.information_schema, including table structures, analytical dimensions, and example queries." }, { "name": "show_sql", "type": "boolean", - "desc": "是否只显示指定分析对应的SQL查询(不执行分析)。设置为true时,需要同时提供analysis_name参数,将返回该分析所使用的SQL查询语句、查询目的和相" + "desc": "Whether to show only the SQL query for the specified analysis without executing it. When true, you must also provide `analysis_name`; the tool returns the SQL statement, the analysis objective, and relevant notes." } ] } -] \ No newline at end of file +]