Skip to main content
Glama

Performance diagnosis

diagnose_performance
Read-only

Use when sponsored ads performance changed and you need retained-report root-cause comparison between two periods. Defaults to Sponsored Products and can also diagnose Sponsored Brands or Sponsored Display. Compares product-appropriate campaign, ad, search-term, targeting, or advertised-product dimensions. Do not use for live entity state or write readback.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
ad_productNoSponsored ad product to diagnose: SP, SB, or SD. Defaults to SP for backwards compatibility.SP
profile_idNoFilter by profile ID
compare_endYesComparison period end date (YYYY-MM-DD)
current_endYesCurrent period end date (YYYY-MM-DD)
focus_metricNoMetric to focus root cause analysis onacos
campaign_nameNoFilter by campaign name (LIKE match)
compare_startYesComparison period start date (YYYY-MM-DD)
current_startYesCurrent period start date (YYYY-MM-DD)
include_raw_rowsNoFalse returns compact rows. Default true.
include_diagnosticsNoTrue may add expanded freshness diagnostics. Basic empty-result data-window diagnostics are included by default when available.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
evidenceNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true, destructiveHint=false, and openWorldHint=false, so safety is covered. The description adds genuinely useful context beyond that: results derive from retained reports rather than live state, dimensions compared vary by ad product, and the excluded live-entity use case is called out. It does not detail data-freshness lag or result shape, but the output schema covers returns.

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 sentences, each earning its place: the trigger and purpose first, the ad-product scope second, the exclusions last. No filler, and the most decision-relevant information is front-loaded.

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 ten-parameter diagnostic tool with an output schema, the description covers purpose, scope, and exclusions adequately, and the schema carries parameter detail. It could be slightly more complete about what the comparison returns or how the two periods are expected to relate, but nothing essential to correct invocation is missing.

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 the schema already documents all ten parameters including the ad_product and focus_metric enums. The description only loosely reinforces this via "defaults to Sponsored Products" and "product-appropriate dimensions," adding little syntax or format detail beyond 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?

The description names a specific verb and resource — root-cause comparison between two periods for sponsored ads performance changes — and scopes it to retained reports. It clearly separates this diagnostic tool from the many read-out siblings like get_campaign_performance, get_sb_campaign_performance, and get_sd_campaign_performance by framing it as comparison/diagnosis rather than reporting.

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?

It gives an explicit trigger ("Use when sponsored ads performance changed") and an explicit exclusion ("Do not use for live entity state or write readback"), which is strong when/when-not guidance. It stops short of naming the specific sibling tool to use for live entity state, so it falls just under the 5 bar of naming alternatives.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.