Skip to main content
Glama

Get subscription info

marzban_subscription_info
Read-only

Diagnose broken subscription links by reading status, usage, and expiry from the subscription token—no username needed.

Instructions

Reads subscription status/usage/expiry using the token from a subscription URL (the same public, unauthenticated endpoint client apps use) — for diagnosing a broken subscription link without needing the username. For an admin-side lookup by username, use marzban_users_get instead.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
subscriptionTokenYesThe opaque token from a user's subscription URL (the path segment after "/sub/") — not an admin/session token.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
linksNo
expireNo
statusYes
proxiesYes
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
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. Changed5 schema fields changedv0.2.3
    • 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

A4.5/5.0
Behavior4/5

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

The annotations already declare readOnlyHint and destructiveHint, and the description adds meaningful behavioral context beyond that: it calls 'the same public, unauthenticated endpoint client apps use,' clarifying that no admin authentication is needed. It does not contradict the annotations, and the remaining details about invalid-token behavior are not essential given the output schema.

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 two sentences, front-loads the core purpose and scope, and then immediately provides the routing alternative. Every sentence earns its place with no redundant filler.

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

Completeness5/5

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

For a single-parameter read-only tool with full schema coverage and an output schema, the description is complete: it explains the use case, the required token source, the authentication context, and the alternative admin-side tool. Nothing needed for correct invocation is missing.

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 schema description covers 100% of the parameter and already fully explains that subscriptionToken is the opaque token from the subscription URL path segment after '/sub/' and not an admin/session token. The tool description adds little new meaning beyond restating 'using the token from a subscription URL,' so the schema-carried baseline of 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/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: it 'Reads subscription status/usage/expiry' using a subscription token. It clearly distinguishes this from admin-side user lookups by stating it works 'without needing the username' and directly names the sibling alternative marzban_users_get.

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

Usage Guidelines5/5

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

It explicitly tells when to use the tool: 'for diagnosing a broken subscription link without needing the username.' It also gives a direct alternative and route when that condition does not hold: 'For an admin-side lookup by username, use marzban_users_get instead.'

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