Skip to main content
Glama
Metrx MCP Server

Metrx MCP Server

by metrxbots

Get Attribution Report

metrx_get_attribution_report
Read-onlyIdempotent

Get attribution report showing which agent actions led to business outcomes. Shows outcome counts, total values, confidence scores, and top contributing agents.

Instructions

Get attribution report showing which agent actions led to business outcomes. Shows outcome counts, total values, confidence scores, and top contributing agents. Do NOT use for board-level reporting — use generate_roi_audit for formal audit reports. 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_attribution_report"
  }
}

Input Schema

NameRequiredDescriptionDefault
daysNoNumber of days to include (default: 30)
modelNoAttribution model to use (default: direct)direct
agent_idNoOptional: filter to specific agent (omit for all agents)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.6.3
    • changedInput schema / properties / agent_id / description
      Previous value: -"Optional: filter to specific agent (omit for fleet-wide)"New value: +"Optional: filter to specific agent (omit for all agents)"
  2. Changed2 schema fields changedv0.5.0
    • changedInput schema / properties / model / description
      Previous value: -"Attribution model preference. Note: the current /api/outcomes endpoint returns outcomes regardless of attribution method, so this is informational only. Canonical enum source: agentledger apps/web/lib/attribution/types.ts."New value: +"Attribution model to use (default: direct)"
    • changedInput schema / properties / model / enum
      Previous value: -[
      -  "direct",
      -  "session_direct",
      -  "first_touch",
      -  "last_touch"
      -]New value: +[
      +  "direct",
      +  "last_touch",
      +  "first_touch"
      +]
  3. Changed2 schema fields changedv0.2.5
    • changedInput schema / properties / model / description
      Previous value: -"Attribution model to use (default: direct)"New value: +"Attribution model preference. Note: the current /api/outcomes endpoint returns outcomes regardless of attribution method, so this is informational only. Canonical enum source: agentledger apps/web/lib/attribution/types.ts."
    • changedInput schema / properties / model / enum
      Previous value: -[
      -  "direct",
      -  "last_touch",
      -  "first_touch"
      -]New value: +[
      +  "direct",
      +  "session_direct",
      +  "first_touch",
      +  "last_touch"
      +]
  4. First observedv0.1.2

TDQS

A4.5/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint, destructiveHint=false, and closed-world, so the safety profile is covered. The description adds real value beyond them by disclosing the return payload shape and the 'read' scope auth requirement, but says nothing about pagination, rate limits, or how confidence scores are computed.

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?

Three short sentences, front-loaded with the payload contents, then the exclusion, then the prerequisite. No filler or repetition of the title, and every sentence carries distinct information.

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?

For a simple, annotation-covered read tool with zero required parameters and full schema coverage, the description supplies the remaining gaps: what data comes back, when not to use it, and the credential needed. No output schema exists, and the description compensates by summarizing the returned metrics.

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 all three parameters (days, model, agent_id) are documented with defaults and an enum in the schema itself. The description adds no parameter-level meaning such as how the attribution model choice changes results, so 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 ('Get attribution report') and immediately defines its subject: which agent actions led to business outcomes. It also enumerates the returned metrics (outcome counts, total values, confidence scores, top contributing agents), so an agent can distinguish it from reporting siblings without opening a 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?

Explicitly states a negative case ('Do NOT use for board-level reporting') and names the replacement tool (generate_roi_audit) for that case, plus the prerequisite of an API key with 'read' scope. That is both a when-not and an alternative, which is the strongest form of guidance.

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