Skip to main content
Glama

apex_add_stat_delta

Add a stat card with a metric's current value, delta vs previous period, and trend arrow to highlight performance changes.

Instructions

Add a stat card with current value, delta, and trend arrow (up/down).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
columnsNoNumber of columns (2-4).
metricsYesList of metric dicts: - "label": Card title - "sql": SQL returning current scalar value - "prev_sql": SQL returning previous-period value (for delta) - "icon": Font Awesome class (e.g., "fa-users") - "color": Accent color - "suffix": Unit suffix ("%", " pacientes", etc.) - "prefix": Unit prefix ("R$ ", "$", etc.)
page_idYesTarget page ID.
sequenceNoDisplay order on page.
custom_cssNoAdditional CSS rules injected into the style block.
delta_labelNoLabel text after the percentage change (default "vs anterior").vs anterior
region_nameYesInternal region name.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior3/5

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

Annotations declare readOnlyHint=false, so the agent already knows this is a write operation. The description adds that it creates a stat card with delta and trend arrow, which is consistent and adds some behavioral context. However, it does not disclose potential side effects, permissions, or whether it modifies existing regions, leaving a moderate gap.

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?

The description is a single, front-loaded sentence that conveys the core purpose without any wasted words. It is concise and easily parsable.

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?

Given the tool's complexity (7 parameters, nested metrics array, SQL queries), the description is minimal. While the schema covers parameter details and an output schema exists, the description lacks usage differentiation and behavioral nuance. It explains what the card shows but not the mechanism for trend arrow or prerequisites, leaving it adequate but not complete.

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 the schema already explains each parameter, including prev_sql for delta. The description adds only a high-level mention of 'current value, delta, and trend arrow', which is partially redundant with the schema. It does not provide additional parameter-level meaning beyond that.

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 verb 'Add' and the resource 'stat card', with specific detail about its contents: current value, delta, and trend arrow. This distinguishes it from sibling tools like apex_add_metric_cards, which likely offers a more generic stat card without the delta/trend emphasis.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance is provided on when to use this tool versus alternatives such as apex_add_metric_cards, apex_add_kpi_row, or apex_add_spotlight_metric. The description simply states what it does without any context for selection or exclusion.

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/TechFernandesLTDA/apex-mcp'

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