fix(tools): correct Letta tool registration with json_schema
Consolidates multiple debugging iterations into working tool registration.
## What was fixed
1. **json_schema format**: Letta uses a flat format, NOT OpenAI's nested format
- Wrong: `{type: 'function', function: {name, parameters}}`
- Right: `{name, description, parameters}`
2. **Schema must be explicit**: Letta's "auto-extraction from Python source"
doesn't work reliably. Always pass json_schema explicitly in both
create AND update calls.
3. **Python function signatures**: Generate explicit typed parameters
`def tool(arg: str)` instead of `def tool(**kwargs)` so Letta knows
what arguments to pass.
4. **Tool attachment timing**: Tools must be attached AFTER agent creation
when using letta-free model workaround (tool_ids in create doesn't work).
5. **Update existing tools**: Check for existing tools by name and update
them instead of failing on duplicate registration.
## Files changed
- src/tools/dispatcher.ts: Generate proper Python signatures + json_schema
- src/letta.ts: Update existing tools, include json_schema in PATCH
- src/bot.ts: Attach tools after agent creation
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>