get_build_info
Retrieve detailed build and runtime information about the DollhouseMCP server to understand its configuration and operational status.
Instructions
Get comprehensive build and runtime information about the server
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/server/tools/BuildInfoTools.ts:11-39 (handler)Main handler implementation for the 'get_build_info' MCP tool. Defines the tool schema (empty input), handler logic that fetches data from BuildInfoService, formats it, and returns as text content.
export function getBuildInfoTools(_server: IToolHandler) { const buildInfoService = BuildInfoService.getInstance(); return [ { tool: { name: 'get_build_info', description: 'Get comprehensive build and runtime information about the server', inputSchema: { type: 'object' as const, properties: {}, required: [] } }, handler: async () => { const info = await buildInfoService.getBuildInfo(); const formattedInfo = buildInfoService.formatBuildInfo(info); return { content: [ { type: "text", text: formattedInfo } ] }; } } ]; } - src/server/ServerSetup.ts:79-79 (registration)Registers the get_build_info tool via getBuildInfoTools during server setup.
this.toolRegistry.registerMany(getBuildInfoTools(instance)); - Input schema definition for get_build_info tool (empty object, no parameters).
inputSchema: { type: 'object' as const, properties: {}, required: [] } - Core helper method that gathers all build, runtime, environment, and server information used by the tool handler.
public async getBuildInfo(): Promise<BuildInfo> { const [packageInfo, gitInfo, dockerInfo] = await Promise.all([ this.getPackageInfo(), this.getGitInfo(), this.getDockerInfo() ]); const buildTimestamp = await this.getBuildTimestamp(); return { package: packageInfo, build: { timestamp: buildTimestamp, type: gitInfo.commit ? 'git' : buildTimestamp ? 'npm' : 'unknown', gitCommit: gitInfo.commit, gitBranch: gitInfo.branch, collectionFix: 'v1.6.9-beta1-collection-fix' // Version identifier for verification }, runtime: { nodeVersion: process.version, platform: process.platform, arch: process.arch, uptime: process.uptime(), memoryUsage: process.memoryUsage() }, environment: { nodeEnv: process.env.NODE_ENV, isProduction: process.env.NODE_ENV === 'production', isDevelopment: process.env.NODE_ENV === 'development', isDebug: process.env.DEBUG === 'true' || process.env.DEBUG === '1', isDocker: dockerInfo.isDocker, dockerInfo: dockerInfo.info }, server: { startTime: this.startTime, uptime: Date.now() - this.startTime.getTime(), mcpConnection: true // We're connected if this method is being called via MCP } }; } - Helper method that formats the raw BuildInfo into user-friendly Markdown text for the tool response.
public formatBuildInfo(info: BuildInfo): string { const lines: string[] = []; lines.push('# 🔧 Build Information\n'); // Package info lines.push('## 📦 Package'); lines.push(`- **Name**: ${info.package.name}`); lines.push(`- **Version**: ${info.package.version}`); lines.push(''); // Build info lines.push('## 🏗️ Build'); lines.push(`- **Type**: ${info.build.type}`); if (info.build.timestamp) { lines.push(`- **Timestamp**: ${info.build.timestamp}`); } if (info.build.gitCommit) { lines.push(`- **Git Commit**: \`${info.build.gitCommit}\``); } if (info.build.gitBranch) { lines.push(`- **Git Branch**: ${info.build.gitBranch}`); } lines.push(''); // Runtime info lines.push('## 💻 Runtime'); lines.push(`- **Node.js**: ${info.runtime.nodeVersion}`); lines.push(`- **Platform**: ${info.runtime.platform}`); lines.push(`- **Architecture**: ${info.runtime.arch}`); lines.push(`- **Process Uptime**: ${this.formatUptime(info.runtime.uptime)}`); lines.push(`- **Memory Usage**: ${this.formatMemory(info.runtime.memoryUsage.heapUsed)} / ${this.formatMemory(info.runtime.memoryUsage.heapTotal)}`); lines.push(''); // Environment info lines.push('## ⚙️ Environment'); lines.push(`- **NODE_ENV**: ${info.environment.nodeEnv || 'not set'}`); lines.push(`- **Mode**: ${info.environment.isProduction ? 'Production' : info.environment.isDevelopment ? 'Development' : 'Unknown'}`); lines.push(`- **Debug**: ${info.environment.isDebug ? 'Enabled' : 'Disabled'}`); lines.push(`- **Docker**: ${info.environment.isDocker ? 'Yes' : 'No'}`); if (info.environment.dockerInfo) { lines.push(`- **Container**: ${info.environment.dockerInfo}`); } lines.push(''); // Server info lines.push('## 🚀 Server'); lines.push(`- **Started**: ${info.server.startTime.toISOString()}`); lines.push(`- **Uptime**: ${this.formatUptime(info.server.uptime / 1000)}`); lines.push(`- **MCP Connection**: ${info.server.mcpConnection ? '✅ Connected' : '❌ Disconnected'}`); return lines.join('\n'); }