Skip to main content
Glama

get_program_analytics

Analyze loyalty program performance to track engagement, rewards distribution, and participant activity metrics.

Instructions

Get analytics for your loyalty programs

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The `get_program_analytics` tool is registered and implemented in the `supabase/functions/loyalty-mcp/index.ts` file. It queries the `merchant_analytics` table for the merchant associated with the agent's owner address.
    mcpServer.tool("get_program_analytics", {
      description: "Get analytics for your loyalty programs",
      inputSchema: { type: "object" as const, properties: {} },
      handler: async () => {
        const err = authGuard(["read"]);
        if (err) return T(err);
        const { data, error } = await db().from("merchant_analytics").select("*").eq("merchant_address", agent.ownerAddress);
        if (error) return T(JSON.stringify({ error: error.message }));
        return T(JSON.stringify({ analytics: data || [] }));
      },
    });
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure but fails to state whether this is read-only, if it requires specific permissions, whether data is real-time or cached, or the expected data volume. The verb 'Get' weakly implies a safe read operation, but this is insufficient for a data retrieval tool without output schema documentation.

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 a single, efficient sentence with no wasted words. However, given the lack of output schema and annotations, it is arguably under-specified rather than optimally concise—it leaves critical behavioral and return-value information unstated.

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

Completeness2/5

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

With no output schema, no annotations, and zero parameters, the description should explain what analytics are returned (metrics, time periods, aggregation levels) and how to interpret them. It currently provides only a high-level label without the necessary detail to use the tool effectively.

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?

The input schema contains zero parameters, establishing a baseline score of 4. The description implies the scope ('your loyalty programs' plural) suggests analytics for all user programs are returned, adding minimal semantic context about the implicit filtering, though it doesn't explain how program selection works.

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 uses a specific verb ('Get') and identifies the resource ('analytics for your loyalty programs'), clarifying this retrieves statistical data rather than program configurations. It implicitly distinguishes from sibling 'list_loyalty_programs' by focusing on analytics rather than program metadata, though it lacks specificity about what metrics are included.

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?

The description provides no guidance on when to use this tool versus alternatives like 'list_loyalty_programs' or prerequisites such as having active loyalty programs. There are no exclusions, context requirements, or workflow positioning hints.

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/aspekt19/unboxed-loyalty-spark'

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