{
  "manifest_version": "0.1",
  "work_slug": "invasion-economics-invacost-cost-structure",
  "protocol": "protocol:secondary-analysis 0.1",
  "module": "agent/tools.py",
  "analysis_unit": "analysis.py",
  "published_results": "results.json",
  "source_dataset_doi": "10.6084/m9.figshare.12668570",
  "environment": {
    "language": "python",
    "tested_version": "3.13",
    "requirements": "requirements-reproduction.txt",
    "network": "deny-except-pinned-inputs"
  },
  "execution": {
    "boundary": "docs/72-reproduction-contract.md",
    "live_invocation": "not connected; the sandboxed runner gates execution over MCP"
  },
  "tools": [
    {
      "name": "dataset_summary",
      "summary": "Size and provenance of the cost records the analysis retains.",
      "unit": "analysis.fetch plus the positive-cost filter in analysis.main",
      "parameters": [],
      "returns": "figshare_id, md5, n_cost_records, response column, scale, and the bias note",
      "supports_claims": [1, 2, 3],
      "deterministic": true
    },
    {
      "name": "compare_groups",
      "summary": "Mann-Whitney comparison of log10 annual cost between two levels of a column.",
      "unit": "analysis.compare (with analysis.rank_biserial and analysis.boot_ratio_ci)",
      "parameters": [
        {
          "name": "column",
          "type": "string",
          "default": "Implementation",
          "range": "any categorical column of the database; the comparable ones are Implementation (2 levels), Environment (8), Type_of_cost_merged (4), Method_reliability (2), Impacted_sector (51), Geographic_region (22)",
          "published_values": ["Implementation", "Environment", "Type_of_cost_merged"],
          "notes": "The published run applies one general comparison to three hard-coded pairs. The comparison itself is what is exposed here."
        },
        {
          "name": "group1",
          "type": "string",
          "default": "Observed",
          "range": "any level present in the chosen column",
          "published_values": ["Observed", "Terrestrial", "Damage"]
        },
        {
          "name": "group2",
          "type": "string",
          "default": "Potential",
          "range": "any other level present in the chosen column",
          "published_values": ["Potential", "Aquatic", "Management"]
        },
        {
          "name": "label",
          "type": "string | null",
          "default": null,
          "range": "free text; null derives \"<group1> vs <group2>\"",
          "published_values": ["Observed vs Potential", "Terrestrial vs Aquatic", "Damage vs Management"]
        },
        {
          "name": "bootstrap_n",
          "type": "number",
          "default": 3000,
          "range": ">= 1 resamples for the median-ratio CI",
          "published_values": [3000],
          "notes": "Exposed so a caller can check the published interval is not an artefact of 3000 resamples."
        },
        {
          "name": "seed",
          "type": "number",
          "default": 0,
          "range": "any integer seed for the bootstrap",
          "published_values": [0]
        }
      ],
      "returns": "test label, groups, n1, n2, U, p, rank_biserial_r, both medians, the median ratio and its bootstrap CI",
      "supports_claims": [1, 2, 3],
      "deterministic": true
    },
    {
      "name": "multiplicity",
      "summary": "Benjamini-Hochberg and Holm correction over a family of p-values.",
      "unit": "analysis.bh_holm",
      "parameters": [
        {
          "name": "p_values",
          "type": "array of number | null",
          "default": null,
          "range": "any non-empty list of p-values in [0, 1]; null uses the declared family {T1, T2, T3}",
          "published_values": [null]
        }
      ],
      "returns": "raw_p, bh_p and holm_p per member of the family",
      "supports_claims": [1, 2, 3],
      "deterministic": true
    }
  ]
}
