Skip to main content
Glama

get_build_info

Retrieve comprehensive build and runtime details about the MCP server to understand its current configuration and operational status.

Instructions

Get comprehensive build and runtime information about the server

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The MCP tool handler for 'get_build_info' which calls the BuildInfoService to get and format the information, returning it as text content.
    handler: async () => { const info = await buildInfoService.getBuildInfo(); const formattedInfo = buildInfoService.formatBuildInfo(info); return { content: [ { type: "text", text: formattedInfo } ] }; } }
  • Exports the tool registration array for 'get_build_info' including name, description, empty input schema, and handler reference.
    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 } ] }; } } ]; }
  • Core helper method that gathers package, build (git/package timestamp), runtime, environment, and server information.
    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 } }; }
  • TypeScript interface defining the structure of build information returned by getBuildInfo.
    export interface BuildInfo { package: { name: string; version: string; }; build: { timestamp?: string; type: 'git' | 'npm' | 'unknown'; gitCommit?: string; gitBranch?: string; collectionFix?: string; // Version identifier for verification }; runtime: { nodeVersion: string; platform: string; arch: string; uptime: number; memoryUsage: NodeJS.MemoryUsage; }; environment: { nodeEnv?: string; isProduction: boolean; isDevelopment: boolean; isDebug: boolean; isDocker: boolean; dockerInfo?: string; }; server: { startTime: Date; uptime: number; mcpConnection: boolean; }; }
  • Registers the get_build_info tool (and others from getBuildInfoTools) into the main tool registry during server setup.
    // Register build info tools this.toolRegistry.registerMany(getBuildInfoTools(instance));

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/DollhouseMCP/mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server