Skip to main content
Glama
log-10x

Log10x MCP Server

Official

Pattern mitigate

log10x_pattern_mitigate
Read-onlyIdempotent

Check which mitigation paths are reachable for a high-cost log pattern, returning drop, mute, or compact options based on your 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

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

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.5/5.0
Behavior5/5

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

Annotations cover safety (readOnly, idempotent, closed-world), and the description adds substantial context beyond them: each option carries enabled/label/disabled_reason, the envelope carries recommendation_basis and recommendation_audit.capability_sources with snapshot_age_seconds staleness, and the agent is warned not to auto-route until the user picks and to distrust a stale snapshot that may mis-flag mute as enabled.

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

Conciseness3/5

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

The content is dense but the structure is flawed: a bracketed FRESH-SESSION ROUTING block about a different tool is front-loaded ahead of this tool's actual purpose, and multiple bolded asides add bulk. Nearly every sentence carries information, but the ordering buries the primary purpose and makes the entry point hard to scan.

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?

An output schema exists and the description still explains the meaningful return fields (enabled, label, disabled_reason, recommendation_basis, capability_sources, snapshot_age_seconds), covers the mutation-exclusion behavior (agent surfaces menu, user picks), and supplies the agent behavior contract. Nothing an agent needs to invoke and interpret this correctly is missing.

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 pattern, service, and snapshot_id thoroughly (including that snapshot_id affects capability_sources). The description's restatement of pattern identity (symbolMessage / tenx_hash) and the service-scoping effect largely duplicates the schema, adding only marginal value. Baseline 3 is correct.

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: given one pattern, return an env-gated capability menu of four named mitigation tiers (drop_at_analyzer, drop_at_forwarder, mute_at_10x, compact_at_10x). It explicitly carves out what it is NOT ("how much would each save") and names the sibling that answers that instead (log10x_cost_options), so an agent can separate it from neighbors without opening 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 explicit triggering conditions ("when a previous tool surfaced a high-cost pattern and the user asks 'what should I do'"), a routing rule to log10x_start for a fresh session's first cost question, and the downstream chain (log10x_cost_options for the action breakdown, then the specific action tool for snippets). When-to-use and alternatives are both spelled out.

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