Skip to main content
Glama
scoutapp

Scout Monitoring MCP

Official

get_app_insights

Retrieve performance insights for applications to identify issues like N+1 queries, memory bloat, and slow queries. Filter by insight type or get all types with configurable limits.

Instructions

Get or generate all insights for an application (cached for 5 minutes). Returns performance insights including N+1 queries, memory bloat, and slow queries. Each insight type includes count, new_count, and items array with specific details. If insight_type is provided, only that type will be returned. Args: app_id (int): The ID of the Scout APM application. insight_type: (str | None): Type of insight to filter (n_plus_one, memory_bloat, slow_query) If None (the default), all types will be returned. limit (int | None): Maximum number of items per insight type (default: 20).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
app_idYes
insight_typeNo
limitNo

Implementation Reference

  • The handler function for the 'get_app_insights' MCP tool, decorated with @mcp.tool(). It fetches application insights from Scout APM API, supporting filtering by insight_type and limit, with error handling.
    @mcp.tool(name="get_app_insights") async def get_app_insights( app_id: int, insight_type: str | None = None, limit: int | None = None ) -> dict[str, Any]: """ Get or generate all insights for an application (cached for 5 minutes). Returns performance insights including N+1 queries, memory bloat, and slow queries. Each insight type includes count, new_count, and items array with specific details. If insight_type is provided, only that type will be returned. Args: app_id (int): The ID of the Scout APM application. insight_type: (str | None): Type of insight to filter (n_plus_one, memory_bloat, slow_query) If None (the default), all types will be returned. limit (int | None): Maximum number of items per insight type (default: 20). """ try: async with api_client as scout_client: if insight_type is None: insights = await scout_client.get_insights(app_id, limit) else: insights = await scout_client.get_insight_by_type( app_id, insight_type, limit ) return insights 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