sls_list_logstores
List all log stores in a specified SLS project, enabling search by name and filtering for metric stores. Use it to retrieve log store details efficiently.
Instructions
列出SLS项目中的日志库。
## 功能概述
该工具可以列出指定SLS项目中的所有日志库,如果不选,则默认为日志库类型
支持通过日志库名称进行模糊搜索。如果不提供日志库名称,则返回项目中的所有日志库。
## 使用场景
- 当需要查找特定项目下是否存在某个日志库时
- 当需要获取项目中所有可用的日志库列表时
- 当需要根据日志库名称的部分内容查找相关日志库时
## 是否指标库
如果需要查找指标或者时序相关的库,请将is_metric_store参数设置为True
## 查询示例
- "我想查询有没有 XXX 的日志库"
- "某个 project 有哪些 log store"
Args:
ctx: MCP上下文,用于访问SLS客户端
project: SLS项目名称,必须精确匹配
log_store: 日志库名称,支持模糊搜索
limit: 返回结果的最大数量,范围1-100,默认10
is_metric_store: 是否指标库,可选值为True或False,默认为False
region_id: 阿里云区域ID
Returns:
日志库名称的字符串列表
Input Schema
Name | Required | Description | Default |
---|---|---|---|
is_metric_store | No | is metric store,default is False,only use want to find metric store | |
limit | No | limit,max is 100 | |
log_store | No | log store name,fuzzy search | |
log_store_type | No | log store type,default is logs,should be logs,metrics | |
project | Yes | sls project name,must exact match | |
region_id | Yes | aliyun region id,region id format like 'xx-xxx',like 'cn-hangzhou' |
Input Schema (JSON Schema)
{
"properties": {
"is_metric_store": {
"default": false,
"description": "is metric store,default is False,only use want to find metric store",
"title": "Is Metric Store",
"type": "boolean"
},
"limit": {
"default": 10,
"description": "limit,max is 100",
"maximum": 100,
"minimum": 1,
"title": "Limit",
"type": "integer"
},
"log_store": {
"default": null,
"description": "log store name,fuzzy search",
"title": "Log Store",
"type": "string"
},
"log_store_type": {
"default": null,
"description": "log store type,default is logs,should be logs,metrics",
"title": "Log Store Type",
"type": "string"
},
"project": {
"description": "sls project name,must exact match",
"title": "Project",
"type": "string"
},
"region_id": {
"description": "aliyun region id,region id format like 'xx-xxx',like 'cn-hangzhou'",
"title": "Region Id",
"type": "string"
}
},
"required": [
"project",
"region_id"
],
"title": "sls_list_logstoresArguments",
"type": "object"
}