get_app_error_groups
Retrieve recent application error groups from Scout Monitoring to identify and analyze performance issues, with optional filtering by specific endpoints or error groups.
Instructions
Get recent error_groups for an app, optionally filtered to a specific endpoint or
group.
Args:
app_id (int): The ID of the Scout APM application.
endpoint_id (str | None): The ID of the endpoint to filter errors. If None,
fetches all errors for the app.
error_group_id (str | None): The ID of the error group to filter errors.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| app_id | Yes | ||
| endpoint_id | No | ||
| error_group_id | No | ||
| from_ | Yes | ||
| to | Yes |
Implementation Reference
- scout_mcp/server.py:305-336 (handler)The handler function for the 'get_app_error_groups' tool, registered via @mcp.tool decorator. It fetches error groups or a specific error group from the Scout APM API, optionally filtered by endpoint and time range, handling errors appropriately.@mcp.tool(name="get_app_error_groups") async def get_app_error_groups( app_id: int, from_: str, to: str, endpoint_id: str | None = None, error_group_id: str | None = None, ) -> list[dict[str, Any]] | dict[str, Any]: """ Get recent error_groups for an app, optionally filtered to a specific endpoint or group. Args: app_id (int): The ID of the Scout APM application. endpoint_id (str | None): The ID of the endpoint to filter errors. If None, fetches all errors for the app. error_group_id (str | None): The ID of the error group to filter errors. """ try: duration = scout_api.make_duration(from_, to) async with api_client as scout_client: if error_group_id: errors = await scout_client.get_error_group(app_id, error_group_id) errors = [errors] if errors else [] else: errors = await scout_client.get_error_groups( app_id, duration, endpoint_id ) return errors except scout_api.ScoutAPMError as e: return [{"error": str(e)}]