# Fastapi Route Change

> Use when adding, renaming, or modifying a FastAPI route in genereviews-link.

- Skill: `tomevault-io/fastapi-route-change-4` (Agent Skill, multi-file: 2 files)
- Install (CLI): `npx skillmds@latest add tomevault-io/fastapi-route-change-4`
- Raw SKILL.md: https://api.skillmd.com/api/skills/tomevault-io/fastapi-route-change-4/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: tomevault-io (https://skillmd.com/u/tomevault-io)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/tomevault-io/fastapi-route-change-4

---


# FastAPI Route Change

Follow `AGENTS.md` first.

## Workflow

1. Inspect existing route modules under `genereview_link/api/routes/` and
   reuse their pattern (router declaration, dependency injection, error
   handling, response_model).
2. Use Pydantic models from `genereview_link/models/` for request and
   response shapes. Add new models there if needed.
3. Raise `DataNotFoundError` from the service layer (genereview_service.py)
   for 404 cases; let the existing exception handler convert it to HTTP 404.
4. Update or add MCP tool naming in `server_manager.create_mcp_server`'s
   `mcp_custom_names` and `mcp_route_maps` if the route should be exposed
   via MCP.
5. Add route-level tests in `tests/test_api_integration.py` and unit tests
   for any new service logic in the appropriate test file.
6. Update `README.md` API table if the public endpoint list changed.
7. Run `make ci-local` before handoff.

---
> Source: [berntpopp/genereviews-link](https://github.com/berntpopp/genereviews-link) — distributed by [TomeVault](https://tomevault.io).
<!-- tomevault:4.0:skill_md:2026-05-22 -->

