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

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

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,
        }
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states the tool retrieves metrics but doesn't describe what the output looks like (e.g., time-series data format), whether it's a read-only operation, potential rate limits, authentication needs, or error handling. For a tool with 5 parameters and no annotations, this is a significant gap in transparency.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is appropriately sized and front-loaded: the first sentence states the purpose clearly, followed by a structured 'Args:' section. Every sentence earns its place by providing essential information. It could be slightly more concise by integrating the parameter details into the main text, but it's well-organized and efficient.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the complexity (5 parameters, no annotations, but has an output schema), the description is partially complete. It covers parameter semantics well but lacks behavioral context (e.g., read-only nature, output format). The presence of an output schema means the description doesn't need to explain return values, but it should still address usage guidelines and transparency gaps for a tool with this many parameters.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The description adds substantial meaning beyond the input schema, which has 0% schema description coverage. It explicitly lists all 5 parameters with clear semantics: '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")', and date ranges with ISO 8601 format. This fully compensates for the lack of schema descriptions.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose: 'Get a single timeseries metric for a specific endpoint in an application.' It specifies the verb ('Get'), resource ('timeseries metric'), and scope ('specific endpoint in an application'), making it easy to understand. However, it doesn't explicitly differentiate from sibling tools like 'get_app_metrics' or 'get_app_endpoints', which might have overlapping functionality.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention sibling tools like 'get_app_metrics' (which might retrieve metrics at an app level) or 'get_app_endpoints' (which might list endpoints), leaving the agent to guess based on names alone. There's no context on prerequisites or exclusions.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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