Skip to main content
Glama

delete_product_rate_plan_charge

Delete a specific rate plan charge from your product catalog by providing its charge ID. This action permanently removes the charge.

Instructions

Delete a rate plan charge. DELETE /product-rateplan-charges/{chargeId}.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
chargeIdYesRate plan charge ID

Implementation Reference

  • Handler function that validates args with Zod schema and calls the service to delete a rate plan charge.
    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("; "));
      }
      return handleToolCall(() => chargeService.deleteRatePlanCharge(client, parsed.data.chargeId));
    }
    
    export const deleteRatePlanChargeTool: Tool = {
      definition,
      handler,
    };
  • Zod schema and inputSchema for the delete_product_rate_plan_charge tool, requiring a chargeId string.
    const schema = z.object({
      chargeId: z.string().min(1, "chargeId is required"),
    });
  • Registration function that returns an array of all product rate plan charge tools, including deleteRatePlanChargeTool.
    export function registerProductRatePlanChargeTools(): Tool[] {
      return [
        listRatePlanChargesTool,
        getRatePlanChargeTool,
        createRatePlanChargeTool,
        updateRatePlanChargeTool,
        deleteRatePlanChargeTool,
      ];
    }
    
    export { listRatePlanChargesTool } from "./listRatePlanCharges.js";
    export { getRatePlanChargeTool } from "./getRatePlanCharge.js";
    export { createRatePlanChargeTool } from "./createRatePlanCharge.js";
    export { updateRatePlanChargeTool } from "./updateRatePlanCharge.js";
    export { deleteRatePlanChargeTool } from "./deleteRatePlanCharge.js";
  • Service function that performs the actual DELETE /product-rateplan-charges/{chargeId} API call.
    export async function deleteRatePlanCharge(
      client: Client,
      chargeId: string
    ): Promise<Record<string, unknown>> {
      const result = await client.delete<Record<string, unknown>>(
        `/product-rateplan-charges/${chargeId}`
      );
      return Object.keys(result ?? {}).length ? result : { success: true, message: "Rate plan charge deleted" };
    }
Behavior2/5

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

No annotations are provided, so the description must disclose behavioral traits. It only states 'Delete' which implies irreversible action, but does not describe cascading effects, required permissions, or constraints (e.g., whether the charge can be deleted if used in subscriptions).

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 short sentences, no fluff. The HTTP endpoint is included without redundancy. Every sentence adds value.

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

Completeness2/5

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

Given that it's a mutation tool with no annotations and no output schema, the description should provide more context about side effects, error scenarios, or usage constraints. It lacks completeness for safe agent invocation.

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 has 100% description coverage for the single parameter (chargeId). The tool description does not add further meaning beyond the schema's description. 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 the action (Delete) and the resource (rate plan charge). The included HTTP method and endpoint provide additional clarity. It is distinct from sibling tools that delete other entities.

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 (e.g., update_product_rate_plan_charge or other delete operations). No prerequisites or context for deletion are mentioned.

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