Skip to main content
Glama
listingbureau

Listing Bureau - Amazon Organic Ranking

lb_account_get_subscription

Read-only

Retrieve your Listing Bureau subscription details including plan label, fee, discount, and wallet usage to manage your account and track billing.

Instructions

Get Listing Bureau subscription info (plan label, fee, discount, wallet usage)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Tool handler that GETs /api/v1/account/subscription and returns the subscription info formatted as MCP result.
    server.tool(
      "lb_account_get_subscription",
      "Get Listing Bureau subscription info (plan label, fee, discount, wallet usage)",
      {},
      { readOnlyHint: true  },
      async () => {
        try {
          const res = await client.request<Subscription>(
            "GET",
            "/api/v1/account/subscription",
            undefined,
            undefined,
            "lb_account_get_subscription",
          );
          return formatResult(res.data);
        } catch (e) {
          return formatErrorResult(e);
        }
      },
    );
  • TypeScript interface for the Subscription response shape returned by the API.
    export interface Subscription {
      account_type: string;
      plan_label: string;
      use_wallet: boolean;
      subscription_fee: number;
    }
  • Registration function called from index.ts, wraps server.tool() calls for all account tools.
    export function registerAccountTools(server: McpServer, client: LBClient) {
  • src/index.ts:56-56 (registration)
    Top-level entry point where account tools (including lb_account_get_subscription) are registered.
    registerAccountTools(server, client);
  • Utility that formats successful API response data into an MCP text result, extracting warnings and balance_warnings.
    export function formatResult(data: unknown): CallToolResult {
      const warnings: string[] = [];
      let cleaned: Record<string, unknown> | unknown = data;
    
      if (data && typeof data === "object") {
        const obj = { ...(data as Record<string, unknown>) };
    
        // Top-level warning string
        if ("warning" in obj && typeof obj.warning === "string") {
          warnings.push(obj.warning);
          delete obj.warning;
        }
    
        // balance_warning object (independent of warning)
        if ("balance_warning" in obj && obj.balance_warning && typeof obj.balance_warning === "object") {
          const bw = obj.balance_warning as Record<string, unknown>;
          const parts: string[] = [];
          if (typeof bw.warning === "string" && bw.warning.trim()) parts.push(bw.warning);
          if (typeof bw.daily_cost_estimate === "number")
            parts.push(`Daily cost estimate: $${bw.daily_cost_estimate.toFixed(2)}`);
          if (typeof bw.balance === "number")
            parts.push(`Balance: $${bw.balance.toFixed(2)}`);
          if (typeof bw.days_remaining === "number")
            parts.push(`Days remaining: ${bw.days_remaining.toFixed(1)}`);
          if (parts.length > 0) warnings.push(parts.join(" | "));
          delete obj.balance_warning;
        }
    
        cleaned = obj;
      }
    
      let text = JSON.stringify(cleaned, null, 2);
      for (const w of warnings) {
        text += `\n\n⚠️ Warning: ${w}`;
      }
    
      const notice = getUpdateNotice();
      if (notice) {
        text += `\n\n${notice}`;
      }
    
      return {
        content: [{ type: "text", text }],
      };
    }
Behavior4/5

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

Annotations already provide readOnlyHint: true, and the description aligns with that. The description adds context about the specific fields returned, which helps the agent understand the outcome. No additional behavioral traits (e.g., auth needs, null handling) are disclosed, but given the simple read operation, it is sufficient.

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 sentence that immediately states the purpose and lists the key result fields in parentheses. No unnecessary words or information.

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?

For a simple getter with no parameters and no output schema, the description provides enough information to understand what the tool does and what it returns. It could be slightly improved by explicitly stating the structure of the response, but it is largely sufficient.

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?

There are no parameters (schema coverage 100%), so the baseline is 3. The description does not need to add param info, but it does list the returned fields, which is helpful but not parameter-related.

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 clearly states the verb 'Get' and the resource 'Listing Bureau subscription info', and lists specific data items (plan label, fee, discount, wallet usage). This distinguishes it from siblings like lb_account_get (general account info) and lb_account_get_service_rates.

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 that this tool is for retrieving subscription info, but it does not explicitly state when to use it over alternatives or provide any exclusion criteria. No guidance on prerequisites or when not to use.

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/listingbureau/listingbureau-mcp'

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