chore(roo): add pic-gen mode rules, update mcp.json and new-mcp-server skill

This commit is contained in:
Patrick Plate
2026-06-11 09:01:58 +02:00
parent 5692854ec4
commit 0cb94122bf
5 changed files with 346 additions and 16 deletions
+13 -2
View File
@@ -30,14 +30,23 @@ touch mcp/{name}/src/__init__.py
```
### Step 2 — Write `mcp/{name}/src/server.py`
**Convention:** All tool parameters **must** use `Annotated[type, Field(description="...")]` for
descriptions. Do **not** use docstring `Args:` sections — FastMCP reads `Field` metadata directly
to expose parameter descriptions in the MCP schema.
```python
from typing import Annotated
from fastmcp import FastMCP
from pydantic import Field
mcp = FastMCP("mcp-{name}")
@mcp.tool()
def {tool_name}(param: str) -> str:
"""Tool description."""
def {tool_name}(
param: Annotated[str, Field(description="What this parameter controls")],
) -> str:
"""One-line tool description (no Args: section needed)."""
# implementation
...
@@ -45,6 +54,8 @@ if __name__ == "__main__":
mcp.run()
```
> Optional parameters with defaults: `param: Annotated[int, Field(description="...")] = 10`
### Step 3 — Write `mcp/{name}/pyproject.toml`
```toml
[project]