# io.github.jdhart81/agent-metering

> Usage metering + SLA accounting for agent services (the meter behind x402 micropayments).

- name: io.github.jdhart81/agent-metering
- version: 0.2.0
- connection class: R0 (autonomous)
- trust: 79/100 flags: duplicate-repo
- quality: 79/100 (good)
- owner: not claimed
- descriptor: https://api.protogrid.dev/v1/servers/io.github.jdhart81%2Fagent-metering
- tools: https://api.protogrid.dev/v1/servers/io.github.jdhart81%2Fagent-metering/tools

**An agent can connect right now, no human step.** Remote endpoint, no authentication, reachable on the last probe.

## Connection (mcpServers)

```json
{
  "mcpServers": {
    "agent-metering": {
      "type": "http",
      "url": "https://mcp.viridisconservation.com/metering/mcp"
    }
  }
}
```


## Trust

- hygiene: 60
- liveness: 100
- freshness: 65
- provenance: 80
- drivers: +repository +namespace-matches-repo +reachable +uptime-100% ~updated-97d-ago -duplicate-repo(32 names)
- Derived from observable signals (official registry feed and our own credential-free probes); no code audit performed.

## Quality 79/100 (good)

### protocol: 75 (weight 25)

- warn `protocol.modern`: newest supported version is 2025-11-25; 2026-07-28 not supported, older versions are deprecated until 2027-07-28
- n/a `protocol.stateless`: only applies to 2026-07-28 servers
- pass `protocol.transport`: streamable HTTP
- n/a `protocol.list_ttl`: only applies to 2026-07-28 servers

### authorization: n/a (weight 15)

- n/a `auth.prm`, `auth.as_metadata`, `auth.cimd`: no remote uses OAuth
- n/a `auth.secret_in_url`: no templated URL

### tool hygiene: 71 (weight 30)

- pass `tools.descriptions`: every tool has a description
- pass `tools.description_length`: descriptions are concise
- pass `tools.schemas`: every tool has an object input schema
- fail `tools.annotations`: no tool declares readOnlyHint or destructiveHint, so clients cannot tell safe calls from risky ones
- fail `tools.directory_hints`: no tool declares all four of readOnlyHint, destructiveHint, idempotentHint and openWorldHint; missing: sla_report (readOnlyHint, destructiveHint, idempotentHint, openWorldHint); describe_agent (readOnlyHint, destructiveHint, idempotentHint, openWorldHint); record_usage (readOnlyHint, destructiveHint, idempotentHint, openWorldHint); …
- pass `tools.token_cost`: about 1,334 tokens to load every tool
- pass `tools.api_dump`: tools are not a one-to-one API dump

### stability: 100 (weight 15)

- pass `stability.changes`: no tool changes in 30 days
- pass `stability.rug_pull`: no tool changed its meaning under the same name

### dependencies: n/a (weight 15)

- n/a `deps.known_vulns`, `deps.mcp_sdk_version`, `deps.resolvable`: no npm or PyPI package

- tools: 11, about 1,334 tokens to load them all
- tool set hash: 254ce18a97676801999a1ed3e2b677dd
- badge: [![protogrid quality](https://protogrid.dev/badge/io.github.jdhart81/agent-metering.svg)](https://protogrid.dev/servers/io.github.jdhart81/agent-metering)
- Checks run on what our credential-free, read-only probes observe; tools are never called and no code audit is performed.

### Tool changes

_No tool definition changes recorded._

## Remotes

- https://mcp.viridisconservation.com/metering/mcp (streamable-http, auth none, reachable true, uptime30d 1)

## Packages

_none_

## Tools (11)

- `close_period`: Freeze all open events into an immutable invoice (exactly-once).
    The invoice amount is what agent-escrow-agent should settle.
- `create_meter`: Create a usage meter between a provider and a consumer agent.

    unit: what is being counted (call, token, kwh, ...). Price is in minor
    currency units (cents) per unit. Returns the meter_id.
- `describe_agent`: Fleet-standard self-description.
- `flag_meter`: Admin: flag/unflag a meter as test/synthetic so its events are
    excluded from usage statistics by default. Touches meter metadata only —
    never events, never the hash chain, never billing accruals. Requires the
    server's VIRIDIS_ADMIN_TOKEN.
- `list_events`: Read usage events (paginated, read-only). Filter by meter, provider,
    consumer_class (internal|external|unknown), channel, outcome (ok|error),
    and ISO date range [since, until). Test-flagged events are excluded
    unless include_test=true. Returns events + next_cursor.
- `list_meters`: List all meters with event/invoice counts.
- `record_usage`: Record a usage event. Idempotent on event_id (safe to retry — never
    double-billed). outcome is 'ok' or 'error' and feeds the SLA report.
- `sla_report`: Pure SLA report: success_rate vs sla_target, breach flag. No mutation.
- `usage_summary`: Totals for a meter: event count, total quantity, accrued minor units.
- `usage_timeseries`: Usage time series bucketed on each event's recorded_at (UTC;
    bucket=day|hour), grouped across meters by provider — a real time-series
    primitive, independent of meter creation times. Includes per-bucket
    breakdowns by consumer_class / channel / provider. est_accrued_minor is
    an estimate; authoritative billing stays with usage_summary.
- `verify_chain`: Verify the tamper-evident event hash chain for a meter.
