Skip to main content
Glama
thichcode

Matomo MCP Server

by thichcode

matomo_add_user

Add a new user to Matomo Analytics by providing login credentials and email, enabling user management through the Matomo MCP Server.

Instructions

Thêm một user mới vào Matomo

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
userLoginYesTên đăng nhập của user
emailYesEmail của user
passwordYesMật khẩu của user
aliasNoBí danh của user (tùy chọn)

Implementation Reference

  • Input schema and description for the matomo_add_user tool, registered in ListTools response
    {
      name: 'matomo_add_user',
      description: 'Thêm một user mới vào Matomo',
      inputSchema: {
        type: 'object',
        properties: {
          userLogin: {
            type: 'string',
            description: 'Tên đăng nhập của user',
          },
          email: {
            type: 'string',
            description: 'Email của user',
          },
          password: {
            type: 'string',
            description: 'Mật khẩu của user',
          },
          alias: {
            type: 'string',
            description: 'Bí danh của user (tùy chọn)',
          },
        },
        required: ['userLogin', 'email', 'password'],
      },
    },
  • src/index.ts:268-269 (registration)
    Tool registration in the CallToolRequestHandler switch statement, dispatching to handleAddUser
    case 'matomo_add_user':
      return await this.handleAddUser(args as { userLogin: string; email: string; password: string; alias?: string });
  • Main handler function for matomo_add_user tool, validates connection and delegates to MatomoApiService
    private async handleAddUser(args: { userLogin: string; email: string; password: string; alias?: string }) {
      if (!this.matomoService) {
        throw new Error('Chưa kết nối đến Matomo. Vui lòng sử dụng matomo_connect trước.');
      }
    
      await this.matomoService.addUser(args.userLogin, args.email, args.password, args.alias);
      return {
        content: [
          {
            type: 'text',
            text: `Đã thêm user thành công: ${args.userLogin}`,
          },
        ],
      };
  • Core implementation in MatomoApiService: makes API request to UsersManager.addUser endpoint
    async addUser(userLogin: string, email: string, password: string, alias?: string): Promise<void> {
      const params: any = { userLogin, email, password };
      if (alias) params.alias = alias;
      
      await this.makeRequest('UsersManager.addUser', params);
    }
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. It states this is an 'add' operation, implying a write/mutation, but doesn't disclose any behavioral traits like required permissions, whether the operation is idempotent, what happens on duplicate user creation, or any rate limits. For a user creation tool with zero annotation coverage, this leaves significant gaps in understanding how the tool behaves.

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 redundant information. It's appropriately sized and front-loaded, making it easy for an agent to parse quickly. Every word earns its place in conveying the core functionality.

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?

Given this is a mutation tool (adding users) with no annotations and no output schema, the description is incomplete. It doesn't explain what happens after invocation (e.g., success/failure responses, what data is returned), behavioral constraints, or how it integrates with the broader Matomo ecosystem shown in sibling tools. The agent lacks critical context for safe and effective use.

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?

The input schema has 100% description coverage, with all parameters clearly documented in the schema itself (e.g., 'userLogin' as login name, 'email', 'password', optional 'alias'). The description adds no additional parameter semantics beyond what's already in the schema, so it meets the baseline score of 3 for high schema coverage without adding value.

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 action ('Thêm một user mới' - Add a new user) and the target resource ('vào Matomo' - to Matomo), making the purpose immediately understandable. However, it doesn't differentiate this tool from sibling tools like 'matomo_get_users' or explain how it fits within the broader Matomo user management context, which prevents a perfect score.

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. There's no mention of prerequisites (e.g., authentication status), when not to use it, or how it relates to sibling tools like 'matomo_get_users' for viewing users or 'matomo_connect' for establishing a connection. The agent must infer usage context entirely from the tool name and schema.

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/thichcode/matomo_mcp'

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