Skip to main content
Glama

lts__ListLogs

Query log entries from a specified Huawei Cloud LTS log stream by time range, keywords, and filters; retrieve paginated results or run SQL analysis queries for troubleshooting and auditing.

Instructions

[LTS] 该接口用于查询指定日志流下的日志内容。

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "end_time": "<end_time>",
      "log_group_id": "<log_group_id>",
      "log_stream_id": "<log_stream_id>",
      "project_id": "<project_id>",
      "start_time": "<start_time>"
    },
    "name": "lts__ListLogs"
  }
}

Input Schema

NameRequiredDescriptionDefault
limitNo表示每次查询的日志条数,不填时默认为50,建议您设置为100。
queryNo使用带管道符的sql分析语句进行查询,需要query参数is_analysis_query为true时生效。
labelsNo日志过滤条件集合,不同日志来源所需字段不同。
is_descNo顺序或者倒序查询, 默认为false(顺序查询)
__time__No若已开启自定义时间功能,需要使用该字段进行分页查询。
end_timeYes搜索结束时间(UTC时间,毫秒级)。
is_countNo日志条数统计。默认为false(不统计),true为统计日志条数。
keywordsNo支持关键词精确搜索。关键词指相邻两个分词符之间的单词,例:error
line_numNo日志单行序列号,第一次查询时不需要此参数,后续分页查询时需要使用,可从上次查询的返回信息中获取。line_num应在start_time 和 end_time 之间。
highlightNo日志关键词高亮显示,默认为true(高亮显示),false为取消高亮显示。
project_idYes项目ID,获取方式请参见:获取账号ID、项目ID、日志组ID、日志流ID(https://support.huaweicloud.com/api-lts/lts_api_0006.html)。None
start_timeYes搜索起始时间(UTC时间,毫秒级)。
search_typeNo首次查询为 “init”, 分页查询时为 “forwards”或者“backwards”, 默认为首次查询“init”, 与 is_desc 参数配合进行分页查询。
is_iterativeNo日志迭代查询,默认为false(不开启迭代),true为开启迭代。
log_group_idYes日志组id。None
log_stream_idYes日志流id。None
is_analysis_queryNo是否为带管道符的sql分析语句。当该参数为true时,将依照body体中的query参数内容进行查询,且body体中除start_time与end_time以外的参数失效,分页、排序、查询结果条数等功能请依照sql语法规则实现。查询结果的响应体不同于未启用时的查询方式,将以默认列存的形式返回查询结果。当前仅对内测用户开放。响应示例:{"analysisLogs":[{"field1":"1","field2":"2","field3":"3"},{"field1":"1","field2":"2","field3":"3"},{"field1":"1","field2":"2","field3":"3"}]}

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.4.0

TDQS

C2.6/5.0
Behavior1/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are supplied, so the description carries the full behavioral burden, and it discloses nothing: not that this is a read-only operation, not the default 50-result cap or 5000 maximum, not the pagination protocol via line_num/__time__/search_type, and not the special analysis-query mode. For a 17-parameter tool with a distinct SQL-analysis path, this is a total gap.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

A single front-loaded sentence with no padding; only the '[LTS]' namespace prefix is dispensable. The problem is under-specification, not verbosity.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness1/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given 17 parameters, an enum on search_type, nested labels, a pagination scheme, and an analysis-query mode that invalidates all other body parameters, one sentence of purpose is nowhere near sufficient. There is no output schema and no annotations to fall back on, so an agent is left to guess at invocation behavior.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema already explains limit, keywords, line_num, is_analysis_query, and the rest in detail. The description adds no meaning beyond it, which meets the baseline of 3 but no higher.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a specific verb and resource: query log content under a named log stream. An agent knows the general operation, but nothing distinguishes it from siblings such as lts__ListQueryStructuredLogs or lts__ListStructuredLogsWithTimeRange, which likely also read logs from a stream.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

There is no when-to-use guidance, no mention of prerequisites (project_id, log_group_id, required time range), and no indication of when a sibling log-query tool would be more appropriate. The agent must infer selection from the name alone.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Deploy Server

Other Tools