Skip to main content
Glama
idanfishman

prometheus-mcp

by idanfishman

Get Build Info

prometheus_build_info
Read-only

Retrieve the Prometheus build version and configuration details to verify your monitoring setup.

Instructions

Get Prometheus build information

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • 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);
    }
  • 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(),
    }),
  • 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;
    };
  • Re-export of BuildInfo type from prometheus.d.ts
    export type BuildInfo = Prometheus.BuildInfo;
  • 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;
    }
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare readOnlyHint=true, so the tool is known to be a safe read operation. The description adds no further behavioral context beyond stating what it does, which is acceptable since annotations carry the safety profile.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single concise sentence that directly states the tool's purpose without extraneous information. Every word earns its place.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given zero parameters, no output schema, and clear annotations, the description is sufficiently complete. It provides the essential purpose without needing elaboration on return values or behavior.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

There are zero parameters, so the baseline is 4. The description does not need to add parameter meaning beyond the schema, which already fully covers the empty parameter set.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description uses the specific verb 'Get' and clearly identifies the resource as 'Prometheus build information'. It unambiguously distinguishes this tool from siblings like 'prometheus_query' or 'prometheus_list_targets' which perform different operations.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No explicit guidance on when to use this tool versus alternatives is provided. The usage is implied by the nature of the tool (retrieving build metadata), but no when-not or alternative tool references are given.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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/idanfishman/prometheus-mcp'

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