Skip to main content
Glama
scoutapp

Scout Monitoring MCP

Official

get_endpoint_metrics

Retrieve performance metrics for specific application endpoints to monitor response times, throughput, and identify performance issues within a defined time range.

Instructions

Get a single timeseries metric for a specific endpoint in an application. Args: app_id (int): The ID of the Scout APM application. endpoint (str): The endpoint path (e.g., "/users", "/orders"). metric (str): The metric to retrieve (e.g., "response_time", "throughput"). from_ (str): The start datetime in ISO 8601 format. to (str): The end datetime in ISO 8601 format.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
app_idYes
endpointYes
metricYes
from_Yes
toYes

Implementation Reference

  • The handler function for the 'get_endpoint_metrics' tool. It is decorated with @mcp.tool(name="get_endpoint_metrics") and implements the logic to retrieve timeseries metric data for a specific endpoint in a Scout APM application using the ScoutAPI client.
    @mcp.tool(name="get_endpoint_metrics") async def get_endpoint_metric( app_id: int, endpoint: str, metric: str, from_: str, to: str ) -> dict[str, Any]: """ Get a single timeseries metric for a specific endpoint in an application. Args: app_id (int): The ID of the Scout APM application. endpoint (str): The endpoint path (e.g., "/users", "/orders"). metric (str): The metric to retrieve (e.g., "response_time", "throughput"). from_ (str): The start datetime in ISO 8601 format. to (str): The end datetime in ISO 8601 format. """ try: duration = scout_api.make_duration(from_, to) async with api_client as scout_client: data = await scout_client.get_endpoint_metric( app_id, endpoint, metric, duration ) except Exception as e: return {"error": str(e)} if metric not in data or not data[metric]: return { "error": f"No data available for endpoint {endpoint} and metric {metric}" } series = data[metric] return { "app_id": app_id, "endpoint": endpoint, "metric": metric, "duration": f"{from_} to {to}", "data_points": len(series), "series": series, }

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