Skip to main content
Glama
dqhieu
by dqhieu

get-total-users

Retrieve the total user count of Compresto’s file compression app using real-time data from Compresto MCP for accurate usage insights and analysis.

Instructions

Get total users of Compresto

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • src/index.ts:47-76 (registration)
    Registers the MCP tool 'get-total-users'. The inline async handler fetches landing page data from the Supabase API endpoint and returns the totalUsers value as a text content block, or an error if fetch fails.
    server.tool(
      "get-total-users",
      "Get total users of Compresto",
      {},
      async () => {
        const url = `${API_BASE}/v1/getLandingPageData`;
        const response = await makeSupabaseRequest<LandingPageDataResponse>(url);
        
        if (!response) {
          return {
            content: [
              {
                type: "text",
                text: "Failed to fetch user data"
              }
            ],
            isError: true
          };
        }
        
        return {
          content: [
            {
              type: "text",
              text: response.data.totalUsers.toString()
            }
          ]
        };
      },
    );
  • Helper function that makes authenticated HTTP requests to the Supabase API using fetch, with error handling and JSON parsing. Used by the get-total-users handler.
    async function makeSupabaseRequest<T>(url: string): Promise<T | null> {
      const headers = {
        "User-Agent": USER_AGENT,
        Accept: "application/json",
      };
    
      try {
        const response = await fetch(url, { headers });
        if (!response.ok) {
          throw new Error(`HTTP error! status: ${response.status}`);
        }
        return (await response.json()) as T;
      } catch (error) {
        console.error("Error making Supabase request:", error);
        return null;
      }
    }
  • TypeScript interface defining the structure of the landing page data response from the API, including totalUsers field used by the tool.
    interface LandingPageDataResponse {
      data: {
        totalUsers: number;
        totalCompressedVideos: number;
        totalReducedSize: number;
        monthlyUsers: number;
      }
    }
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states a read operation ('Get'), implying it's likely safe and non-destructive, but doesn't specify whether it requires authentication, has rate limits, returns real-time or cached data, or details about the output format. For a tool with zero annotation coverage, this leaves significant gaps in understanding its behavior.

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, efficient sentence that directly states the tool's purpose without any fluff or redundancy. It is front-loaded and wastes no words, making it easy for an agent to parse quickly.

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 simplicity (0 parameters, no output schema, no annotations), the description is minimally adequate. It explains what the tool does but lacks details on behavioral traits and usage context. For a basic read tool, this might suffice, but it doesn't fully address potential agent needs like output format or integration with siblings.

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 has 0 parameters with 100% coverage, so no parameter documentation is needed. The description doesn't add parameter information, which is appropriate here. A baseline score of 4 is given since the schema fully handles parameters, and the description doesn't need to compensate for any gaps.

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 clearly states the verb ('Get') and resource ('total users of Compresto'), making the purpose immediately understandable. It distinguishes from siblings by focusing on users rather than files or size reduction, though it doesn't explicitly contrast them. The description avoids tautology by specifying what is being retrieved.

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 its siblings (get-total-processed-files, get-total-size-reduced). It lacks context about use cases, prerequisites, or exclusions, leaving the agent to infer usage based solely on the tool name and description.

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

Related 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/dqhieu/compresto-mcp'

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