Skip to main content
Glama

delete_customer_address

Delete a customer's address book entry by providing the customer ID and address ID. Removes the specified address from the customer's address list.

Instructions

Delete an address book entry. DELETE /customers/{customerId}/addressbooks/{addressId}.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
customerIdYesCustomer ID (required)
addressIdYesAddress book entry ID (required)

Implementation Reference

  • The handler function that validates input with zod schema and calls the service layer to delete a customer address.
    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 { customerId, addressId } = parsed.data;
      return handleToolCall(() =>
        customerService.deleteCustomerAddress(client, customerId, addressId)
      );
    }
  • Zod schema defining the required inputs: customerId and addressId (both strings, min length 1).
    const schema = z.object({
      customerId: z.string().min(1, "customerId is required"),
      addressId: z.string().min(1, "addressId is required"),
    });
  • Tool definition/inputSchema for 'delete_customer_address' with name, description, and JSON Schema input properties.
    const definition = {
      name: "delete_customer_address",
      description:
        "Delete an address book entry. DELETE /customers/{customerId}/addressbooks/{addressId}.",
      inputSchema: {
        type: "object" as const,
        properties: {
          customerId: { type: "string", description: "Customer ID (required)" },
          addressId: { type: "string", description: "Address book entry ID (required)" },
        },
        required: ["customerId", "addressId"],
      },
    };
  • Registration of deleteCustomerAddressTool in the registerCustomerTools() function array, line 46.
    deleteCustomerAddressTool,
  • Service function that performs the actual DELETE HTTP call to /customers/{customerId}/addressbooks/{addressId}.
    export async function deleteCustomerAddress(
      client: Client,
      customerId: string,
      addressId: string
    ): Promise<Record<string, unknown>> {
      const result = await client.delete<Record<string, unknown>>(
        `/customers/${customerId}/addressbooks/${addressId}`
      );
      return Object.keys(result ?? {}).length ? result : { success: true, message: "Address deleted" };
    }
Behavior2/5

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

No annotations are present, so the description bears the full burden. It only says 'delete' without disclosing side effects (e.g., irreversible removal, cascading impacts on linked data) or permission requirements. The agent is left guessing.

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 (two sentences) and front-loaded with the key verb 'Delete'. However, it could be slightly more informative without losing conciseness.

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 the simplicity (2 params, no output schema, no annotations), the description is too minimal. It lacks information on return values (e.g., success message, error handling) and fails to provide behavioral context that annotations would normally supply.

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?

Input schema covers 100% of parameters with descriptions. The tool description adds no extra semantics beyond what the schema already provides (customerId, addressId). 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?

The description clearly states 'Delete an address book entry' and includes the HTTP method and path, making the action unambiguous. It distinguishes from sibling tools like get_customer_address or update_customer_address.

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 is provided on when to use this tool versus alternatives (e.g., update_customer_address) or prerequisites (e.g., customer must exist). The description only states what it does, not when to invoke it.

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