append_api_contract
Store the durable contract for an API endpoint after creation or modification, capturing method, path, auth, request/response shapes, side effects, frontend usage, and related files.
Instructions
Use this tool after creating or modifying an API endpoint. Store only the durable endpoint contract: method, path, auth, request shape, response shape, side effects, frontend usage, and related files. Do not store full source code.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| auth | No | Authentication/authorization requirements (e.g., "Bearer token, admin role"). | |
| name | Yes | Human-readable name for the endpoint (e.g., "Create User"). | |
| path | Yes | API path (e.g., "/api/v1/users"). | |
| method | Yes | HTTP method: GET, POST, PUT, PATCH, DELETE. | |
| purpose | Yes | What this endpoint does and why it exists. | |
| request | No | Request body shape or query parameters as concise text or a code block. | |
| response | No | Response shape as concise text or a code block. | |
| sideEffects | No | Side effects like sending emails, updating caches, or triggering webhooks. | |
| relatedFiles | No | Paths to related source files (relative to project root). | |
| frontendUsage | No | How the frontend consumes this endpoint. |