Skip to main content
Glama

三域医研 · 科研算法引擎 (SanYu Research Engine)

IPTW inverse probability weighting / IPTW 逆概率加权

iptw_weighting
Read-only

IPTW inverse probability weighting / IPTW 逆概率加权 | USE WHEN: propensity-score weighting (ATE/ATT) for observational comparisons | ALIASES: IPTW, 逆概率加权, 倾向评分加权, propensity weighting, 加权后效应, ATE | RETURNS: 权重与加权后效应

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": {
      "propensity_scores": "<propensity_scores>",
      "treatment": "<treatment>"
    },
    "name": "iptw_weighting"
  }
}

Input Schema

NameRequiredDescriptionDefault
treatmentYes处理分组 0/1
propensity_scoresYes倾向评分

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

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, destructiveHint=false and openWorldHint=false, so the safety profile is covered. The description adds only the return payload ('权重与加权后效应'), and says nothing about weight stabilization/trimming, handling of extreme or zero propensity scores, or whether propensity scores must be precomputed externally.

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?

Compact, front-loaded tag structure with no filler prose; purpose, trigger, aliases and return value come in that order. Minor redundancy: 'IPTW' and '逆概率加权' are repeated in the ALIASES block after already appearing in the title and first line.

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?

For a two-parameter, non-destructive read tool with no output schema, the definition covers purpose, trigger and return shape. What is missing is the pipeline context — that propensity scores must already be estimated elsewhere — plus any statement of what the weighted-effect output contains beyond the one-word '权重与加权后效应'.

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% and both parameters are documented in the schema ('处理分组 0/1', '倾向评分'), so the baseline applies. The description adds no extra meaning about the required array alignment, length equality, or the coding of the treatment vector beyond what the schema states.

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?

States a specific named method (IPTW inverse probability weighting) plus the effect estimands (ATE/ATT) and the analysis context (observational comparisons). An agent can distinguish it from the sibling propensity_score_matching by the 'weighting' vs 'matching' framing, though the sibling is never named.

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?

'USE WHEN: propensity-score weighting (ATE/ATT) for observational comparisons' gives a clear triggering context, which is more than most siblings offer. However, it gives no when-not guidance and never names propensity_score_matching as the alternative to pick when matching is wanted instead of weighting.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.