TypeScript Express based MCP server for Aliyun SLS (Simple Log Service). Provides tools for querying logs, projects, logstores, and log distribution from Aliyun's Simple Log Service.
Four tools with complete Zod schemas and detailed descriptions. Tool names follow verb_noun pattern (list_*, query_*, get_*). Descriptions are comprehensive (194 - 1024 chars) and include usage guidance. All parameters have type definitions and descriptions. Tool annotations present (readOnlyHint, idempotentHint). Key gaps: no documented output schemas, no error handling guidance, no pagination metadata in descriptions, and parameter interdependencies (e.g., from/to vs minutes) not fully clarified.
面向 Agent 的应用日志分布查询工具。查询日志分布、SLS 日志分布、线上日志趋势、服务日志趋势;底层数据源是阿里云 SLS。用于判断任意服务的报错是否突增、故障大概从什么时候开始、某个服务最近一段时间或某个明确时间段内是否有 error/warn/info 日志。用户要求"看日志趋势""查日志分布""查 SLS 分布""看报错趋势""最近 N 分钟/小时每段时间多少错误""某个时间段的错误分布""故障从什么时候开始"时,应优先使用本工具。本工具只返回每个时间段的日志数量,不返回日志明细;如果需要具体日志内容,再使用 aliyun_log_query_logs。环境请传 environment,用户说到的服务名或容器名请原样放入 containerNames,日志级别请传 level,traceId/TID 请传 traceId。用户说"最近 N 分钟/小时"时传 minutes;用户说明确时间段,例如"今天 14:00 到 15:00""昨天晚上 8 点到 9 点""2026-06-30 10:00 到 10:30"时,按 Asia/Shanghai 理解并换算成 Unix 秒级时间戳后传 from 和 to。也支持直接传 query 使用 SLS 查询语法。
面向 Agent 的应用日志库列表查询工具。查询某个阿里云日志 Project 下的 Logstore 列表。projectName 必填,logstoreName 支持模糊查询。
面向 Agent 的应用日志项目查询工具。查询账号在指定区域下可访问的 Project。projectName 不传时查询全部 Project。
面向 Agent 的应用日志查询工具。查询日志、SLS 日志、线上日志、服务日志;底层数据源是阿里云 SLS。用于线上故障排查、日常研发查日志、任意服务的报错日志查询、traceId/TID 链路日志查询。用户要求"查日志""查询日志""查 SLS""查询 SLS""查服务日志""查线上日志",或提到 test、staging 等环境,任意服务名/容器名的日志,最近 N 分钟/小时报错日志,某个明确时间段的日志,error/warn/info 日志,traceId/TID 查询时,应优先使用本工具。环境请传 environment,用户说到的服务名或容器名请原样放入 containerNames,日志级别请传 level,traceId/TID 请传 traceId。用户说"最近 N 分钟/小时"时传 minutes;用户说明确时间段,例如"今天 14:00 到 15:00""昨天晚上 8 点到 9 点""2026-06-30 10:00 到 10:30"时,按 Asia/Shanghai 理解并换算成 Unix 秒级时间戳后传 from 和 to。也支持直接传 query 使用 SLS 查询语法。优先传 environment,不传默认 test;也可以直接传 projectName + logstoreName 调试。服务端会把 query、containerNames、level、traceId、keywords 用 and 拼成最终查询条件。传 traceId 且不传 from/to/minutes 时默认查最近 7 天;普通非空查询默认最近 15 分钟。分页时如果返回 nextPage,下一次调用应直接使用 nextPage 参数,避免重新计算时间窗口。
Output schemas not documented. Tool descriptions explain inputs but do not specify what fields/structure the response contains. LLMs cannot plan downstream calls or extract required data without knowing response shape.
Parameter interdependencies not enforced or clearly documented. query_logs accepts both (from/to) and minutes but states they 'cannot be used together' only in description text. No validation or mutual-exclusivity schema constraint. LLMs may pass both, causing ambiguous failures.
No error handling guidance. Descriptions do not explain what errors are possible, how to recover, or what the LLM should do if a query fails (e.g., 'Project not found, try list_projects first'). Raw API errors will confuse agents.
Inferred effective spec: <=2025-11-25.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-23 | C | 61 | <=2025-11-25 | v2 |
Pagination metadata incomplete. list_projects and list_logstores accept offset/size but descriptions do not state whether a total_count or next_cursor is returned. query_logs mentions 'nextPage' in description but schema does not show its structure. Agents cannot reliably iterate through large result sets.
Environment configuration hints embedded in descriptions via buildConfiguredEnvironmentHint(). This is dynamic and context-dependent, making descriptions non-deterministic. Tool descriptions should be static and self-contained; environment mapping should be handled via separate discovery or documentation.