Skip to main content
Glama

delete_currency

Delete a company currency. Fails if currency is referenced in invoices, subscriptions, transactions, or gateways.

Instructions

Delete a company currency. DELETE /currencies/{companyCurrencyId}. Fails if currency is in use (invoices, subscriptions, transactions, or gateways).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
companyCurrencyIdYesCompany currency ID (required)

Implementation Reference

  • The handler function that executes the delete_currency tool logic: validates input with Zod schema, then calls the currency service to DELETE /currencies/{companyCurrencyId}.
    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(() =>
        currencyService.deleteCurrency(client, parsed.data.companyCurrencyId)
      );
    }
  • The tool definition/schema registering the tool name 'delete_currency', description, and input validation schema (requires companyCurrencyId string).
    const definition = {
      name: "delete_currency",
      description:
        "Delete a company currency. DELETE /currencies/{companyCurrencyId}. Fails if currency is in use (invoices, subscriptions, transactions, or gateways).",
      inputSchema: {
        type: "object" as const,
        properties: {
          companyCurrencyId: { type: "string", description: "Company currency ID (required)" },
        },
        required: ["companyCurrencyId"],
      },
    };
  • Registration function that collects all currency tools including deleteCurrencyTool into an array for the central tool registry.
    export function registerCurrencyTools(): Tool[] {
      return [
        listCurrenciesTool,
        getCurrencyTool,
        createCurrencyTool,
        updateCurrencyTool,
        deleteCurrencyTool,
        getDefaultCurrencyTool,
        setDefaultCurrencyTool,
      ];
    }
  • The underlying service function that makes the actual HTTP DELETE request to /currencies/{companyCurrencyId}.
    export async function deleteCurrency(
      client: Client,
      companyCurrencyId: string
    ): Promise<unknown> {
      return client.delete<unknown>(`/currencies/${companyCurrencyId}`);
    }
  • Central tool registry where registerCurrencyTools() is called, including deleteCurrencyTool in the master tools list.
    const tools: Tool[] = [
      ...registerCustomerTools(),
      ...registerProductTools(),
      ...registerProductRatePlanTools(),
      ...registerProductRatePlanChargeTools(),
      ...registerSubscriptionTools(),
      ...registerInvoiceTools(),
      ...registerTransactionTools(),
      ...registerBillRunTools(),
      ...registerGatewayTools(),
      ...registerCurrencyTools(),
      ...registerIntegrationTools(),
      ...registerShippingTools(),
      ...registerFilterTools(),
      ...registerDocsTools(),
    ];
Behavior4/5

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

With no annotations, the description carries the burden of behavioral disclosure. It explicitly states the destructive nature (DELETE) and the failure condition when the currency is in use. It does not mention reversibility or authentication requirements, but the provided details are valuable.

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 extremely concise: two sentences with no wasted words. It front-loads the core purpose and adds critical details in the second sentence.

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?

Given the tool's simplicity (one required parameter, no output schema, no annotations), the description covers the essential behaviors and constraints. It could mention permanence or permissions, 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?

The schema description coverage is 100% for the single parameter, so the baseline is 3. The description does not add additional meaning to the parameter beyond what the schema already provides.

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 a company currency', provides the HTTP method and path, and specifies conditions that cause failure. This is specific and distinguishes it from sibling tools like create_currency or update_currency.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It explains when the tool should be used (to delete a currency) and gives a critical constraint (fails if currency is in use). However, it does not explicitly mention alternatives such as updating the currency to deactivate it, leaving room for improvement.

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