Skip to main content
Glama

Primer Market Systems (MSD) & DCED Engine

calculate_deal

Read-onlyIdempotent

Calculate rural retail dealer unit economics, monthly working capital requirements, currency inflation decay, and smallholder payback periods for private sector co-investments.

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": {
      "retail_price": "<retail_price>",
      "wholesale_price": "<wholesale_price>",
      "monthly_volume_units": "<monthly_volume_units>",
      "dealer_fixed_cost_monthly": "<dealer_fixed_cost_monthly>",
      "cash_cycle_days": "<cash_cycle_days>",
      "monthly_inflation_rate_pct": "<monthly_inflation_rate_pct>",
      "farmer_equipment_cost": "<farmer_equipment_cost>",
      "farmer_seasonal_revenue_gain": "<farmer_seasonal_revenue_gain>",
      "donor_subsidy_grant": "<donor_subsidy_grant>",
      "partner_equity_match": "<partner_equity_match>"
    },
    "name": "calculate_deal"
  }
}

Input Schema

NameRequiredDescriptionDefault
retail_priceYesCustomer retail price at rural shop ($).
cash_cycle_daysYesDays from inventory purchase to customer cash collection (7 to 14 benchmark).
wholesale_priceYesDealer purchase price from supplier ($).
donor_subsidy_grantYesDonor pilot grant contribution ($).
monthly_volume_unitsYesEstimated monthly units sold per dealer.
partner_equity_matchYesPrivate partner matching capital ($).
farmer_equipment_costYesSmallholder upfront capital outlay ($).
dealer_fixed_cost_monthlyYesDealer monthly overhead for shop rent, staff, power ($).
monthly_inflation_rate_pctYesLocal currency monthly inflation rate %.
farmer_seasonal_revenue_gainYesNet smallholder income gain per harvest season ($).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

C2.9/5.0
Behavior2/5

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

Annotations already declare readOnlyHint=true, idempotentHint=true, destructiveHint=false, and openWorldHint=false, so the safety profile is fully covered. The description adds no behavioral context beyond those annotations: it does not state that all ten inputs are mandatory, that results are deterministic point estimates rather than ranges, or what assumptions (e.g. 7-14 day cash cycle benchmark) are baked in.

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?

A single sentence with the verb front-loaded and no filler. It is dense with output nouns, which is acceptable for a multi-output calculator, though the enumerated list borders on a run-on and could be grouped more tightly.

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

Completeness2/5

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

This is a ten-required-parameter calculation tool with no output schema, so the description is the only place an agent could learn what comes back. It names output categories but never states the returned metrics, their units, or their structure, leaving a significant gap for a tool this complex.

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 each of the ten parameters has a clear unit and meaning, so the schema does the heavy lifting. The description's list of computed outputs loosely maps to parameter groups (working capital to cash_cycle_days, inflation decay to monthly_inflation_rate_pct, payback to farmer_equipment_cost and farmer_seasonal_revenue_gain) but adds no syntax, units, or constraint detail beyond the schema.

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 opens with a specific verb ('Calculate') and enumerates the exact analytic outputs: dealer unit economics, monthly working capital, currency inflation decay, and smallholder payback for co-investments. That is far more specific than the bare name. It does not distinguish itself from siblings such as calculate_dced_attribution, but those cover different domains, so the risk of confusion is low.

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

Usage Guidelines2/5

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

There is no when-to-use guidance, no prerequisite conditions, and no mention of alternatives or exclusions. An agent is not told whether this tool is appropriate for a quick single-dealer check versus a portfolio analysis, nor what context must be gathered before calling it.

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.