Skip to main content
Glama

get_product_rate_plan

Retrieve a specific product rate plan by its ID to view pricing and billing details for your subscription products.

Instructions

Get a rate plan by ID. GET /product-rateplans/{ratePlanId}. Rate plan reference: ratePlanId (URI: /product-rateplans/{ratePlanId}).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
ratePlanIdYesRate plan ID (URI: /product-rateplans/{ratePlanId})
includeNoAttributes to include

Implementation Reference

  • The get_product_rate_plan tool handler function. Parses args with zod schema (ratePlanId required, include optional), then calls ratePlanService.getRatePlan(client, ratePlanId, {include}) via handleToolCall.
    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 { ratePlanId, include } = parsed.data;
      return handleToolCall(() => ratePlanService.getRatePlan(client, ratePlanId, { include }));
    }
  • Zod schema for get_product_rate_plan: validates ratePlanId (string, required) and include (string, optional).
    const schema = z.object({
      ratePlanId: z.string().min(1, "ratePlanId is required"),
      include: z.string().optional(),
    });
  • Tool definition with name 'get_product_rate_plan', description, and inputSchema (JSON Schema format with ratePlanId string required, include string optional).
    const definition = {
      name: "get_product_rate_plan",
      description:
        "Get a rate plan by ID. GET /product-rateplans/{ratePlanId}. Rate plan reference: ratePlanId (URI: /product-rateplans/{ratePlanId}).",
      inputSchema: {
        type: "object" as const,
        properties: {
          ratePlanId: { type: "string", description: "Rate plan ID (URI: /product-rateplans/{ratePlanId})" },
          include: { type: "string", description: "Attributes to include" },
        },
        required: ["ratePlanId"],
      },
    };
  • Registration of getRatePlanTool within registerProductRatePlanTools(), which exports all 7 product rate plan tools as an array.
    export function registerProductRatePlanTools(): Tool[] {
      return [
        listRatePlansTool,
        getRatePlanTool,
        createRatePlanTool,
        updateRatePlanTool,
        deleteRatePlanTool,
        updateRatePlanStatusTool,
        syncRatePlanTool,
      ];
    }
  • The actual API call: getRatePlan(client, ratePlanId, params) performs a GET request to /product-rateplans/{ratePlanId} with optional ?include= parameter.
    export async function getRatePlan(
      client: Client,
      ratePlanId: string,
      params?: { include?: string }
    ): Promise<unknown> {
      const search = new URLSearchParams();
      if (params?.include) search.append("include", params.include);
      const q = search.toString();
      return client.get<unknown>(`/product-rateplans/${ratePlanId}${q ? `?${q}` : ""}`);
    }
Behavior2/5

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

No annotations provided, and the description does not disclose any behavioral traits (e.g., side effects, authentication requirements, rate limits). It only states the basic action without behavioral context.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is concise, with three short sentences. However, the third sentence repeats the parameter reference already in the schema, making it slightly redundant. Still, it avoids unnecessary detail.

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?

For a simple get-by-ID tool, the description covers the core action and parameter. However, without an output schema, it does not describe the return format or possible errors, leaving some gaps in completeness.

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 input schema has 100% coverage, with both parameters documented. The description adds no additional meaning beyond what the schema already provides, so baseline 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 clearly states 'Get a rate plan by ID', which matches the tool name and specifies the resource and action. It also provides the HTTP endpoint, distinguishing it from list tools like 'list_product_rate_plans'.

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 such as 'get_product_rate_plan_charge' or 'list_product_rate_plans'. The description lacks context for selecting the appropriate tool.

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