Skip to main content
Glama

prometheus_scrape_pool_targets

Retrieve monitoring targets for a specific Prometheus scrape pool to analyze and manage your infrastructure metrics.

Instructions

Get targets for a specific scrape pool

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
scrapePoolYesscrape pool name

Implementation Reference

  • Zod input schema for the prometheus_scrape_pool_targets tool requiring a scrapePool name.
    const PrometheusScrapePoolTargetsSchema = z.object({ scrapePool: z.string().describe("scrape pool name"), });
  • Tool registration including name, schema reference, description, and inline handler that delegates to PrometheusClient.getScrapePoolTargets.
    defineTool<typeof PrometheusScrapePoolTargetsSchema, TargetsResult>({ capability: "discovery", name: "prometheus_scrape_pool_targets", title: "Get Scrape Pool Targets", description: "Get targets for a specific scrape pool", inputSchema: PrometheusScrapePoolTargetsSchema, type: "readonly", handle: async (client: PrometheusClient, args) => client.getScrapePoolTargets(args.scrapePool), }),
  • PrometheusClient.getScrapePoolTargets method called by the tool handler, delegating to listTargets.
    async getScrapePoolTargets(scrapePool: string): Promise<TargetsResult> { return this.listTargets(scrapePool); }
  • Core helper method listTargets that performs the HTTP request to Prometheus /api/v1/targets endpoint with scrapePool parameter if provided.
    async listTargets(scrapePool?: string): Promise<TargetsResult> { const endpoint = "/api/v1/targets"; const params: Record<string, string> = {}; if (scrapePool) { params.scrapePool = scrapePool; } return this.request<TargetsResult>(endpoint, params); }

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