get_metrics
Aggregate request metrics for this project over a time window — volume, error rate and p50/p95/p99 latency, bucketed for charting. By default the series cover inbound requests; pass targetId to slice over one outbound target's per-attempt rows instead (answers "which target is degraded?"); pass e...
This record as markdown: /tools/dev-echorelay-management/get-metrics.md
What get_metrics does on EchoRelay
AI agents call get_metrics to retrieve information from EchoRelay without modifying anything. It is typically the context-gathering step in research, monitoring, and reporting workflows, before the agent takes action elsewhere.
| Parameter | Type | Required | Description |
|---|---|---|---|
window | string | — | Time horizon. Defaults to "day". "week"/"month" require a paid plan; otherwise the server returns "day" with planGated=true. |
targetId | string | — | Optional outbound target UUID (from get_endpoint targets). When set, the series aggregate the per-attempt rows for that target instead of the project-wide inbou |
endpointId | string | — | Optional endpoint UUID (from list_endpoints / get_endpoint). When set, the series aggregate inbound request rows for that endpoint only. Mutually exclusive with |
Parameters from the server's own tool schema.
Why get_metrics is rated Low
Even though get_metrics only reads data, uncontrolled read access leaks sensitive information and racks up API costs: an agent caught in a retry loop can make thousands of calls a minute without anyone noticing.
Attacks that exploit this kind of access
The rule that runs get_metrics safely
PolicyLayer is an MCP gateway: it sits between your AI agents and EchoRelay, and checks every tool call against a rule you set before the call runs. Nothing changes on the server itself. For get_metrics, this is the rule to start with:
get_metrics is read-only, so it stays allowed. Everything else on the server is denied unless you say otherwise.
The button opens the PolicyLayer dashboard: create your workspace, connect EchoRelay, apply this rule, and every get_metrics call is checked against it from then on.
Questions about get_metrics
Aggregate request metrics for this project over a time window — volume, error rate and p50/p95/p99 latency, bucketed for charting. By default the series cover inbound requests; pass targetId to slice over one outbound target's per-attempt rows instead (answers "which target is degraded?"); pass endpointId to slice over inbound rows for a single endpoint (answers "is this endpoint receiving traffic / erroring?"). Pass at most one of targetId / endpointId. Free plans see "hour" and "day"; "week" and "month" require an active paid subscription on the project owner and are silently downgraded to "day" otherwise (the response includes planGated: true when that happens). Returns {window, requestedWindow, planGated, scope, targetId?, endpointId?, bucketSeconds, buckets[], volume[], errors[], totalVolume, totalErrors, errorRate} plus latency series whose keys depend on scope: an inbound read (project-wide, or endpointId) carries relayP50[]/relayP95[]/relayP99[] for our own time and targetP50[]/targetP95[]/targetP99[] for the destination's, never blended; a targetId read carries p50[]/p95[]/p99[] for that target's attempts — series arrays are dense (one point per bucket, zero-filled when no traffic). It is categorised as a Read tool in the EchoRelay MCP Server, which means it retrieves data without modifying state.
get_metrics accepts 3 parameters: window, targetId, endpointId. The full parameter table on this page comes from the server's own tool schema.
Register the EchoRelay MCP server in PolicyLayer and add a rule for get_metrics: allow, deny, rate-limit, or require approval. Point your MCP client at the PolicyLayer proxy URL and the rule is enforced on every call, before it reaches EchoRelay. Nothing to install.
get_metrics is a Read tool with low risk. Read-only tools are generally safe to allow by default.
Yes. Add a rate_limit block to the get_metrics rule in your PolicyLayer policy. For example, setting max: 10 and window: 60 limits the tool to 10 calls per minute. Rate limits are tracked per agent session and reset automatically.
Set action: deny in the PolicyLayer policy for get_metrics. The AI agent will receive a policy violation error and cannot call the tool. You can also include a reason field to explain why the tool is blocked.
get_metrics is provided by the EchoRelay MCP server (https://mcp.echorelay.dev). PolicyLayer sits as a proxy in front of this server to enforce policies before tool calls reach the server.
More on EchoRelay, and thousands of servers like it.
This server
Across the catalogue