Skip to main content
Glama
markhilton
by markhilton

cja_get_top_items

Retrieve top N dimension items ranked by a metric for a specified date range. Ideal for identifying top performers such as pages by visits or products by revenue.

Instructions

Get top N items for a dimension ranked by a metric.

This tool is optimized for finding the top performing dimension items based on a single metric, such as top pages by visits, top products by revenue, etc.

Args: dimension: Dimension ID (e.g., 'variables/page', 'variables/product'). metric: Metric ID to rank by (e.g., 'metrics/visits', 'metrics/revenue'). start_date: Start date in YYYY-MM-DD format. end_date: End date in YYYY-MM-DD format. limit: Number of top items to return (default: 10, max: 500). dataview_id: Optional data view ID (uses configured default if not provided).

Returns: Dictionary with top dimension items and their metric values.

Example queries: - "What are the top 10 pages by visits this week?" - "Show me the top 20 products by revenue last month" - "Which marketing channels drove the most conversions?"

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
dimensionYes
metricYes
start_dateYes
end_dateYes
limitNo
dataview_idNo
Behavior3/5

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

With no annotations, the description carries full burden. It discloses that the tool returns a dictionary with metric values and mentions a max limit of 500, which is useful. However, it does not explicitly state that the tool is read-only, non-destructive, or any other behavioral traits beyond the return format.

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 well-structured: a concise purpose statement at the top, followed by a bullet-style Args section and a Returns clause, plus example queries. It is appropriately sized without unnecessary fluff, though the Args section repeats some schema metadata.

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?

Given no output schema, the description provides a brief return description and example queries, which is adequate. All 6 parameters are documented, and the tool's purpose is clear. However, it could benefit from explaining pagination or the structure of the returned dictionary in more detail.

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

Parameters4/5

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

Schema description coverage is 0%, so the description must compensate. It provides clear parameter explanations for all 6 parameters, including examples for dimension and metric (e.g., 'variables/page'), date format, limit with default and max, and dataview_id optionality. This adds significant meaning beyond the schema names and types.

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 clearly states the tool gets 'top N items for a dimension ranked by a metric', with concrete examples like 'top pages by visits' and 'top products by revenue'. This verb+resource combination is specific and distinguishes it from sibling report tools (e.g., cja_run_report, cja_run_breakdown_report) by emphasizing ranking and top-N filtering.

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?

The description explains the tool is 'optimized for finding the top performing dimension items' and provides example queries, giving strong context for when to use it. However, it does not explicitly state when not to use it or compare to alternative siblings like cja_run_breakdown_report for cross-tabulations or cja_search_dimension_items for searching.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/markhilton/adobe-cja-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server