Skip to main content
Glama

infer_column_rule

Read-only

Identify the formula behind a numeric column: fit arithmetic, geometric, and power-law curves, return the best expression with fit percentage and breakpoint rows that deviate from the rule.

Instructions

列规则推断(确定性拟合,逆向分析的起点):对指定数值列拟合三大曲线族(等差/等比/幂律),返回最优规则——参数、吻合占比 fitPct、可直接使用的表达式——以及偏离规则的断点行(疑似手调)。分析成长/消耗曲线的构成规律先用它;得到规则后把 expression 交给 audit_column 复核,或用 write_table 的 apply_curve 按规则整列重算。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
tableYes目标表名(来自 list_tables)
columnYes要推断的数值列
thresholdPctNo偏离阈值百分比(默认 1),超出即计为断点

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.1/5.0
Behavior4/5

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

The readOnlyHint annotation already covers safety; the description adds that fitting is deterministic and that the tool returns both the optimal rule and suspected manually-adjusted breakpoint rows. This gives an agent a clear behavioral model without contradicting the annotation.

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 dense but front-loaded with the tool's role and outputs, followed by usage workflow. Every sentence adds information, though the single long sentence with semicolons and the reference to an unlisted write_table slightly reduce readability.

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?

With no output schema, the description takes responsibility for explaining the return value (optimal rule with parameters, fitPct, expression, breakpoint rows), which it does. It also gives the follow-up workflow. It doesn't cover failure modes or non-numeric input, but for a read-only inference tool the essentials are present.

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 100%, so the baseline is 3. The description restates that the column must be numeric and mentions breakpoint rows, but adds no meaningful detail about thresholdPct beyond the schema's '偏离阈值百分比(默认 1)'.

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 opens with a specific role ('列规则推断') and states the exact operation: fit three curve families (arithmetic/geometric/power) to a numeric column and return the optimal rule plus breakpoint rows. This clearly distinguishes it from related siblings like audit_column and power_curve by naming it the starting point for reverse analysis.

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?

It explicitly says to use this tool first when analyzing growth/consumption curves, then hand the expression to audit_column for review. This gives concrete workflow context. It does not explicitly state when not to use alternatives, and it references 'write_table' which is not present in the sibling list, slightly weakening the routing guidance.

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