Skip to main content
Glama

ebalance

Read-only

Estimate the ATT by exactly balancing covariate means across treatment groups with entropy balancing, avoiding propensity-score model specification.

Instructions

Hainmueller (2012) entropy balancing. Targets the ATT by exactly balancing covariate means across treatment groups. No propensity-score model specification needed. Validation: certified parity evidence.

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": {
      "covariates": "<covariates>",
      "treat": "<treat>",
      "y": "<y>"
    },
    "name": "ebalance"
  }
}

Input Schema

NameRequiredDescriptionDefault
yYes
treatYes
detailNoPayload depth; agent is the fullest.agent
data_idNoData handle (d_...) from load_data; replaces data_path.
momentsNoMax moment balanced (1=means, 2=vars).
data_csvNoSmall inline table as CSV text.
as_handleNoCache the fit and return its result_id.
data_pathNoAbsolute path of a data file on the server.
result_idNoHandle of an earlier fit made with as_handle=true.
covariatesYes
data_recordsNoSmall inline table as row objects.
max_output_bytesNoResult byte budget (default 262144; 0 = none).

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.4/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true and openWorldHint=false, so the safety profile is covered and the description's added claim of certified parity evidence gives useful trust context. However, it says nothing about what the tool produces behaviorally beyond the output schema—weighting, convergence/failure behavior with higher moments, or the as_handle/result_id caching workflow.

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?

Four short, front-loaded sentences with the method and estimand stated first and no filler. The trailing "Validation: certified parity evidence" is terse but earns its place as a trust signal.

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

Completeness3/5

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

With an output schema present, return values need not be explained, but a 12-parameter tool with multiple data-input paths and a handle-caching mechanism deserves at least a sentence on inputs and result reuse. The description covers the statistical purpose only, leaving workflow-level details to the schema.

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 coverage is 75%, so the baseline is 3, and the description's phrase "balancing covariate means across treatment groups" loosely maps to covariates and treat. But the required parameters covariates, treat and y carry no schema descriptions, and the description never explains y's role in ATT estimation or the choice among the four data input paths (data_id, data_path, data_csv, data_records), so it does not compensate for the gaps.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description names the specific method (Hainmueller 2012 entropy balancing) and states the estimand it targets (the ATT) via exact covariate-mean balancing, so an agent can tell it apart from propensity-score siblings such as match or causal. It stops short of naming the alternatives explicitly, so it is clear but not fully differentiated by name.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

"Targets the ATT" and "No propensity-score model specification needed" imply when this tool is preferable to score-based matching, but there is no explicit when-to-use/when-not statement, no statement of assumptions (e.g. binary treatment requirement), and no named alternative. Usage is implied rather than instructed.

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