Skip to main content
Glama
petrmasa
by petrmasa

explain_segment

Drill into a specific data segment defined by condition variables to discover key factors driving a target outcome.

Instructions

Find drivers of a target outcome within a specific segment (CLARA method). Call this ONCE — like find_drivers, it returns a complete multi-level nested JSON in a single response. Do NOT call it multiple times to refine results.

Use this for local/conditional analysis: "within 1st class passengers, what drives survival?" The condition_variables define which variables describe the segment — araxai will find what values of those variables define the strongest sub-segments, then find drivers within them.

Use find_drivers first for the global picture; use explain_segment only when you need to drill into a specific slice of the data.

Args: dataset_name: Name of a dataset loaded with load_dataset target: Column name of the outcome variable target_class: The specific outcome value to explain condition_variables: Columns that define the segment to focus on (e.g. ["Journey_Type"]) attributes: Optional subset of columns to use as candidate drivers. Exclude columns that are direct encodings of the target, same as for find_drivers. min_base: Minimum records a rule must cover

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
dataset_nameYes
targetYes
target_classYes
condition_variablesYes
attributesNo
min_baseNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/5

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

No annotations provided, so description carries full burden. It states returns complete JSON in single response and warns against multiple calls. However, it does not explicitly mention whether the tool modifies data or has side effects, though implied read-only.

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?

Well-structured with core purpose first, then usage notes, then parameter descriptions. Slightly verbose but every sentence adds value; could be trimmed slightly without loss.

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?

Given 6 parameters (4 required), output schema exists, no nested objects, the description covers all aspects: purpose, usage, parameters, and expected output format (multi-level nested JSON). Complete for a complex analysis 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 coverage is 0%, but the description explains all parameters: dataset_name, target, target_class, condition_variables, attributes, min_base. Provides guidance like excluding direct encodings of target for attributes, and explains condition_variables purpose.

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 clearly states the tool finds drivers of a target outcome within a specific segment using the CLARA method, with a specific verb-resource combination. It distinguishes from sibling tool find_drivers by noting use for local/conditional analysis.

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?

Explicitly says to use find_drivers first for global picture and explain_segment only for drilling into a slice. Also warns to call it once and not multiple times, providing clear when-to-use and when-not-to-use guidance.

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/petrmasa/key_drivers_mcp'

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