Skip to main content
Glama
sunshinerich

grafana-log-mcp

by sunshinerich

list_labels

Discover available log label names (e.g., app, group, host, level) for a data source or project within a time window, enabling precise label-based log queries.

Instructions

列出某数据源(或某项目)在时间窗内可用的日志标签名(如 app/group/host/level)。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
rangeNo时间窗,默认 15m,支持 5m/2h/1d
labelsNo未登记项目直接传标签,如 {"app":"xxx","group":"yyy"}
projectNo项目 key 或中文别名(登记于 projects.json)
datasourceUidNolabels 方式查询时指定数据源 uid
Behavior3/5

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

无注解,描述承担行为披露责任。描述说明了列出可用标签名,但没有说明返回格式、是否只读、是否需要权限、是否有速率限制或缓存行为。对于只读操作未明确声明,但也没有违反。提供的信息有限,但至少说明了功能范围。

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?

描述仅有一句话,非常简洁,直接阐明了工具的核心功能。但句子稍显笼统,未采用结构化形式,不过对于简单工具而言已足够,没有冗余信息。

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

Completeness2/5

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

工具具有 4 个参数和嵌套对象,但无输出 schema 也无注解,描述未说明返回的数据结构或错误处理方式。考虑到兄弟工具众多,描述未提供任何使用上下文或与其他工具的关联,如何时需要先使用 list_datasources 或 list_projects。对于此复杂度的工具,描述明显不完整。

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 对 4 个参数均有描述,覆盖率达 100%,因此基线为 3。描述中提到了'时间窗'对应 range 参数,但未提供超出 schema 的额外信息,如参数的互斥关系或默认行为。描述未详细解释 labels 和 project 的使用差异,但 schema 已提供基础说明。整体未增加显著价值。

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?

描述明确说明工具列出指定数据源或项目在时间窗内可用的日志标签名(如 app/group/host/level),使用动词'列出'和具体资源'日志标签名'。但未明确与兄弟工具如 list_label_values(列出标签值)的区别,不过从名称和描述可推断是列出标签键,整体清晰但未强化区分。

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?

描述仅说明功能,没有提供何时使用此工具 vs 替代方案的指导。未提及何时使用 project 参数 vs labels 参数,也未提及当需要特定标签的取值时应该使用 list_label_values。缺少使用场景和排除条件。

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

Install Server

Other Tools

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/sunshinerich/grafana-log-mcp'

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