# Difficult Resident Reply Builder

> Turn a difficult message into a clear, respectful reply with a real next step, ready for you to review.

Human page: https://tools.rodri.ai/tools/resident-reply
Skill: https://tools.rodri.ai/.well-known/skills/resident-reply/SKILL.md
Category: communication
Exports: text, markdown

## Operations

| Operation | Engine | Cost |
| --- | --- | --- |
| `resident_reply.generate` | ai | 1 AI credit |

### `resident_reply.generate`

Draft the reply. 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: `resident_reply_generate`

Input JSON Schema:

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "residentMessage": {
      "type": "string",
      "minLength": 1,
      "maxLength": 8000
    },
    "knownFacts": {
      "type": "string",
      "maxLength": 4000
    },
    "policyExcerpt": {
      "type": "string",
      "maxLength": 4000
    },
    "policySource": {
      "type": "string",
      "maxLength": 160
    },
    "desiredOutcome": {
      "type": "string",
      "minLength": 1,
      "maxLength": 400
    },
    "authorizedCommitments": {
      "type": "string",
      "maxLength": 2000
    },
    "tone": {
      "default": "calm",
      "type": "string",
      "enum": [
        "calm",
        "warmer",
        "firmer"
      ]
    },
    "channel": {
      "default": "email",
      "type": "string",
      "enum": [
        "email",
        "short_message"
      ]
    },
    "locale": {
      "default": "en",
      "type": "string",
      "enum": [
        "en",
        "es"
      ]
    },
    "communityName": {
      "type": "string",
      "maxLength": 120
    },
    "senderName": {
      "type": "string",
      "maxLength": 120
    }
  },
  "required": [
    "residentMessage",
    "desiredOutcome"
  ]
}
```

### 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.
