Skip to main content
Glama

list_sites

Retrieve and filter site lists under your account, including site names, statuses, configurations, and tags, using customizable search and pagination options.

Instructions

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

Input Schema

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

Implementation Reference

  • The main handler function that implements the 'list_sites' tool logic. It receives the tool call request, invokes the underlying API service, and returns the response as a JSON string in the expected MCP tool response format.
    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 schema definition for the 'list_sites' tool, including name, description, and detailed input schema with properties for filtering and paginating site lists.
    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: {}, }, };
  • Registration of the 'list_sites' handler in the esaHandlers object, which maps tool names to their handler functions 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, };
  • Registration of the 'list_sites' tool schema in the ESA_OPENAPI_SITE_LIST array, likely used for exposing tools in MCP.
    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, ];
  • Helper method in the API service client that performs the actual 'listSites' API call to Alibaba Cloud ESA, 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