Skip to main content
Glama

Interaction Features

interaction_features

Combine pairs of numerical columns into new features such as price per km or area times rooms, using multiply, divide, add, or subtract to give models richer input.

Instructions

Combine pairs of numerical columns into new features, e.g. price per km or area * rooms. Pass EITHER columns (every pair among them, in the order given) OR pairs (exact pairs). Division by zero gives a missing value. Missing values must be imputed afterwards if the model needs them gone. For squares or cubes of a single column use polynomial_features or transform_feature. Args: dataset_id (str): ID of a dataset or of a split. columns (list[str], optional): Numerical columns; all pairs (a, b) with a before b are created. pairs (list[list[str]], optional): Explicit pairs such as [["km_driven","year"]]. For "divide" the order matters (first / second). operations (list[str], optional): Any of "multiply", "divide", "add", "subtract". Default is ["multiply"]. Names are "x", "div", "plus", "minus". max_new_features (int): Safety limit on how many columns may be created. Default is 50. Returns: dict: The new feature names and how many rows had a zero denominator.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "dataset_id": "<dataset_id>"
    },
    "name": "interaction_features"
  }
}

Input Schema

NameRequiredDescriptionDefault
pairsNo
columnsNo
dataset_idYes
operationsNo
max_new_featuresNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.9/5.0
Behavior5/5

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

With no annotations, the description carries the full burden and mostly does: it discloses division-by-zero behavior (produces a missing value), the resulting need to impute, the max_new_features safety cap of 50, the output naming conventions, and the shape of the return value including the count of zero-denominator rows.

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?

Front-loaded with purpose and the either/or rule, then structured Args/Returns sections. Mild duplication between the opening prose ('Pass EITHER `columns` OR `pairs`') and the Args entries costs a little, but no sentence is wasted.

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 five-parameter feature-engineering tool with no annotations and no output schema, the description covers purpose, selection rules, defaults, output naming, edge cases (zero denominators, missing values), and return contents. Nothing critical to correct invocation is missing.

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 description coverage is 0%, so the description must compensate and does: each of the five parameters is documented, including that `operations` accepts multiply/divide/add/subtract (no enum exists in the schema) with default multiply, that order matters for divide, and that `max_new_features` defaults to 50.

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 concrete verb and resource (combine pairs of numerical columns into new features) and grounds it with examples ('price per km or area * rooms'). It explicitly routes squares/cubes of a single column to polynomial_features or transform_feature, so an agent can separate it from siblings without opening schemas.

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 an explicit either/or selection rule: pass `columns` for every ordered pair, or `pairs` for exact pairs. It also names alternatives (polynomial_features, transform_feature) and the condition that selects them, plus the post-condition that missing values must be imputed afterwards.

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

Deploy Server

Other Tools