Get Build Info
prometheus_build_infoRetrieve the Prometheus build version and configuration details to verify your monitoring setup.
Instructions
Get Prometheus build information
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/prometheus/client.ts:293-296 (handler)The actual handler (getBuildInfo) that executes the tool logic by calling the Prometheus API endpoint /api/v1/status/buildinfo
async getBuildInfo(): Promise<BuildInfo> { const endpoint = "/api/v1/status/buildinfo"; return this.request<BuildInfo>(endpoint); } - src/server/tools.ts:160-168 (registration)Registration of the 'prometheus_build_info' tool using defineTool, binding it to client.getBuildInfo()
defineTool<typeof EmptySchema, BuildInfo>({ capability: "info", name: "prometheus_build_info", title: "Get Build Info", description: "Get Prometheus build information", inputSchema: EmptySchema, type: "readonly", handle: async (client: PrometheusClient) => client.getBuildInfo(), }), - src/types/prometheus.d.ts:166-179 (schema)Type definition for BuildInfo output schema (version, revision, branch, buildUser, buildDate, goVersion)
export type BuildInfo = { /** Version */ version: string; /** Revision */ revision: string; /** Branch */ branch: string; /** Build user */ buildUser: string; /** Build date */ buildDate: string; /** Go version */ goVersion: string; }; - src/types/prometheus-types.ts:15-15 (schema)Re-export of BuildInfo type from prometheus.d.ts
export type BuildInfo = Prometheus.BuildInfo; - src/server/tools.ts:45-47 (helper)The defineTool helper function used to create the tool definition with proper typing
function defineTool<T extends z.Schema, U>(tool: Tool<T, U>): Tool<T, U> { return tool; }