Skip to main content
Glama

Create user

marzban_users_create

Creates a Marzban VPN user with optional data limit, expiration, inbounds, proxies, and template-based configuration.

Instructions

Creates a new user. dataLimit accepts a human size ("10GB"), expire a relative duration ("30d") or absolute date — both default to unlimited when omitted. templateId fills dataLimit/inbounds/expire from a user template; any field also given explicitly overrides the template value.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
noteNo
expireNoe.g. "30d". Omit for no expiration.
statusNoDefaults to active.
proxiesNoProtocol name -> settings, e.g. {"vless": {"id": "<uuid>"}} or {"shadowsocks": {}} to auto-generate credentials. Omit to leave unchanged on update. On create there is no server default — omitting this (without templateId) errors; provide at least one protocol with a matching inbound configured on the panel.
inboundsNoProtocol name -> inbound tags to restrict this user to. Omit for all inbounds.
usernameYes
dataLimitNoe.g. "10GB". Omit or 0 for unlimited.
templateIdNoCreate from a user template instead of specifying proxies/inbounds by hand.
onHoldExpireDurationNoSeconds the user may stay on_hold before expiring, counted from their first connection. Only meaningful when status is on_hold.
dataLimitResetStrategyNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
noteNo
adminNo
linksNo
expireNo
statusYes
proxiesYes
inboundsNo
usernameYes
next_planNo
online_atNo
created_atYes
data_limitNodata_limit can be 0 or greater
used_trafficYes
sub_updated_atNo
on_hold_timeoutNo
subscription_urlNo
excluded_inboundsNo
auto_delete_in_daysNo
sub_last_user_agentNo
lifetime_used_trafficNo
on_hold_expire_durationNo
data_limit_reset_strategyNono_reset

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed6 schema fields changedv0.2.3
    • changedInput schema / properties / proxies / description
      Previous value: -"Protocol name -> settings, e.g. {\"vless\": {\"id\": \"<uuid>\"}}. Omit to leave unchanged (update) or use server defaults (create)."New value: +"Protocol name -> settings, e.g. {\"vless\": {\"id\": \"<uuid>\"}} or {\"shadowsocks\": {}} to auto-generate credentials. Omit to leave unchanged on update. On create there is no server default — omitting this (without templateId) errors; provide at least one protocol with a matching inbound configured on the panel."
    • removedOutput schema / properties / created_at / format
      Removed value: -"date-time"
    • removedOutput schema / properties / created_at / pattern
      Removed value: -"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|))$"
    • changedOutput schema / properties / on_hold_timeout / anyOf
      Previous value: -[
      -  {
      -    "anyOf": [
      -      {
      -        "format": "date-time",
      -        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|))$",
      -        "type": "string"
      -      },
      -      {
      -        "type": "null"
      -      }
      -    ]
      -  },
      -  {
      -    "type": "null"
      -  }
      -]New value: +[
      +  {
      +    "type": "string"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • changedOutput schema / properties / online_at / anyOf
      Previous value: -[
      -  {
      -    "anyOf": [
      -      {
      -        "format": "date-time",
      -        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|))$",
      -        "type": "string"
      -      },
      -      {
      -        "type": "null"
      -      }
      -    ]
      -  },
      -  {
      -    "type": "null"
      -  }
      -]New value: +[
      +  {
      +    "type": "string"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • changedOutput schema / properties / sub_updated_at / anyOf
      Previous value: -[
      -  {
      -    "anyOf": [
      -      {
      -        "format": "date-time",
      -        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|))$",
      -        "type": "string"
      -      },
      -      {
      -        "type": "null"
      -      }
      -    ]
      -  },
      -  {
      -    "type": "null"
      -  }
      -]New value: +[
      +  {
      +    "type": "string"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
  2. First observedv0.2.2

TDQS

A3.9/5.0
Behavior4/5

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

With annotations only marking readOnlyHint=false and destructiveHint=false, the description adds meaningful behavioral context: default-unlimited behavior for dataLimit and expire, support for human-readable sizes and relative or absolute durations, and template override semantics. It does not contradict the annotations and goes beyond what the schema states.

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 three sentences with no filler. It front-loads the core action, then packs the most important parameter semantics into compact, readable sentences. Every sentence earns its place.

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

Completeness4/5

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

Given the tool's complexity (10 parameters, nested objects) and the presence of a rich schema and output schema, the description covers the key cross-cutting behaviors: defaults, value formats, and template override logic. It relies on the schema for per-parameter details like the proxies-on-create requirement, which is acceptable since the schema describes it explicitly.

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?

Schema description coverage is 70%, so the schema handles most parameters, but the description adds value by clarifying formats ('10GB', '30d', absolute date), the unlimited-by-default behavior, and how templateId merges with explicitly provided fields. This meaningfully supplements the schema rather than repeating it.

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 states a specific verb and resource: 'Creates a new user.' It clearly identifies the action, but it does not explicitly differentiate from sibling tools like marzban_users_update or marzban_users_list, so the sibling-distinguishing bar for a 5 is not fully met.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage by saying 'Creates a new user,' and it gives useful context about templateId and explicit override behavior. However, it does not state when to prefer this tool over an alternative, such as using marzban_users_update for existing users, nor does it mention any exclusions or prerequisites.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.