Skip to main content
Glama

list_sites

Retrieve and filter sites managed under your account to view names, statuses, configurations, and other details using the ESA MCP Server.

Instructions

用于查询当前用户下的站点列表 ,包括站点的名称、状态、配置等信息。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
siteNameNo站点名称。用于查询的过滤条件。
siteSearchTypeNo站点名称的搜索匹配模式。默认为精确匹配,取值:; - **prefix**:前缀匹配。; - **suffix**:后缀匹配。; - **exact**:精确匹配。; - **fuzzy**:模糊匹配。
pageNumberNo页码。默认值:**1**。
pageSizeNo分页大小。默认值:**500**。
tagFilterNo标签过滤规则。
resourceGroupIdNo资源组ID。用于查询的过滤条件。
statusNo站点状态。用于查询的过滤条件。
onlyEnterpriseNo仅企业版,传**true**时代表仅查询企业版的站点。
planSubscribeTypeNo套餐订阅类型。取值:; - **basicplan**: 基础版。; - **standardplan**:标准版。; - **advancedplan**:高级版。; - **enterpriseplan**:企业版。
coverageNo加速区域。取值:; - **domestic**:仅中国内地。; - **global**:全球。; - **overseas**:全球(不包含中国内地)。
accessTypeNo接入类型。取值:; - **NS**:通过NS托管接入。; - **CNAME**:通过CNAME接入。
orderByNo排序字段,默认按照创建时间排序,支持; - gmtCreate:站点创建时间; - visitTime:站点访问时间

Implementation Reference

  • The primary handler function for the 'list_sites' MCP tool. It receives the tool call request, invokes the ESA API via the service client with the provided arguments cast to ListSitesRequest, and returns the response as a JSON string in the tool content.
    export const list_sites = async (request: CallToolRequest) => { const res = await api.listSites(request.params.arguments as ListSitesRequest); return { content: [{ type: 'text', text: JSON.stringify(res) }], success: true, }; };
  • The Tool definition for 'list_sites' including name, description, and detailed inputSchema for validation.
    export const LIST_SITES_TOOL: Tool = { name: 'list_sites', description: '用于查询当前用户下的站点列表 ,包括站点的名称、状态、配置等信息。', inputSchema: { type: 'object', properties: { siteName: { type: 'string', description: '站点名称。用于查询的过滤条件。', }, siteSearchType: { type: 'string', description: '站点名称的搜索匹配模式。默认为精确匹配,取值:; - **prefix**:前缀匹配。; - **suffix**:后缀匹配。; - **exact**:精确匹配。; - **fuzzy**:模糊匹配。', enum: ['suffix', 'exact', 'prefix', 'fuzzy'], }, pageNumber: { type: 'number', description: '页码。默认值:**1**。', }, pageSize: { type: 'number', description: '分页大小。默认值:**500**。', }, tagFilter: { type: 'array', description: '标签过滤规则。', items: { type: 'object', properties: { key: { type: 'string', description: '标签键,用于查询的过滤条件。', }, value: { type: 'string', description: '标签值,用于查询的过滤条件。', }, }, }, }, resourceGroupId: { type: 'string', description: '资源组ID。用于查询的过滤条件。', }, status: { type: 'string', description: '站点状态。用于查询的过滤条件。', }, onlyEnterprise: { type: 'boolean', description: '仅企业版,传**true**时代表仅查询企业版的站点。', }, planSubscribeType: { type: 'string', description: '套餐订阅类型。取值:; - **basicplan**: 基础版。; - **standardplan**:标准版。; - **advancedplan**:高级版。; - **enterpriseplan**:企业版。', }, coverage: { type: 'string', description: '加速区域。取值:; - **domestic**:仅中国内地。; - **global**:全球。; - **overseas**:全球(不包含中国内地)。', }, accessType: { type: 'string', description: '接入类型。取值:; - **NS**:通过NS托管接入。; - **CNAME**:通过CNAME接入。', }, orderBy: { type: 'string', description: '排序字段,默认按照创建时间排序,支持; - gmtCreate:站点创建时间; - visitTime:站点访问时间', }, }, annotations: {}, }, };
  • The esaHandlers object registers the list_sites handler function (at line 207) as part of the central tool handlers map, likely used for MCP tool dispatching.
    export const esaHandlers: ToolHandlers = { site_active_list, site_match, site_route_list, site_record_list, routine_create, routine_code_commit, routine_delete, routine_list, routine_get, routine_code_deploy, routine_route_list, deployment_delete, route_create, route_delete, route_update, route_get, er_record_create, er_record_delete, er_record_list, html_deploy, create_site, update_site_pause, get_site_pause, create_site_mx_record, create_site_ns_record, create_site_txt_record, create_site_cname_record, create_site_a_or_aaaa_record, update_record, list_records, get_record, delete_record, update_ipv6, get_ipv6, update_managed_transform, get_managed_transform, set_certificate, apply_certificate, get_certificate, delete_certificate, list_certificates, get_certificate_quota, list_sites, };
  • The ESA_OPENAPI_SITE_LIST array includes LIST_SITES_TOOL (line 126), registering the tool schema for site-related operations.
    export const ESA_OPENAPI_SITE_LIST = [ LIST_SITES_TOOL, CREATE_SITE_TOOL, UPDATE_SITE_PAUSE_TOOL, GET_SITE_PAUSE_TOOL, UPDATE_RECORD_TOOL, CREATE_SITE_MX_RECORD_TOOL, CREATE_SITE_NS_RECORD_TOOL, CREATE_SITE_TXT_RECORD_TOOL, CREATE_SITE_CNAME_RECORD_TOOL, CREATE_SITE_A_OR_AAAA_RECORD_TOOL, DELETE_RECORD_TOOL, LIST_RECORDS_TOOL, GET_RECORD_TOOL, ];
  • The service client method listSites that wraps the ESA API call to list sites, used by the tool handler.
    listSites(params: ListSitesRequest) { const request = new ListSitesRequest(params); return this.callApi( this.client.listSites.bind(this.client) as ApiMethod< ListSitesRequest, ListSitesResponse >, request, ); }

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/aliyun/mcp-server-esa'

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