prom_discover
Identify and list all available metrics in Prometheus for system monitoring and performance analysis using natural language queries on the MCP server.
Instructions
Discover all available metrics
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/tools.ts:109-112 (handler)Handler logic within handleToolCall for the 'prom_discover' tool. It delegates execution to the PrometheusClient's discover method.case 'prom_discover': { result = await prometheusClient.discover(); break; }
- src/prometheus-client.ts:97-100 (helper)Core implementation of metric discovery by querying the Prometheus API endpoint for __name__ label values, returning a list of available metrics.async discover(): Promise<PrometheusResponse<string[]>> { const response = await this.client.get<PrometheusResponse<string[]>>('/api/v1/label/__name__/values'); return response.data; }
- src/tools.ts:39-43 (registration)Registration of the 'prom_discover' tool in the exported tools array, including its description and input schema (no required parameters).{ name: 'prom_discover', description: 'Discover all available metrics', inputSchema: { type: 'object', properties: {} }, },
- src/tools.ts:42-42 (schema)Input schema for prom_discover tool: an empty object, indicating no input parameters are required.inputSchema: { type: 'object', properties: {} },