Proposal: Complete Notification Management API for Autonomous Agents #85
Labels
No labels
Compat/Breaking
Kind/Bug
Kind/Documentation
Kind/Enhancement
Kind/Feature
Kind/OpenSpec
Kind/Security
Kind/Testing
Priority/Critical
Priority/High
Priority/Low
Priority/Medium
RFC - Request For Comments
Reviewed/Confirmed
Reviewed/Duplicate
Reviewed/Invalid
Reviewed/Won't Fix
Status/Abandoned
Status/Blocked
Status/Need More Info
approved
area:client-host
area:item-interaction
area:meta-tooling
area:operator-dev-loop
area:repository-hygiene
area:typescript-sdk
area:website
blocked
bug
castra:bot-active
castra:human
change
checker:tobi
close-suggested
code
copilot-conflict
deferred
dependencies
docs-ok
enhancement
fast-track
groom:close-suggested
hermes-attempted
hermes-needs-clarification
hermes-ready
hermes-review
hermes-wip
human
human-required
intake
merge
merge-conflict
needs-scope
no-concept-doc
no-demo
plan-approved
plan-needs-revision
portfolio:infrastructure
portfolio:mixed
portfolio:product
portfolio:unknown
prioritize
prioritized
priority:high
priority:low
priority:medium
propose
ready
retro
retro-proposal
review
stage:backlog
stage:blocked
stage:code
stage:done
stage:intake
stage:merge
stage:propose
stage:review
stage:waiting
status:waiting
tracker
triage
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
agentic-forges/forgejo-mcp#85
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Proposal: Complete Notification Management API for Autonomous Agents
The Need
Currently, the
forgejo-mcpserver exposes thecheck_notificationstool, which is excellent for passively polling unread notifications. However, for fully autonomous agents that rely heavily on the MCP server to interact with Forgejo, merely reading notifications is insufficient.Once an agent reads a notification, it needs a way to act upon it and, crucially, acknowledge it so that it doesn't process the same event in an endless loop. Without write access to the notification API, agents eventually get stuck or require manual GUI intervention.
The Solution
The Forgejo SDK already supports the full notification suite. We propose expanding the
User/Notificationstoolset inforgejo-mcpto expose these capabilities, allowing 100% headless notification management.We've designed and implemented the following 5 new tools:
get_notification_thread(Fetches a single thread by ID)mark_notification_read(Marks a specific thread as read)mark_all_notifications_read(Global acknowledgment)list_repo_notifications(Filters notifications scoped to a specific repository)mark_repo_notifications_read(Marks all notifications in a specific repository as read)Implementation Details
The implementation strictly adheres to the existing architecture in
operation/user/notification.go:log.LogMCPToolStart/LogMCPToolCompleteandforgejo.LogAPICallpatterns.mockNotificationServerinnotification_test.gohas been expanded to test all HTTP endpoints (includingPUTandPATCHmethods) and handles empty JSON responses correctly.README.mdis updated, and aShowboatdemo (demos/notifications-management.md) is provided.Next Steps
We have the code ready on our side. I will link a Pull Request to this issue shortly that contains the complete implementation, passing tests, and documentation updates.
Would love to get your thoughts on this expansion!