Skip to main content
Glama
Metrx MCP Server

Metrx MCP Server

by metrxbots

Attribute Task to Outcome

metrx_attribute_task

Links an agent task or event to a business outcome to track ROI and map agent actions to measurable results.

Instructions

Link an agent task/event to a business outcome for ROI tracking. This creates a mapping between agent actions and measurable business results. Do NOT use for reading attribution data — use get_attribution_report or get_task_roi. Requires an API key with the 'write' 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>",
      "outcome_type": "<outcome_type>",
      "outcome_source": "<outcome_source>"
    },
    "name": "metrx_attribute_task"
  }
}

Input Schema

NameRequiredDescriptionDefault
agent_idYesThe agent UUID to attribute
event_idNoOptional: specific event/task ID to attribute
descriptionNoOptional description of the outcome
value_centsNoOutcome value in cents
outcome_typeYesType of outcome
outcome_sourceYesSource of the outcome data

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.2

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=false, destructiveHint=false, and openWorldHint=false, so the description's main added value is the prerequisite: an API key with 'write' scope. That is real, non-redundant context. It falls short of 5 because it says nothing about the non-idempotent behavior declared in annotations — an agent is not warned that repeated calls may create duplicate mappings.

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 action and scope, followed by the effect and then the exclusion plus prerequisite. No filler and nothing an agent must scan past.

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?

For a 6-parameter write tool with no output schema, the definition covers action, effect, alternative, and auth requirement, which is enough to invoke it correctly. The remaining gap is the return contract and duplicate-attribution semantics, which the absence of an output schema pushes back onto the description.

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 enums are documented inline, so the schema already carries full parameter meaning. The description adds no field-level guidance (e.g., when event_id is needed, or how value_cents interacts with outcome_type), 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?

The description states a specific verb and resource ('Link an agent task/event to a business outcome') plus the intent ('for ROI tracking'), and explicitly distinguishes itself from read-side siblings get_attribution_report and get_task_roi. An agent can identify this as the write counterpart to the attribution read tools 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?

It gives an explicit when-not rule ('Do NOT use for reading attribution data') and names the two alternative tools that cover that case. Combined with the positive case in the first sentence, the routing decision is fully determined.

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