get_node_version
Retrieve the Node.js version details for the environment hosting the Local Utilities MCP Server. Use this tool to verify the runtime environment version directly through the MCP server interface.
Instructions
Returns the Node.js version information of the environment running the MCP server.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/mcp/node-version.ts:23-32 (handler)The handler function for the 'get_node_version' tool. It calls getNodeVersionInfo() and returns the version information as a JSON-formatted text response.async () => { // Error handling simplified, process.version/versions are generally safe const versionInfo = getNodeVersionInfo(); return { content: [{ type: "text", text: JSON.stringify(versionInfo, null, 2) // Keep JSON for structured data }] }; }
- src/mcp/node-version.ts:3-6 (schema)TypeScript interface defining the structure of Node.js version information used by the tool.interface INodeVersionInfo { nodeVersion: string; details: NodeJS.ProcessVersions; }
- src/mcp/node-version.ts:20-33 (registration)Registration of the 'get_node_version' tool on the MCP server using server.tool().server.tool( "get_node_version", "Returns the Node.js version information of the environment running the MCP server.", async () => { // Error handling simplified, process.version/versions are generally safe const versionInfo = getNodeVersionInfo(); return { content: [{ type: "text", text: JSON.stringify(versionInfo, null, 2) // Keep JSON for structured data }] }; } );
- src/mcp/node-version.ts:12-17 (helper)Helper function that retrieves the current Node.js version and process versions.export function getNodeVersionInfo(): INodeVersionInfo { // Export for testing return { nodeVersion: process.version, details: process.versions, }; }