Skip to main content
Glama

polaris_measurement_sources

Manage Prometheus measurement sources: create draft connections, verify provider probes, validate PromQL queries, then activate or retire within a squad's fitness functions.

Instructions

Manage measurement sources: squad-owned connections to pull providers.

Lifecycle: create → DRAFT, then check_connection must succeed, then activate. Retirement is rejected (409) while an active fitness-function version still depends on the source.

Actions and required parameters:

  • list: squad_id (optional limit/cursor/all_pages)

  • get: source_id

  • create: squad_id + name + provider_type (PROMETHEUS) + base_url (optional description). Never include credentials; none are stored or returned. Created in DRAFT.

  • check_connection: source_id — probes the provider; retained as evidence. A failed probe yields 422 with the provider error in the detail.

  • validate_query: source_id + query (a MetricQuery object; optional execute_sample=true also executes it once and returns the sample value with provider evidence). Query keys (camelCase): criterionKey, expression (PromQL), mode (INSTANT|RANGE), reduction (LAST|MIN|MAX|AVERAGE|SUM|COUNT), seriesPolicy (REQUIRE_SINGLE_SERIES|REDUCE_ACROSS_SERIES| ERROR_ON_MULTIPLE_SERIES), unit, plus lookbackSeconds/stepSeconds for RANGE.

  • activate: source_id (optional reason, e.g. which check id was reviewed)

  • retire: source_id (optional reason)

Source JSON: {id, parentId: squadId, kind: "measurement-source", status: DRAFT|ACTIVE|RETIRED, revision, data: {name, providerType, baseUrl, description?}, ...}.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameNo
limitNo
queryNo
actionYes
cursorNo
reasonNo
base_urlNo
squad_idNo
all_pagesNo
source_idNo
descriptionNo
provider_typeNo
execute_sampleNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.5/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does well: it discloses the DRAFT→ACTIVE→RETIRED state machine, the 409 rejection when a fitness-function version still depends on the source, the 422 behavior on failed probes with provider error in the detail, and that credentials are never stored or returned. It omits permission/auth requirements and whether create is idempotent, so not a perfect 5.

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

Conciseness4/5

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

Front-loads purpose then lifecycle, then breaks actions into a scannable bulleted list with required params, so the density is justified. It is long, but nearly every line carries actionable information; minor tightening is possible in the action list.

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

Completeness5/5

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

For a 13-parameter multi-action tool with no output schema and no annotations, the description supplies the return shape (source JSON with id, parentId, kind, status, revision, data), the error contract (409, 422), and per-action requirements. Nothing essential for correct invocation appears missing.

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

Parameters5/5

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

Schema coverage is 0% for 13 parameters, yet the description maps every action to its required arguments (list→squad_id, get→source_id, create→squad_id+name+provider_type+base_url, etc.) and fully specifies the nested MetricQuery keys in camelCase with their allowed values. This more than compensates for the empty schema descriptions.

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?

Opens with a specific verb+resource ('Manage measurement sources: squad-owned connections to pull providers') and immediately differentiates itself from sibling tools like polaris_measurement_providers and polaris_measurement_producers by scoping to squad-owned provider connections. An agent can identify the tool's domain without opening the schema.

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

Usage Guidelines4/5

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

The lifecycle sentence ('create → DRAFT, then check_connection must succeed, then activate') tells the agent the required ordering and prerequisites for each action, and each action lists its required parameters. It does not explicitly name alternative sibling tools to use instead, so it falls short of a 5.

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