Skip to main content
Glama

filter_variants

Filter event logs to retain or remove trace variants by their frequency or specific activity sequences. Use top-K to ignore rare noise or specify variants to keep or remove.

Instructions

Filter a log by trace variant.

Exactly one of top_k and variants must be given:

  • top_k=N — keep (or remove, if retain=False) the N most frequent variants. Useful for ignoring rare noise.

  • variants=[[act1, act2, ...], ...] — keep/remove specific variants by their full activity sequence.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
top_kNo
log_idYes
retainNo
variantsNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior4/5

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

With no annotations provided, the description carries the full burden. It discloses that exactly one of top_k and variants must be given, clarifies the effect of the retain boolean ('keep (or remove, if retain=False)'), and indicates the output is a filtered log (implicitly). No side effects, permission requirements, or error conditions are mentioned, but the core behavior is transparent.

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

Conciseness5/5

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

The description is concise and well-structured: a single-line summary followed by a bulleted list explaining the two parameter options. Every sentence adds value without redundancy or fluff.

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

Completeness4/5

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

Given the tool's moderate complexity and the presence of an output schema, the description adequately covers the core functionality, parameter usage, and the mutual exclusivity constraint. It could be improved by explicitly mentioning the required log_id parameter, but overall it is sufficiently complete for an agent to use the tool correctly.

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 0%, so the description must explain parameters. It explains top_k, variants, and retain in detail with examples. However, log_id is required but not explicitly described; it is only implied as the log to filter. Overall, three of four parameters are well-covered.

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 begins with a clear verb+resource: 'Filter a log by trace variant.' This immediately distinguishes it from sibling filter tools that filter by attribute values, case size, or time range. The specification of 'trace variant' makes the purpose unambiguous.

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?

The description explicitly explains the two mutually exclusive usage modes (top_k vs. variants) and their typical applications: 'Useful for ignoring rare noise' for top_k and 'keep/remove specific variants' for variants. However, it does not state when not to use this tool or provide explicit alternatives among siblings.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/azizketata/pm4py-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server