get_basic_details
Retrieve system information including platform, Node version, architecture, current time, and uptime. Optionally include hostname.
Instructions
Returns basic system and runtime details.
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_basic_details"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| includeHostname | No |
Implementation Reference
- server.js:13-43 (registration)Registration of the 'get_basic_details' tool via server.registerTool().
server.registerTool( "get_basic_details", { description: "Returns basic system and runtime details.", inputSchema: { includeHostname: z.boolean().optional() } }, async ({ includeHostname }) => { const details = { platform: process.platform, nodeVersion: process.version, architecture: process.arch, currentTimeIso: new Date().toISOString(), uptimeSeconds: Math.floor(process.uptime()) }; if (includeHostname) { details.hostname = os.hostname(); } return { content: [ { type: "text", text: JSON.stringify(details, null, 2) } ] }; } ); - server.js:15-19 (schema)Input schema defining the optional 'includeHostname' boolean parameter.
{ description: "Returns basic system and runtime details.", inputSchema: { includeHostname: z.boolean().optional() } - server.js:21-42 (handler)The async handler function that collects platform, Node version, architecture, current time, and optionally hostname, then returns them as JSON.
async ({ includeHostname }) => { const details = { platform: process.platform, nodeVersion: process.version, architecture: process.arch, currentTimeIso: new Date().toISOString(), uptimeSeconds: Math.floor(process.uptime()) }; if (includeHostname) { details.hostname = os.hostname(); } return { content: [ { type: "text", text: JSON.stringify(details, null, 2) } ] }; }