Skip to main content
Glama

Log Activity

whmcs_log_activity

Log an activity entry to track user actions or system events in WHMCS. Provide a description and optionally associate a user ID.

Instructions

Add an entry to the activity log

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
descriptionYesActivity description
useridNoAssociated user ID

Implementation Reference

  • src/index.ts:1085-1101 (registration)
    Registration of the 'whmcs_log_activity' tool with the MCP server, defining its name, description, input schema (description string, optional userid number), and handler that calls whmcsClient.logActivity().
    server.registerTool(
        'whmcs_log_activity',
        {
            title: 'Log Activity',
            description: 'Add an entry to the activity log',
            inputSchema: {
                description: z.string().describe('Activity description'),
                userid: z.number().optional().describe('Associated user ID'),
            },
        },
        async (params) => {
            const result = await whmcsClient.logActivity(params);
            return {
                content: [{ type: 'text', text: JSON.stringify(result, null, 2) }],
            };
        }
    );
  • The inline handler (async callback) for the whmcs_log_activity tool. It receives params (description, userid), calls whmcsClient.logActivity(params), and returns the result as JSON text.
        async (params) => {
            const result = await whmcsClient.logActivity(params);
            return {
                content: [{ type: 'text', text: JSON.stringify(result, null, 2) }],
            };
        }
    );
  • Input schema for whmcs_log_activity: description (string, required) and userid (number, optional), defined using Zod.
        description: 'Add an entry to the activity log',
        inputSchema: {
            description: z.string().describe('Activity description'),
            userid: z.number().optional().describe('Associated user ID'),
        },
    },
  • The logActivity method on WhmcsApiClient class. Accepts { description: string, userid?: number } parameters and calls the WHMCS API 'LogActivity' action via this.call().
    /**
     * Log activity
     */
    async logActivity(params: {
        description: string;
        userid?: number;
    }) {
        return this.call<WhmcsApiResponse>('LogActivity', params);
    }
Behavior2/5

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

No annotations are provided, so the description must carry the full burden. It indicates a write operation ('Add'), but fails to disclose side effects, permission requirements, or what 'activity log' implies. Minimal behavioral insight.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single short sentence, which is concise but lacks important context. It is not front-loaded with critical usage details.

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?

For a simple logging tool with two parameters and no output schema, the description minimally explains the operation. It does not address return values, success indicators, or logging behavior, leaving gaps for an AI agent.

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?

Input schema has 100% description coverage for both parameters. The description adds no extra meaning beyond the schema; it is adequate but not enhanced.

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?

Description clearly states 'Add an entry to the activity log', which specifies the verb (add) and resource (entry to activity log). No differentiation from sibling 'whmcs_get_activity_log' is provided, but the purpose is unambiguous.

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 on when to use this tool versus alternatives like whmcs_get_activity_log. No context on prerequisites or typical scenarios. The description is purely functional.

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/scarecr0w12/whmcs-mcp-tool'

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