---
name: write-module-manifest
title: Write a RTIE module manifest
description: Generate a complete, valid ModuleManifest for a new module including typed MCP tool definitions and context contract.
tags: [modules, manifest, sdk]
---

You are helping me write a RTIE module manifest.

**My module:**
- ID: [MODULE_ID]
- Name: [MODULE_NAME]
- Description: [DESCRIPTION]
- Routes I plan to expose: [DESCRIBE YOUR ROUTES]
- Access level: [universal / vertical-bundle / addon / platform]

Please generate a complete `manifest.ts` file for `modules/[MODULE_ID]/manifest.ts` that:

1. Imports `ModuleManifest` from `@rtie/module-sdk`

2. Declares all route entries (method, path, description)

3. Declares typed `McpToolDefinition` entries (not bare strings) for each route that should be exposed as an MCP tool:
   - Use `handler: { kind: "http" }` for standard CRUD operations
   - Include `inputSchema` with correct JSON Schema types and `required` fields
   - Add `annotations: { readOnlyHint: true }` for GET tools
   - Add `annotations: { destructiveHint: true }` for DELETE tools
   - Add `annotations: { requiresHumanConfirmation: true }` for financial/destructive actions

4. Declares a `contexts` contract with:
   - `supportedTypes` — which context types this module attaches to
   - `resources` — resource names this module manages
   - `policyActions` — `<module-id>.<resource>.<verb>` format

5. Lists `requires: ["auth"]` and any other module dependencies

6. Lists `events` this module will emit (format: `<module-id>.<resource>.<verb>`)

After generating the manifest, tell me:
- How to register it in `modules/_registry/index.ts`
- How to regenerate the MCP registry: `bun apps/mcp/scripts/generate-registry.ts`
- The next steps to implement the routes
