get-current-time
Retrieve the current date and time from the minimal MCP server to display accurate temporal information for applications or systems requiring time synchronization.
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-49 (handler)The tool 'get-current-time' is registered and implemented directly in src/index.ts. The handler logic is provided as an async callback within the registerTool function.
server.registerTool( "get-current-time", { description: "現在の日時を取得するツール", }, async () => { const now = new Date(); return { content: [ { type: "text", text: `現在の日時: ${now.toLocaleString()}`, }, ], }; }, );