# Dues Increase Calculator and Explainer

> Work out how a proposed budget changes monthly dues, and explain it in language residents understand.

Human page: https://tools.rodri.ai/tools/dues-increase
Skill: https://tools.rodri.ai/.well-known/skills/dues-increase/SKILL.md
Category: finance
Exports: csv, text, print

## Operations

| Operation | Engine | Cost |
| --- | --- | --- |
| `dues_increase.calculate` | deterministic | free, no key |
| `dues_increase.polish` | ai | 1 AI credit |

### `dues_increase.calculate`

Calculate dues. No credential needed. Deterministic arithmetic, so it costs no allowance and is rate limited by address.

Input schema version 1, output schema version 1.
MCP tool name: `dues_increase_calculate`

Input JSON Schema:

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "communityName": {
      "type": "string",
      "maxLength": 120
    },
    "currency": {
      "default": "USD",
      "type": "string",
      "enum": [
        "USD",
        "EUR",
        "GBP",
        "CAD",
        "MXN"
      ]
    },
    "currentYearLabel": {
      "type": "string",
      "minLength": 1,
      "maxLength": 24
    },
    "proposedYearLabel": {
      "type": "string",
      "minLength": 1,
      "maxLength": 24
    },
    "unitCount": {
      "type": "integer",
      "exclusiveMinimum": 0,
      "maximum": 100000
    },
    "allocationMode": {
      "default": "equal",
      "type": "string",
      "enum": [
        "equal",
        "classes"
      ]
    },
    "current": {
      "type": "object",
      "properties": {
        "operatingExpenses": {
          "minItems": 1,
          "maxItems": 40,
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "label": {
                "type": "string",
                "minLength": 1,
                "maxLength": 80
              },
              "amount": {
                "type": "string",
                "minLength": 1,
                "pattern": "^\\d{1,12}(\\.\\d{1,4})?$"
              }
            },
            "required": [
              "label",
              "amount"
            ]
          }
        },
        "reserveContributions": {
          "type": "string",
          "minLength": 1,
          "pattern": "^\\d{1,12}(\\.\\d{1,4})?$"
        },
        "nonDuesIncome": {
          "type": "string",
          "minLength": 1,
          "pattern": "^\\d{1,12}(\\.\\d{1,4})?$"
        }
      },
      "required": [
        "operatingExpenses",
        "reserveContributions",
        "nonDuesIncome"
      ]
    },
    "proposed": {
      "type": "object",
      "properties": {
        "operatingExpenses": {
          "minItems": 1,
          "maxItems": 40,
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "label": {
                "type": "string",
                "minLength": 1,
                "maxLength": 80
              },
              "amount": {
                "type": "string",
                "minLength": 1,
                "pattern": "^\\d{1,12}(\\.\\d{1,4})?$"
              }
            },
            "required": [
              "label",
              "amount"
            ]
          }
        },
        "reserveContributions": {
          "type": "string",
          "minLength": 1,
          "pattern": "^\\d{1,12}(\\.\\d{1,4})?$"
        },
        "nonDuesIncome": {
          "type": "string",
          "minLength": 1,
          "pattern": "^\\d{1,12}(\\.\\d{1,4})?$"
        }
      },
      "required": [
        "operatingExpenses",
        "reserveContributions",
        "nonDuesIncome"
      ]
    },
    "unitClasses": {
      "maxItems": 10,
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 60
          },
          "unitCount": {
            "type": "integer",
            "exclusiveMinimum": 0,
            "maximum": 100000
          },
          "weightPerUnit": {
            "type": "string",
            "pattern": "^\\d{1,4}(\\.\\d{1,6})?$"
          }
        },
        "required": [
          "name",
          "unitCount",
          "weightPerUnit"
        ]
      }
    },
    "changeReasons": {
      "maxItems": 20,
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "label": {
            "type": "string",
            "maxLength": 80
          },
          "reason": {
            "type": "string",
            "maxLength": 400
          }
        },
        "required": [
          "label",
          "reason"
        ]
      }
    },
    "locale": {
      "default": "en",
      "type": "string",
      "enum": [
        "en",
        "es"
      ]
    }
  },
  "required": [
    "currentYearLabel",
    "proposedYearLabel",
    "unitCount",
    "current",
    "proposed"
  ]
}
```

### `dues_increase.polish`

Polish explanation with AI. Needs an API key. Spends 1 AI credit from the key owner's monthly allowance.

Input schema version 1, output schema version 1.
MCP tool name: `dues_increase_polish`

Input JSON Schema:

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "runId": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    },
    "locale": {
      "default": "en",
      "type": "string",
      "enum": [
        "en",
        "es"
      ]
    }
  },
  "required": [
    "runId"
  ]
}
```

### Running an operation

Two ways in, and the difference is what an operation costs.

**No credential.** The four calculators are pure arithmetic — no model, nothing
stored, no allowance spent. Rate limited to 30 requests a minute per address.

```http
POST https://tools.rodri.ai/api/agent/tools/{toolId}/runs
Content-Type: application/json

{"operation": "meeting_quorum.calculate", "input": { ... }}
```

**With an API key.** Everything else, including every AI operation. The key's
owner creates it at https://tools.rodri.ai/account. It carries exactly their entitlements: a
free account has 20 AI credits a month and unlimited use of the calculators.
A key grants nothing its owner does not already have.

```http
POST https://tools.rodri.ai/api/agent/tools/{toolId}/runs
Authorization: Bearer hpt_live_…
Content-Type: application/json

{"operation": "resident_notice.generate", "input": { ... }}
```

Errors come back as `{"error": {"code", "message", "retryable"}}`. Branch on
`code` — `QUOTA_EXHAUSTED`, `RATE_LIMITED`, `REGISTRATION_REQUIRED`,
`VALIDATION_ERROR` — not on the sentence, which is written for people and is
translated.

**MCP.** The same operations are exposed at `https://tools.rodri.ai/api/mcp` over Streamable
HTTP. It is stateless, so POST JSON-RPC and read the JSON reply; the same
`Authorization` header applies.
