Skip to main content
Glama
scoutapp

Scout Monitoring MCP

Official

get_app_trace

Retrieve detailed application performance traces with all spans to analyze and debug performance issues like slow endpoints and N+1 queries.

Instructions

Get an individual trace with all spans. Args: app_id (int): The ID of the Scout APM application. trace_id (int): The ID of the trace to retrieve.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
app_idYes
trace_idYes

Implementation Reference

  • The main handler function for the 'get_app_trace' MCP tool. Decorated with @mcp.tool for registration. Fetches the trace data using the ScoutAPMAsync client and handles API errors.
    @mcp.tool(name="get_app_trace") async def get_app_trace(app_id: int, trace_id: int) -> dict[str, Any]: """ Get an individual trace with all spans. Args: app_id (int): The ID of the Scout APM application. trace_id (int): The ID of the trace to retrieve. """ try: async with api_client as scout_client: trace = await scout_client.get_trace(app_id, trace_id) return trace except scout_api.ScoutAPMError as e: return {"error": str(e)}
  • Supporting method in ScoutAPMAsync class that implements the core logic: makes an HTTP GET request to the Scout API endpoint /apps/{app_id}/traces/{trace_id} and extracts the trace data from the response.
    async def get_trace(self, app_id: int, trace_id: int) -> Dict[str, Any]: """Get a specific trace with all its spans.""" response = await self._make_request( "GET", f"apps/{app_id}/traces/{trace_id}", ) return response.get("results", {}).get("trace", {})

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