Skip to main content
Glama
yanmxa

Prometheus MCP Server

by yanmxa

prom_discover

Discover all available Prometheus metrics to identify what data can be queried for system monitoring and performance analysis.

Instructions

Discover all available metrics

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • src/tools.ts:39-43 (registration)
    Registration of the 'prom_discover' tool in the exported tools array, including name, description, and empty input schema.
    { name: 'prom_discover', description: 'Discover all available metrics', inputSchema: { type: 'object', properties: {} }, },
  • Dispatch handler in handleToolCall that invokes prometheusClient.discover() for the 'prom_discover' tool.
    case 'prom_discover': { result = await prometheusClient.discover(); break; }
  • Core tool implementation: queries Prometheus API to discover available metric names (labels __name__).
    async discover(): Promise<PrometheusResponse<string[]>> { const response = await this.client.get<PrometheusResponse<string[]>>('/api/v1/label/__name__/values'); return response.data; }

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

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