Skip to main content
Glama

cert_expiry_sweep

Read-only

Probe TLS certificate expiry across proxy domains, bucket results as expired, critical, warning, or ok, and provide renewal hints.

Instructions

[READ] TLS cert inventory bucketed by days-to-expiry + renewal hints.

The flagship cert sweep for traefik/caddy targets: collects the TLS domain inventory, live-probes each domain's served leaf cert (bounded handshake), and buckets by expiry: expired / critical / warning / ok — with a platform-specific renewal hint (ACME resolver / storage checks). Pass 'certs' for pure analysis over {domain, daysToExpiry} rows. haproxy targets return the support matrix's teaching note.

Args: warn_days: Days-to-expiry at/below which a cert is a warning (default 30). critical_days: Days at/below which a cert is critical (default 7). port: TLS port to probe (default 443). certs: Injected rows {domain, daysToExpiry, notAfter?}; skips pull+probe. target: Proxy target name from config; omit for the default.

Returns dict: {certsEvaluated, expired, critical, warning, ok, unknown, certificates (soonest first), thresholds, renewalHint, note}.

Input Schema

NameRequiredDescriptionDefault
portNo
certsNo
targetNo
warn_daysNo
critical_daysNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.6.0

TDQS

A4.5/5.0
Behavior4/5

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

readOnlyHint=true already covers the safety profile, but the description adds real behavior beyond annotations: it performs a bounded TLS handshake against each domain, buckets into expired/critical/warning/ok/unknown, and emits platform-specific renewal hints. This is substantive disclosure of what the tool actually does.

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-loaded with the [READ] tag and a one-line summary, then structured into prose, Args, and Returns. It is somewhat verbose and the Returns block is dense, but every sentence carries information and nothing is wasted on tautology.

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?

No output schema exists, so the description explains the return dict keys (counts by bucket, soonest-first certificates, thresholds, renewalHint, note), and the Args section fully documents all parameters. An agent has everything needed to call and interpret this read-only tool.

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%, so the description must carry all five parameters, and it does: warn_days (default 30), critical_days (default 7), port (default 443), certs (injected {domain, daysToExpiry} rows that skip pull+probe), and target (config name, omit for default). It adds behavior the schema can't express, notably that certs bypasses collection and probing.

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+resource+scope: a TLS cert inventory that live-probes leaf certs and buckets them by days-to-expiry. It differentiates itself from the sibling list_certificates by framing this as the 'flagship cert sweep' that actually probes rather than just lists.

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?

Gives clear context on when it applies (traefik/caddy targets) and how it degrades (haproxy returns the support matrix's teaching note), plus the 'pass certs for pure analysis' shortcut. It never names list_certificates as the alternative for a plain listing, so routing between the two cert tools is left to inference.

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