Skip to main content
Glama
trippborstel-hub

northwood-carbon MCP server

simulate_reduction

Apply selected carbon reduction initiatives to a portfolio company and return projected emissions, total reduction, capex, and progress toward target.

Instructions

What-if analysis: apply a subset of initiatives and return projected post-lever emissions.

Args: portco: Portco slug or name. initiative_ids: List of initiative IDs (from list_initiatives) to 'turn on'.

Returns: Dict with baseline (current trajectory endpoint), applied initiatives, total reduction, total capex, and new endpoint vs target.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
portcoYes
initiative_idsYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Handler function for the simulate_reduction MCP tool. Performs what-if analysis by applying selected decarbonization initiatives to a portfolio company's latest emissions, computing total reduction, capex, and comparing the projected value against the 2030 SBTi target.
    @mcp.tool()
    def simulate_reduction(portco: str, initiative_ids: list[int]) -> dict[str, Any]:
        """
        What-if analysis: apply a subset of initiatives and return projected post-lever emissions.
    
        Args:
            portco:         Portco slug or name.
            initiative_ids: List of initiative IDs (from list_initiatives) to 'turn on'.
    
        Returns:
            Dict with baseline (current trajectory endpoint), applied initiatives,
            total reduction, total capex, and new endpoint vs target.
        """
        slug = _resolve_portco(portco)
        p = PORTCOS[slug]
        traj = TRAJECTORY[slug]
        totals = _year_totals(slug)
        latest_year = max(int(y) for y in totals)
        baseline = totals[str(latest_year)]["total"]
    
        selected = [i for i in INITIATIVES[slug] if i["id"] in initiative_ids]
        total_reduction = sum(i["estReduction"] for i in selected)
        total_capex = sum(i["capex"] for i in selected)
        new_total = max(0.0, baseline - total_reduction)
        target = traj["target2030"]
    
        return {
            "portco": p["name"],
            "baseline_tco2e": round(baseline, 1),
            "applied_initiatives": [
                {"id": i["id"], "name": i["name"], "reduction_tco2e": i["estReduction"], "capex_k": i["capex"]}
                for i in selected
            ],
            "total_reduction_tco2e": total_reduction,
            "total_capex_k_usd": total_capex,
            "projected_tco2e": round(new_total, 1),
            "target_2030_tco2e": target,
            "meets_target": new_total <= target,
            "gap_vs_target_tco2e": round(new_total - target, 1),
        }
  • server.py:234-234 (registration)
    Registration of the simulate_reduction tool via the @mcp.tool() decorator from FastMCP. The decorator registers the function as an MCP tool available to the agent.
    @mcp.tool()
  • Helper function used by simulate_reduction to resolve a portco slug or name to a normalized key.
    def _resolve_portco(portco: str) -> str:
        """Match portco by slug or name (case-insensitive). Raises on miss."""
        key = portco.strip().lower()
        if key in PORTCOS:
            return key
        for slug, p in PORTCOS.items():
            if p["name"].lower().startswith(key) or key in p["name"].lower():
                return slug
        raise ValueError(
            f"Unknown portco '{portco}'. Known slugs: {', '.join(PORTCOS.keys())}"
        )
  • Helper function used by simulate_reduction to sum quarterly emissions data for a given portco to compute the latest-year baseline.
    def _year_totals(slug: str, year: int | None = None) -> dict[str, float]:
        """Sum quarterly emissions for a portco. If year is None, returns all years."""
        traj = TRAJECTORY[slug]["quarters"]
        result: dict[str, dict[str, float]] = {}
        for q in traj:
            y = int(q["q"].split("-")[1])
            if year is not None and y != year:
                continue
            key = str(y)
            result.setdefault(key, {"scope1": 0.0, "scope2": 0.0, "total": 0.0})
            result[key]["scope1"] += q["scope1"]
            result[key]["scope2"] += q["scope2"]
            result[key]["total"] += q["scope1"] + q["scope2"]
        return result
Behavior3/5

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

No annotations provided, so description carries full burden. It describes a simulation ('what-if', 'projected'), implying read-only behavior, but does not explicitly state that it has no side effects or requires specific permissions.

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?

Description is concise and well-structured: one-line summary, then Args, then Returns. Every sentence adds value with no redundancy.

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?

Output schema exists, so description need not detail return values but still lists key return fields (baseline, applied initiatives, reductions, capex). For a simulation tool with two parameters and clear return, this is sufficient.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 0%, but description adds meaning: clarifies 'portco' as slug or name, and 'initiative_ids' as a list from list_initiatives. This compensates well, though could include more detail on valid values or constraints.

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?

Description clearly states it performs 'What-if analysis' by applying a subset of initiatives and returning projected post-lever emissions. It effectively distinguishes from sibling tools like gap_to_target (gap calculation), get_portco_emissions (baseline), list_initiatives (list initiatives), and list_portcos (list portcos).

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?

Description implies usage for hypothetical scenarios but lacks explicit guidance on when to use versus alternatives (e.g., when not to use or mention of prerequisites). Context from sibling tools helps but not explicitly stated.

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/trippborstel-hub/northwood-carbon-mcp'

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