getAuditEvents
Retrieve and monitor audit trails of user actions and document activities in RSpace. Filter events by user, document, or date range to track system access and modifications.
Instructions
Retrieves audit trail of all actions performed in RSpace
Usage: Monitor document access, modifications, and user activity Filtering options:
username: Filter by specific user actions
global_id: Filter by specific document
date_from/date_to: ISO8601 format date range
Returns: Chronological list of system events
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| username | No | ||
| global_id | No | ||
| date_from | No | ||
| date_to | No |
Implementation Reference
- main.py:608-627 (handler)The handler function for the 'getAuditEvents' tool. Decorated with @mcp.tool to register it. Calls eln_cli.get_activity to retrieve audit events filtered by username, global_id, date_from, and date_to.@mcp.tool(tags={"rspace"}, name="getAuditEvents") def activity( username: str = None, global_id: str = None, date_from: str = None, date_to: str = None ) -> Dict[str, any]: """ Retrieves audit trail of all actions performed in RSpace Usage: Monitor document access, modifications, and user activity Filtering options: - username: Filter by specific user actions - global_id: Filter by specific document - date_from/date_to: ISO8601 format date range Returns: Chronological list of system events """ resp = eln_cli.get_activity(users=[username], global_id=global_id, date_from=date_from, date_to=date_to) return resp
- main.py:608-608 (registration)Registers the 'activity' function as the 'getAuditEvents' tool with rspace tag.@mcp.tool(tags={"rspace"}, name="getAuditEvents")