Skip to main content
Glama
Metrx MCP Server

Metrx MCP Server

by metrxbots

Get Optimization Recommendations

metrx_get_optimization_recommendations
Read-onlyIdempotent

Get cost optimization recommendations, computed by rule from your measured usage, for a specific agent or all your agents.

Instructions

Get cost optimization recommendations, computed by rule from your measured usage, for a specific agent or all your agents. Returns actionable suggestions including model switching, token guardrails, provider arbitrage, batch processing opportunities, and revenue intelligence insights. Each suggestion includes estimated monthly savings and confidence level. Read-only: it recommends, it does not change anything. To test a model switch, record an experiment with create_model_experiment. Requires an API key with the 'read' scope.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "metrx_get_optimization_recommendations"
  }
}

Input Schema

NameRequiredDescriptionDefault
agent_idNoSpecific agent to analyze. Omit for recommendations across all agents.
include_revenueNoInclude revenue-side insights (R3, R4, R6) in addition to cost optimizations

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.6.3
    • changedInput schema / properties / agent_id / description
      Previous value: -"Specific agent to analyze. Omit for fleet-wide recommendations."New value: +"Specific agent to analyze. Omit for recommendations across all agents."
  2. Addedv0.2.5
  3. Removedv0.1.3
  4. Addedv0.2.0
  5. Removedv0.2.2
  6. Addedv0.2.1
  7. Removed
  8. 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 readOnlyHint, idempotentHint and destructiveHint=false, so the bar is lower, yet the description still adds real context: how recommendations are produced ('computed by rule from your measured usage'), what each result contains (estimated monthly savings, confidence level), and an authentication prerequisite ('Requires an API key with the read scope'). The 'it recommends, it does not change anything' line largely restates the annotation but usefully preempts a mutation assumption.

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

Conciseness5/5

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

Front-loaded with purpose and scope, then return contents, then safety, then the sibling pointer and auth requirement. Every sentence carries distinct information; the category list is dense but directly serves tool selection.

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

Completeness5/5

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

With no output schema, the description steps in to describe the shape of results (per-suggestion savings and confidence) and the recommendation types. Combined with the zero-required-parameter schema, safety annotations, and auth note, an agent has everything needed to call it correctly and interpret the response.

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%, so both parameters are already documented in structured form; the description's 'specific agent or all your agents' only paraphrases agent_id. The include_revenue flag and its R3/R4/R6 insight categories are never explained in the description, leaving that nuance entirely to the schema. Baseline 3 is appropriate.

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 ('Get cost optimization recommendations'), the scope ('for a specific agent or all your agents'), and enumerates the recommendation categories returned (model switching, token guardrails, provider arbitrage, batch processing, revenue intelligence). An agent can distinguish this from sibling read tools like get_cost_summary or get_scorecard without opening the schema.

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

Usage Guidelines4/5

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

Clearly frames the use case (optimization suggestions rather than raw metrics) and routes to a specific alternative: 'To test a model switch, record an experiment with create_model_experiment.' It also implies the omit-agent_id case for a fleet-wide view. It stops short of stating exclusions, e.g., when to prefer get_decision_queue or get_verdicts for acting on these suggestions.

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