Skip to main content
Glama

log_transform

Reduce right skew in numeric columns by applying log transforms; creates new columns Log_{column} with methods log1p, log, or log10.

Instructions

Apply log transform to columns. Creates new columns named Log_{column}. Methods: 'log1p' (recommended, handles zeros), 'log' (natural log), 'log10'. Use on right-skewed distributions (|skewness| > 1). 'log1p' is safest (handles zeros). Check result with plot_histogram. Example: log_transform(columns=["Revenue","ChargeableWeight"], method="log1p")

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
methodNolog1p
columnsYes
df_nameNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior3/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 a key behavioral trait: new columns are created (named Log_{column}), which implies original columns are preserved. However, it doesn't describe behavior on missing values, non-numeric columns, or whether the dataframe is modified in place. The df_name parameter's role is also unaddressed.

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 yet comprehensive. The main purpose is stated first, followed by method details, usage guidance, a verification tip, and a concrete example. Every sentence adds value without unnecessary 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 presence of an output schema, the description covers the essential aspects: purpose, methods, when to use, and an example. It lacks explanation of df_name but otherwise provides a complete picture. The mention of plot_histogram for verification adds helpful context.

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 0%, so the description must compensate. It explains the 'method' parameter with options and meanings, and the 'columns' parameter through examples and naming convention. However, the 'df_name' parameter is not explained, leaving a gap for one of three parameters.

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 applies a log transform to columns, specifying the verb 'Apply' and resource 'columns'. It also mentions the new column naming convention 'Log_{column}' and lists supported methods, making it distinct from sibling transformation tools like normalize or clip_outliers.

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 provides clear guidance on when to use: on right-skewed distributions with |skewness| > 1. It also recommends 'log1p' as the safest method and suggests verifying results with plot_histogram. It doesn't explicitly mention when not to use or name alternatives, but the context is sufficiently clear.

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/AstyanM/mcp-data-science'

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