Skip to main content
Glama

polaris_fitness_functions

Manage fitness functions by creating, versioning, validating, activating, and retiring definitions with immutable draft-then-activate history.

Instructions

Manage fitness functions: versioned definitions of intent, scope, criteria, acquisition, freshness, and enforcement. Definitions evolve as immutable draft-then-activate versions.

Actions and required parameters:

  • list: squad_id — the squad's functions with full version history (limit/cursor/all_pages)

  • get: fitness_function_id — aggregate with lifecycle (DRAFT|ACTIVE|RETIRED), revision, and complete version history

  • create: squad_id + definition — creates the function with draft version 1

  • add_version: fitness_function_id + definition — appends a new draft version (guarded by If-Match: pass the aggregate revision explicitly, or omit it to use the current one)

  • update_draft_version: fitness_function_id + version + definition — replaces a still-DRAFT version (If-Match as above; activated versions are immutable)

  • validate_version: fitness_function_id + version — re-runs validation without side effects

  • activate_version: fitness_function_id + version (optional reason) — makes it the active definition; evaluations then use it

  • retire: fitness_function_id (optional reason) — terminal; history stays queryable

definition is a JSON object with camelCase keys (Polaris FitnessDefinition): required: name; purpose; objective; targetIds (array of the squad's fitness-target ids); criteria (array of {key (pattern ^[a-z][a-z0-9_]{0,62}$, unit, warningComparison?, warningValue?, failureComparison (GREATER_THAN|GREATER_THAN_OR_EQUAL|LESS_THAN|LESS_THAN_OR_EQUAL| EQUAL|NOT_EQUAL), failureValue, required?}); acquisition ({mode: "PUSH", producerId, maximumObservationAgeSeconds} or {mode: "PULL", sourceId, trigger: SCHEDULED|ON_DEMAND, intervalSeconds? (>=60, SCHEDULED only), timeoutSeconds (1-30), queries: array of {criterionKey, expression (PromQL), mode: INSTANT|RANGE, lookbackSeconds?, stepSeconds?, reduction (LAST|MIN|MAX|AVERAGE|SUM|COUNT), seriesPolicy (REQUIRE_SINGLE_SERIES|REDUCE_ACROSS_SERIES|ERROR_ON_MULTIPLE_SERIES), unit} covering every criterion key}); freshnessSeconds (how long an evaluation stays fresh); enforcement (OBSERVE|WARN|BLOCK); optional: characteristic (e.g. RELIABILITY), changeRationale. Warning thresholds must be milder than failure thresholds when both are declared.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNo
actionYes
cursorNo
reasonNo
versionNo
revisionNo
squad_idNo
all_pagesNo
definitionNo
fitness_function_idNo

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 whole burden and largely succeeds: it discloses that versions are immutable after activation, that If-Match can be passed explicitly via `revision` or defaulted to the current one, that retire is terminal while history stays queryable, and that validation has no side effects. It omits permission/auth requirements, error behavior, and pagination semantics for limit/cursor/all_pages.

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

Conciseness5/5

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

Front-loaded one-line purpose followed by a scannable action/required-parameter list and then a nested spec for the one complex object argument. Despite its length, nearly every line conveys routing or schema information the agent cannot get elsewhere, so it is dense rather than padded.

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

Completeness4/5

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

For a ten-parameter, eight-action tool with no annotations and no output schema, the description covers the action surface, concurrency model, lifecycle transitions, and the full definition contract. It stops short of describing return shapes or pagination limits, which leaves some inference required for list/get responses.

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 description coverage is 0%, yet the description documents almost every parameter in context: squad_id, fitness_function_id, version, revision (If-Match), reason, and the limit/cursor/all_pages pagination set per action. The `definition` param — otherwise an opaque object — is spelled out in detail including required fields, camelCase key convention, criterion key pattern, enum values for comparisons and reduction/seriesPolicy, and the warning-vs-failure threshold constraint.

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?

The opening sentence names a specific resource ('fitness functions: versioned definitions of intent, scope, criteria, acquisition, freshness, and enforcement') and the rest of the description enumerates all eight actions with their required parameters. An agent can distinguish this definition-management tool from siblings like polaris_evaluations or polaris_fitness_targets without opening any 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 description gives clear per-action context: validate_version 're-runs validation without side effects', activate_version makes evaluations use the definition, retire is terminal, and update_draft_version only touches still-DRAFT versions. It does not, however, point the agent to sibling tools for adjacent tasks (e.g., polaris_fitness_function_templates for template-based creation), so the routing guidance is strong but not complete.

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