Skip to main content
Glama

get_subscription_rate_plan

Retrieve a specific rate plan for a subscription by providing the subscription ID and rate plan ID.

Instructions

Get a single rate plan on a subscription. GET /subscriptions/{subscriptionId}/rateplans/{ratePlanId}.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
subscriptionIdYesSubscription ID (required)
ratePlanIdYesSubscription rate plan ID (required)

Implementation Reference

  • The handler function that executes the tool logic. It validates input with zod schema, then calls the service layer to fetch the subscription rate plan.
    async function handler(client: Client, args: Record<string, unknown> | undefined) {
      const parsed = schema.safeParse(args);
      if (!parsed.success) {
        return errorResult(parsed.error.errors.map((e) => e.message).join("; "));
      }
      const { subscriptionId, ratePlanId } = parsed.data;
      return handleToolCall(() =>
        subscriptionService.getSubscriptionRatePlan(client, subscriptionId, ratePlanId)
      );
    }
  • Zod schema for validating tool inputs: subscriptionId (string) and ratePlanId (string).
    const schema = z.object({
      subscriptionId: z.string().min(1, "subscriptionId is required"),
      ratePlanId: z.string().min(1, "ratePlanId is required"),
    });
  • Tool definition/registration object with name 'get_subscription_rate_plan', description, and input schema (JSON Schema format).
    const definition = {
      name: "get_subscription_rate_plan",
      description:
        "Get a single rate plan on a subscription. GET /subscriptions/{subscriptionId}/rateplans/{ratePlanId}.",
      inputSchema: {
        type: "object" as const,
        properties: {
          subscriptionId: { type: "string", description: "Subscription ID (required)" },
          ratePlanId: { type: "string", description: "Subscription rate plan ID (required)" },
        },
        required: ["subscriptionId", "ratePlanId"],
      },
    };
  • Registration of get_subscription_rate_plan in the registerSubscriptionTools() function (line 40) and its re-export (line 62).
    export function registerSubscriptionTools(): Tool[] {
      return [
        listSubscriptionsTool,
        getSubscriptionTool,
        createSubscriptionTool,
        updateSubscriptionTool,
        deleteSubscriptionTool,
        updateSubscriptionStatusTool,
        getSubscriptionUpcomingChargesTool,
        getSubscriptionInvoicesTool,
        getSubscriptionLogsTool,
        getSubscriptionExternalInvoicesTool,
        listSubscriptionRatePlansTool,
        getSubscriptionRatePlanTool,
        addSubscriptionRatePlanTool,
        updateSubscriptionRatePlanTool,
        removeSubscriptionRatePlanTool,
        getSubscriptionRatePlanChargeTool,
        addSubscriptionRatePlanChargeTool,
        updateSubscriptionRatePlanChargeTool,
        removeSubscriptionRatePlanChargeTool,
      ];
    }
  • Service-layer function that makes the actual HTTP GET request to /subscriptions/{subscriptionId}/rateplans/{ratePlanId}.
    export async function getSubscriptionRatePlan(
      client: Client,
      subscriptionId: string,
      ratePlanId: string
    ): Promise<unknown> {
      return client.get<unknown>(
        `/subscriptions/${subscriptionId}/rateplans/${ratePlanId}`
      );
    }
Behavior2/5

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

No annotations provided. Description does not disclose behavioral traits such as idempotency, read-only nature, or side effects. Merely restates the HTTP method without additional context.

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?

Single sentence plus endpoint. Extremely concise with no wasted words. All information is front-loaded.

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

Completeness3/5

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

Simple tool with two required parameters. No output schema, so return values are not explained. Given the simplicity, the description is adequate but could mention what the response contains.

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?

Schema coverage is 100% with descriptive parameter names and descriptions. The description adds no additional meaning beyond the schema, so baseline 3 applies.

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?

Description clearly states 'Get a single rate plan on a subscription' and includes the HTTP endpoint, which precisely identifies the action. It distinguishes from siblings like list_subscription_rate_plans (list all) and add_subscription_rate_plan (create).

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?

No guidance on when to use this tool versus alternatives like list_subscription_rate_plans or get_subscription. No mention of prerequisites or exclusions.

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/rhinosaas/rebillia-mcp-server'

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