Skip to main content
Glama

get analytics user created

Retrieve daily user creation statistics from TabNews to analyze platform growth trends and user acquisition patterns.

Instructions

To get how many users were created (per day) in tabnews

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handler function for the MCP tool 'get analytics user created'. It calls the getAnalyticsUserCreated service function, formats the result as MCP text content with JSON, and handles errors.
    handler: async (): Promise<McpResponse> => { try { const result = await getAnalyticsUserCreated(); const content: McpTextContent = { type: "text", text: `Analytics User Created:\n\n${JSON.stringify(result, null, 2)}`, }; return { content: [content], }; } catch (error) { if (error instanceof Error) { throw new Error( `Failed to get analytics user created: ${error.message}` ); } else { throw new Error("Failed to get analytics user created"); } } },
  • src/index.ts:59-64 (registration)
    Registers the 'get analytics user created' tool with the MCP server by providing its name, description, parameters schema, and handler function.
    server.tool( getAnalyticsUserCreatedTool.name, getAnalyticsUserCreatedTool.description, getAnalyticsUserCreatedTool.parameters, getAnalyticsUserCreatedTool.handler );
  • Core service function that fetches the analytics data for users created from the TabNews API endpoint '/analytics/users-created'.
    export async function getAnalyticsUserCreated(): Promise< AnalyticsUserCreated[] > { const response = await fetch(`${TABNEWS_API_URL}/analytics/users-created`); const data = await response.json(); return data as AnalyticsUserCreated[]; }
  • TypeScript interface defining the structure of the analytics data returned by the tool (array of objects with date and number of user registrations).
    export interface AnalyticsUserCreated { date: string; cadastros: number; }

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/renant/mcp-tabnews'

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