Update architecture section with expanded tools/ directory tree showing
specific package purposes. Remove placeholder context7 link template and
revise tool creation instructions.
Assisted-by: Claude Opus 4.5 via Crush <crush@charm.land>
@@ -10,7 +10,6 @@ MCP server exposing Lunatask to LLMs. Primary use case is letting the user say "
If you know what doc-agent is, use it to check go module APIs often. You can check context7 for details on various libraries directly if the MCP tools are available:
-- [link](target) (`/context7/id`) - description
- [lunatask.app/api](https://lunatask.app/api) (`/websites/lunatask_app_api`) - Official Lunatask REST API documentation
- [git.secluded.site/go-lunatask](https://git.secluded.site/go-lunatask) (`/websites/pkg_go_dev_git_secluded_site_go-lunatask`) - Go client for the Lunatask API
- [github.com/charmbracelet/fang](https://github.com/charmbracelet/fang) (`/charmbracelet/fang`) - CLI starter kit with styled help, error handling, and version management for Cobra
@@ -32,7 +31,12 @@ task # before committing
```
cmd/lunatask-mcp-server.go → Config, tool registration, SSE server
-tools/ → MCP tool handlers
+tools/
+ ├── areas/ → list_areas_and_goals tool
+ ├── habits/ → list_habits, track_habit tools
+ ├── tasks/ → create/update/delete_task tools
+ ├── timestamp/ → get_timestamp tool
+ └── shared/ → Provider interfaces, error helpers
```
**Data flow**: SSE/STDIO request → MCP server → tool handler → lunatask client → Lunatask API
@@ -43,8 +47,10 @@ tools/ → MCP tool handlers
**New MCP tool**:
-1. Add handler method to `tools/` (on `Handlers` struct)-2. Register tool with `mcpServer.AddTool()` in `cmd/lunatask-mcp-server.go`
+1. Create package in `tools/` with `Handler` type and `NewHandler()` constructor
+2. Add handler methods (`Handle`, `HandleCreate`, etc.) returning `(*mcp.CallToolResult, error)`
+3. Put description constants in `prose.go` within the package
+4. Register tool with `mcpServer.AddTool()` in `cmd/lunatask-mcp-server.go`
## Key Patterns