Skip to main content
Glama
scoutapp

Scout Monitoring MCP

Official

get_app_error_groups

Retrieve recent error groups for a Scout APM application, with optional filtering by specific endpoints or error groups to identify and analyze performance issues.

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
NameRequiredDescriptionDefault
app_idYes
from_Yes
toYes
endpoint_idNo
error_group_idNo

Implementation Reference

  • The primary handler function for the MCP tool 'get_app_error_groups'. It retrieves error groups for a given Scout APM application within a time range, optionally filtered by endpoint_id or a specific error_group_id. Uses the scout_api client to fetch the data and handles errors gracefully.
    @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)}]

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/scoutapp/scout-mcp-local'

If you have feedback or need assistance with the MCP directory API, please join our Discord server