Skip to main content
Glama
log-10x

Log10x MCP Server

Official
by log-10x

Pattern mitigate

log10x_pattern_mitigate
Read-onlyIdempotent

Reveals which mitigation paths (drop, mute, compact) are currently reachable for a log pattern by checking environment wiring.

Instructions

[FRESH-SESSION ROUTING: if this is the user first cost question of the session, call log10x_start first instead — it returns the orientation menu the user needs before any per-tool action.] Given one pattern (symbolMessage identity or tenx_hash), return the env-gated CAPABILITY MENU of which mitigation paths are reachable: drop_at_analyzer, drop_at_forwarder, mute_at_10x, compact_at_10x. Each option carries enabled (true/false), label, and disabled_reason when not reachable. This is a REACHABILITY-FIRST router: it answers "which of the four tiers can I use right now given my env wiring" — NOT "how much would each save". Per-option estimated savings (% reduction, $/mo) and paste-ready config snippets are surfaced by the next-tool chain (log10x_cost_options for the action menu, then the specific action tool for the snippet) — NOT this envelope. The agent surfaces the menu to the user; the user picks; chain to log10x_cost_options for the action-level breakdown. Action-shaped tool — calibration honesty: the envelope's recommendation_basis tells the agent WHERE the capability detection came from (envs.json, snapshot, env vars, or unknown). recommendation_audit.capability_sources carries the per-field source, and snapshot_age_seconds carries snapshot staleness. The agent SHOULD NOT auto-route to the chosen sub-tool until the user picks an option, and SHOULD verify the basis before treating capability detection as authoritative (e.g., a stale snapshot may mis-flag mute as enabled when the receiver was uninstalled). See docs/cross-pillar-primitives.md for the agent behavior contract. Call this when a previous tool surfaced a high-cost pattern and the user asks 'what should I do' / 'how do I drop this' / 'how do I reduce this'.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
patternYesThe pattern identity to mitigate. Pass the canonical name from a prior log10x_top_patterns / log10x_event_lookup row.
serviceNoOptional service scope. When set, options that target a single service (forwarder drop, exclusion filter) are scoped to it.
snapshot_idNoSnapshot from log10x_discover_env. Used to detect which 10x components are deployed in the active env (receiver, retriever, GitOps wiring). When passed, the envelope's `recommendation_audit.capability_sources` reflects which capabilities came from the snapshot vs envs.json. Without it, the tool still works but may dim PR-based options if the active env's envs.json does not list a gitops repo.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
dataNo
toolYes
viewNosummary
imagesNo
actionsNo
summaryYes
warningsNo
truncatedNo
next_cursorNo
render_hintNo
generated_atYes
schema_epochYes
schema_versionYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.30.7

TDQS

A4.8/5.0
Behavior5/5

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

Annotations already establish read-only/idempotent behavior, but the description adds substantial context beyond them: it discloses the envelope fields (recommendation_basis, recommendation_audit.capability_sources, snapshot_age_seconds), the caveat that a stale snapshot may mis-flag mute as enabled, and the behavioral contract that the agent surfaces the menu and waits for a user pick. This is exactly the kind of disclosure that goes beyond structured 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?

Content is front-loaded with routing and the core purpose, and every section is relevant. It is dense with bolded emphasis and some repetition (the 'NOT this envelope' point is restated), which costs a little tightness, but the length is largely justified by the routing contract and chaining instructions.

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 router whose output schema exists, the description covers everything an agent needs: the trigger, the reachability-first semantics, the chaining path, the audit/staleness fields, and a pointer to the behavior contract doc. No gap that would cause a wrong invocation remains.

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

Parameters4/5

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

Schema coverage is 100%, so parameters are already documented; the description nonetheless adds meaning by clarifying that pattern accepts a symbolMessage identity or tenx_hash from a prior tool, that service scopes single-service options, and that snapshot_id drives which capability sources populate the audit. Marginal but real added value over the schema baseline.

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 (return the env-gated capability menu for a given pattern) and enumerates the four tiers it reports on (drop_at_analyzer, drop_at_forwarder, mute_at_10x, compact_at_10x). It also explicitly draws the boundary against siblings, declaring it is a 'REACHABILITY-FIRST router' and not the savings/action tool. An agent can distinguish it from log10x_cost_options and the action tools 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 Guidelines5/5

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

Names the exact triggering condition ('when a previous tool surfaced a high-cost pattern and the user asks what should I do / how do I drop this') and the prerequisite routing (call log10x_start first on the session's first cost question). It routes to the specific alternatives (log10x_cost_options for the action menu, then the action tool for the snippet) and warns not to auto-route until the user picks.

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