Skip to main content
Glama

Assert metrics

assert-metrics
DestructiveIdempotent

Writes externally-observed metric values (usage counts, marketing numbers, hand-carried figures) into the period's standing factset_type='metric' FactSet with AssertedProvenance — the observation sibling of compute-metrics. One standing FactSet per (structure, entity, period_end); re-asserting a period replaces its facts. Structures carrying Derive rules are compute-owned and rejected: asserted and derived metric series keep disjoint structures. Observations must resolve to concepts on the structure's presentation catalog. Deterministic and non-AI — no credits consumed.

Example tool call

This call uses example arguments supplied in the tool’s input schema.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "period_end": "2026-07-31",
      "observations": [
        {
          "qname": "rsx:GithubStars",
          "value": 1240
        },
        {
          "qname": "rsx:NpmDownloads",
          "value": 3811
        }
      ],
      "period_start": "2026-07-01",
      "structure_id": "str_growth_metrics",
      "source_system": "content-machine"
    },
    "name": "assert-metrics"
  }
}

Input Schema

NameRequiredDescriptionDefault
entity_idNoThe entity the asserted values belong to, by id. Omit for the group parent.
basis_noteNoFree-text basis / source reference for the observations.
period_endYesPeriod end the observations are for — instant concepts (a follower count at month end) land as of this date; duration concepts (monthly downloads) end on it.
observationsYesObserved values, one per metric concept — duplicates rejected.
period_startNoWindow start for duration concepts and the standing FactSet's period_start. Instant concepts ignore it.
structure_idYesMetric block structure (block_type='metric') to assert into.
source_systemYesIdentifier of the asserting system (e.g. 'content-machine') — recorded as the AssertedProvenance source_system.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.5/5.0
Behavior5/5

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

Annotations declare destructiveHint=true and idempotentHint=true, but the description explains the actual mechanism: re-asserting a period replaces its facts, and there is one standing FactSet per (structure, entity, period_end). It also discloses the rejection behavior for derive-rule structures and that the operation is deterministic with no credits consumed — context not available from the schema or annotations.

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 the core action and the compute-metrics relationship, then layers constraints in a logical order; no sentence is filler. It is dense and parenthetical-heavy ('— one standing FactSet per (structure, entity, period_end), the accumulating time series'), which slightly impedes scanning.

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?

Covers replacement semantics, structure disjointness, validation preconditions and cost for a mutation tool with no output schema. It does not say what the call returns (e.g. the resulting FactSet identifier) or what authorization is required, which leaves a minor gap for callers.

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

Parameters3/5

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

Schema description coverage is 100%, so the schema already documents each parameter, establishing a baseline of 3. The description adds conceptual framing for period_end (instant vs duration concepts) and period_start (window for duration concepts), but most parameter meaning still comes from the schema itself.

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?

States a specific verb and resource ('Writes externally-observed metric values ... into the period's standing factset_type="metric" FactSet with AssertedProvenance') and immediately positions itself against a named sibling ('the observation sibling of compute-metrics'). An agent can distinguish it from compute-metrics without opening either schema.

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

Usage Guidelines5/5

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

Gives concrete use cases (usage counts, marketing numbers, hand-carried figures) and an explicit exclusion rule: structures carrying Derive rules are compute-owned and rejected, so derived series must go to compute-metrics. It also states the validation precondition that observations must resolve to concepts on the structure's presentation catalog.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.