Skip to main content
Glama

Get subscription info

marzban_subscription_get
Read-only

Diagnose broken subscription links by retrieving status, usage, and expiry from the public subscription token, with no username or admin login required.

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

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

Output 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. Addedv0.2.4

TDQS

A4.7/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true and destructiveHint=false, but the description adds real behavioral context beyond them: this hits the same public, unauthenticated endpoint client apps use, and no username is needed. It does not discuss rate limits or what the response contains, but an output schema exists so return values are covered elsewhere.

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?

Two sentences, front-loaded with the action and its data source, followed by the routing rule. The parenthetical about the public endpoint is load-bearing for understanding what kind of token is required, so nothing is wasted.

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 tool with full schema coverage, safety annotations, and an output schema, the description covers the remaining gaps: auth model (unauthenticated public endpoint), token provenance, and sibling routing. Nothing needed to call it correctly is missing.

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 coverage is 100% and the parameter is already documented as the opaque path segment after /sub/ and explicitly not an admin/session token. The description reinforces this from the caller's perspective ('the same public, unauthenticated endpoint client apps use'), clarifying where the token comes from rather than restating types, which adds modest but genuine value.

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?

States a specific verb (reads) and specific resource facets (subscription status/usage/expiry) plus the exact input basis (token from a subscription URL). It explicitly contrasts with the sibling marzban_users_get, so an agent can distinguish the two without reading either schema.

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?

Gives a concrete when-to-use scenario — diagnosing a broken subscription link when the username is unknown — and names the alternative (marzban_users_get) with the condition that selects it (admin-side lookup by username). Both routing directions are covered.

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