Skip to main content
Glama
Metrx MCP Server

Metrx MCP Server

by metrxbots

Get Agent ROI

metrx_get_task_roi
Read-onlyIdempotent

Calculate an agent's ROI to compare total costs and attributed business value, view ROI multiplier and breakdowns by model and outcome type—identify high-value agents per dollar spent.

Instructions

Calculate return on investment for an agent. Shows total costs (LLM API calls), total outcomes (attributed business value), ROI multiplier, and breakdown by model and outcome type. Useful for identifying which agents generate the most value per dollar spent. Do NOT use for fleet-wide ROI — use generate_roi_audit for that. Requires an API key with the 'read' scope.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "agent_id": "<agent_id>"
    },
    "name": "metrx_get_task_roi"
  }
}

Input Schema

NameRequiredDescriptionDefault
daysNoNumber of days to analyze (default: 30)
agent_idYesThe agent UUID to calculate ROI for

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.2

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent, non-destructive, closed-world, so the safety profile is covered. The description still adds real value beyond them: the shape of the returned data and the authorization requirement ('API key with the read scope'). It stops short of noting rate limits or latency, so it is not fully exhaustive.

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?

Well front-loaded: the verb+resource and output contents come first, the exclusion second, and the auth prerequisite last. It is slightly longer than necessary, since the 'useful for identifying which agents...' sentence partially restates the preceding output summary.

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

Completeness4/5

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

There is no output schema, so the description correctly compensates by describing the return contents, and it discloses the auth prerequisite up front. For a single-entity reporting call with two fully documented parameters, only minor details (aggregation window semantics against 'days', result size) are absent.

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

Parameters3/5

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

Schema description coverage is 100% and both parameters (agent_id as UUID, days with default/min/max) are already fully documented. The description mentions neither parameter name, so it contributes no additional meaning at the argument level; the baseline 3 applies.

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

Purpose5/5

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

States a specific verb and resource ('Calculate return on investment for an agent') and then enumerates the computed outputs (total costs, total outcomes, ROI multiplier, per-model/per-outcome breakdown). It explicitly distinguishes itself from the fleet-wide sibling, so an agent can pick it without opening any schema.

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

Usage Guidelines5/5

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

Gives an explicit use case ('identifying which agents generate the most value per dollar spent') and an explicit exclusion with a named alternative ('Do NOT use for fleet-wide ROI — use generate_roi_audit for that'). Nothing about when to select this tool is left to inference.

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