get_current_time
Retrieve the current date and time for timestamping, scheduling, or time-sensitive operations.
Instructions
返回当前的日期和时间
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "get_current_time"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/index.ts:33-35 (registration)Registers the 'get_current_time' MCP tool with an empty parameter schema and an inline async handler that returns the current date and time in ISO string format.
server.tool("get_current_time", "返回当前的日期和时间", {}, async () => ({ content: [{ type: "text", text: new Date().toISOString() }], }));