Skip to main content
Glama

getCurrentTimestamp

Retrieve the current local timestamp in seconds or milliseconds for precise time synchronization or logging in the Whistle MCP Server environment.

Instructions

获取当前本地时间戳

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The execute handler for the getCurrentTimestamp tool, which returns the current Unix timestamp in milliseconds using Date.now(), wrapped in the standard response format.
    execute: async () => {
      const timestamp = Date.now();
      return formatResponse({ timestamp });
    },
  • src/index.ts:454-462 (registration)
    Registration of the getCurrentTimestamp tool using server.addTool, including name, description, empty Zod input schema, and inline handler function.
    server.addTool({
      name: "getCurrentTimestamp",
      description: "获取当前本地时间戳",
      parameters: z.object({}),
      execute: async () => {
        const timestamp = Date.now();
        return formatResponse({ timestamp });
      },
    });
  • Shared helper function that formats tool outputs into the MCP-standard content array with JSON-stringified text payload. Used by getCurrentTimestamp and all other tools.
    function formatResponse(data: any) {
      return {
        content: [
          {
            type: "text" as const,
            text: JSON.stringify(data),
          },
        ],
      };
    }
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. The description only states what the tool does (gets timestamp) without mentioning any behavioral traits like whether it's read-only, if it has side effects, performance characteristics, or error conditions. For a tool with zero annotation coverage, this is a significant gap in transparency.

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

Conciseness5/5

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

The description is a single, efficient Chinese phrase that directly states the tool's purpose with zero wasted words. It's appropriately sized for a simple, parameterless tool and is front-loaded with the essential information.

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

Completeness3/5

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

Given the tool's simplicity (0 parameters, no output schema), the description is minimally complete. However, without annotations or output schema, it doesn't specify what format the timestamp returns (e.g., Unix timestamp, ISO string) or any behavioral context. For a tool that likely returns data, more detail about the return value would improve completeness.

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 schema fully documents the absence of parameters. The description doesn't need to compensate for any parameter gaps. A baseline of 4 is appropriate since there are no parameters to explain, and the description correctly implies no input is needed.

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 '获取当前本地时间戳' (Get current local timestamp) clearly states the tool's purpose with a specific verb ('获取' - get) and resource ('当前本地时间戳' - current local timestamp). It distinguishes itself from all sibling tools which are related to rules, groups, values, and proxy/interception management, making its purpose distinct. However, it doesn't specify the format or units of the timestamp, which prevents a perfect score.

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

Usage Guidelines3/5

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

The description implies usage context (when you need the current local timestamp) but doesn't provide explicit guidance on when to use this tool versus alternatives. No sibling tools appear to offer similar timestamp functionality, so there's no need for differentiation, but the description lacks any explicit usage instructions, prerequisites, or exclusions.

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/7gugu/whistle-mcp'

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