Skip to main content
Glama
xinqihuang

Drain3 MCP Server

by xinqihuang

match_log

Read-onlyIdempotent

Match a log line against learned clusters to identify the closest template and extract parameters, without modifying the model.

Instructions

Match one log line against learned clusters without changing the model.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
log_messageYes
extract_parametersNo
full_search_strategyNofallback

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
matchedYes
templateNo
cluster_idNo
parametersNo
change_typeNonone
log_messageYes
cluster_sizeNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.2/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true, idempotentHint=true, and destructiveHint=false. The description reinforces this with 'without changing the model' and adds the context that matching happens against learned clusters. However, it does not disclose behavior such as what happens when no cluster matches or how optional parameters affect execution.

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?

The description is a single, front-loaded sentence with no filler. It efficiently conveys the core operation and side-effect guarantee, though it could have used the available space to clarify key parameters.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With three parameters, one required, and zero schema descriptions, the description is too sparse. It does not explain the optional parameters or their enum values, nor the expected behavior on unmatched logs. The existence of an output schema helps, but parameter and edge-case context remain missing.

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

Parameters2/5

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

Schema description coverage is 0%, so the description bears the burden of explaining parameters. It only hints at log_message via 'one log line'. The purpose and effect of extract_parameters and full_search_strategy are not described, leaving an agent without enough information to choose correct values.

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?

The description states the specific verb 'match', the object 'one log line', and the target 'learned clusters', and emphasizes the non-mutating nature with 'without changing the model'. This clearly differentiates it from siblings like train_log (which trains) and match_logs (which suggests batch matching).

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

Usage Guidelines2/5

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

The description gives no explicit guidance on when to use this tool versus alternatives. It implies single-log inference via 'one log line' and 'without changing the model', but does not state conditions, exclusions, or mention match_logs as a batch alternative.

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