Skip to main content
Glama

Count matches per ad rule

get_ad_mapping_counts
Read-only

Get Ad Mapping Counts

When to use: 광고 매핑 규칙별로 실제 적용된 결과 건수(applied_result_count)를 집계 조회할 때.

Limitations: Trino 집계라 비교적 무겁다 — 규칙 목록(list_ad_mappings)과 따로 부르는 도구다. 파라미터 없음. data_management:read 권한 필요.

Examples:

  • Q: 광고 매칭 규칙별로 몇 건이나 적용됐는지 알려줘 params: {}

Output shape: list: 규칙별 applied_result_count

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": "get_ad_mapping_counts"
  }
}

Input Schema

NameRequiredDescriptionDefault
project-idNo

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

B3.4/5.0
Behavior3/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 the safety profile is known. The description adds genuinely new behavior: the Trino aggregation is comparatively expensive, and a data_management:read permission is required. However, it also asserts "파라미터 없음" (no parameters) while the schema defines project-id, which undermines confidence in the behavioral claims.

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?

The description is front-loaded with a when-to-use line, a limitations line, an example, and an output shape, which is easy to scan. The opening title line merely restates the tool name and is wasted space, but the rest of the structure is efficient.

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

Completeness3/5

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

For a lightweight read-only aggregation, the description covers trigger, cost, permission, and an example. The output-shape line is redundant given the output schema exists. The main gap is the incorrect claim of no parameters, which leaves the project-id argument unexplained for an agent trying to scope results.

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

Parameters2/5

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

Schema description coverage is 0% for the single project-id parameter, so the description was the only place to explain it — and instead it states there are no parameters. That is actively misleading for an agent that could pass project-id to scope the aggregation. This is worse than simply omitting parameter detail.

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

Purpose4/5

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

The description states a specific operation: aggregate the applied_result_count per ad mapping rule via a Trino query. It also names the sibling list_ad_mappings and clarifies this tool is called separately from it, so an agent can distinguish the two. It does not differentiate from count_ad_rule_matches, which may overlap, but the core purpose is unambiguous.

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?

"When to use" gives a concrete trigger (aggregate applied result counts per rule), and the Limitations section adds a real routing hint: it is heavy and should be called separately from the rule list in list_ad_mappings. It stops short of explicit when-not-to-use conditions or a named alternative for counting scenarios, but the context is clear.

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.

Resources