this repo has no description

Fix feed tool to handle Letta's Literal type conversion issue

- Remove Literal type that gets converted to FeedName.value in sandbox
- Keep workaround to strip 'FeedName.' prefix if present
- Use plain string type with validation in function body

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

+6 -2
+6 -2
tools/feed.py
··· 1 1 """Feed tool for retrieving Bluesky feeds.""" 2 2 from pydantic import BaseModel, Field 3 - from typing import Optional, Literal 3 + from typing import Optional 4 4 5 5 6 6 class FeedArgs(BaseModel): 7 - feed_name: Optional[Literal["home", "discover", "ai-for-grownups", "atmosphere"]] = Field(None, description="Named feed preset. Available feeds: 'home' (timeline), 'discover' (what's hot), 'ai-for-grownups', 'atmosphere'. If not provided, returns home timeline") 7 + feed_name: Optional[str] = Field(None, description="Named feed preset. Available feeds: 'home' (timeline), 'discover' (what's hot), 'ai-for-grownups', 'atmosphere'. If not provided, returns home timeline") 8 8 max_posts: int = Field(default=25, description="Maximum number of posts to retrieve (max 100)") 9 9 10 10 ··· 37 37 38 38 # Resolve feed URI from name 39 39 if feed_name: 40 + # Handle case where agent passes 'FeedName.discover' instead of 'discover' 41 + if '.' in feed_name and feed_name.startswith('FeedName.'): 42 + feed_name = feed_name.split('.', 1)[1] 43 + 40 44 # Look up named preset 41 45 if feed_name not in feed_presets: 42 46 available_feeds = list(feed_presets.keys())