Skip to main content
Glama
aliyun

Alibaba Cloud Observability MCP Server

Official
by aliyun

sls_get_current_time

Retrieve the current timestamp and formatted time string to set query time ranges or perform time calculations in SLS queries on Alibaba Cloud Observability MCP Server.

Instructions

获取当前时间信息。

        ## 功能概述

        该工具用于获取当前的时间戳和格式化的时间字符串,便于在执行SLS查询时指定时间范围。

        ## 使用场景

        - 当需要获取当前时间以设置查询的结束时间
        - 当需要获取当前时间戳进行时间计算
        - 在构建查询时间范围时使用当前时间作为参考点

        ## 返回数据格式

        返回包含两个字段的字典:
        - current_time: 格式化的时间字符串 (YYYY-MM-DD HH:MM:SS)
        - current_timestamp: 整数形式的Unix时间戳(秒)

        Args:
            ctx: MCP上下文

        Returns:
            包含当前时间信息的字典
        

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior4/5

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

With no annotations provided, the description carries full burden and does well by disclosing the return format (dictionary with current_time and current_timestamp fields), data formats (YYYY-MM-DD HH:MM:SS string and Unix timestamp in seconds), and context about SLS query usage. It doesn't mention performance characteristics or error conditions, but provides substantial behavioral context.

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?

The description is well-structured with clear sections (功能概述, 使用场景, 返回数据格式) and efficiently communicates essential information. While slightly verbose due to the section headers, every sentence adds value and the information is appropriately front-loaded with the core purpose first.

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

Completeness5/5

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

For a zero-parameter tool with no annotations and no output schema, the description provides complete context: clear purpose, specific usage scenarios, detailed return format with field descriptions and data types. This gives the agent everything needed to understand when and how to use this tool effectively.

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

Parameters4/5

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

The tool has 0 parameters with 100% schema description coverage, so the baseline would be 4. The description correctly notes 'Args: ctx: MCP上下文' which acknowledges the context parameter, though this is standard for MCP tools. It adds no additional parameter semantics beyond what's implied by having no parameters.

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

Purpose5/5

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

The description clearly states the tool's purpose: '获取当前时间信息' (get current time information). It specifies the exact resource (timestamp and formatted time string) and distinguishes it from sibling tools like sls_execute_query or sls_describe_logstore by focusing solely on time retrieval rather than query execution or metadata inspection.

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

Usage Guidelines5/5

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

The '使用场景' (usage scenarios) section explicitly lists three specific situations when to use this tool: setting query end times, performing timestamp calculations, and using current time as a reference point for query time ranges. This provides clear guidance on when this tool is appropriate versus alternatives.

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

Related 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/aliyun/alibabacloud-observability-mcp-server'

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