MCPcopy Create free account
hub / github.com/pollinations/pollinations / tool_list_subscriptions

Function tool_list_subscriptions

apps/polly/src/services/github.py:1628–1649  ·  view source on GitHub ↗

List all subscriptions for a user.

(user_id: int)

Source from the content-addressed store, hash-verified

1626
1627
1628async def tool_list_subscriptions(user_id: int) -> dict:
1629 """List all subscriptions for a user."""
1630 subs = await subscription_manager.get_user_subscriptions(user_id=user_id)
1631
1632 if not subs:
1633 return {
1634 "success": True,
1635 "message": "📭 You don't have any active subscriptions.\n\nUse `subscribe #123` to subscribe to an issue!",
1636 }
1637
1638 lines = ["📬 **Your Subscriptions:**\n"]
1639 for sub in subs:
1640 issue_num = sub["issue_number"]
1641 state = sub.get("last_state", "open")
1642 emoji = "🟢" if state == "open" else "🔴"
1643 lines.append(f"{emoji} **#{issue_num}** ({state})")
1644
1645 lines.append(f"\n*{len(subs)} subscription(s) total*")
1646 return {
1647 "success": True,
1648 "message": "\n".join(lines),
1649 }
1650
1651
1652# Export consolidated tool handlers

Callers

nothing calls this directly

Calls 3

getMethod · 0.65
appendMethod · 0.65

Tested by

no test coverage detected