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
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "prom_discover"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
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: {} }, }, - src/tools.ts:109-112 (handler)Dispatch handler in handleToolCall that invokes prometheusClient.discover() for the 'prom_discover' tool.
case 'prom_discover': { result = await prometheusClient.discover(); break; } - src/prometheus-client.ts:97-100 (handler)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; }