Skip to main content
Glama

autotask_delete_ticket_charge

Destructive

Permanently remove a charge from a ticket, deleting all associated billing data. This action cannot be undone.

Instructions

⚠ DESTRUCTIVE — IRREVERSIBLE. Permanently deletes a ticket charge record and all associated billing data. This action cannot be undone. Confirm with the user before invoking.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
ticketIdYesThe parent ticket ID
chargeIdYesThe charge ID to delete

Implementation Reference

  • Dispatch table entry for 'autotask_delete_ticket_charge' - calls AutotaskService.deleteTicketCharge(a.ticketId, a.chargeId) and returns a success message.
    ['autotask_delete_ticket_charge', async (a) => {
      await s.deleteTicketCharge(a.ticketId, a.chargeId);
      return { result: a.chargeId, message: `Successfully deleted ticket charge ${a.chargeId}` };
    }],
  • Tool definition/schema for 'autotask_delete_ticket_charge' with input validation requiring ticketId and chargeId, marked as destructive/irreversible.
    {
      name: 'autotask_delete_ticket_charge',
      description:
        '⚠ DESTRUCTIVE — IRREVERSIBLE. Permanently deletes a ticket charge ' +
        'record and all associated billing data. This action cannot be undone. ' +
        'Confirm with the user before invoking.',
      annotations: {
        title: 'Delete ticket charge (irreversible)',
        readOnlyHint: false,
        destructiveHint: true,
        idempotentHint: false,
        openWorldHint: true,
      },
      inputSchema: {
        type: 'object',
        properties: {
          ticketId: {
            type: 'number',
            description: 'The parent ticket ID'
          },
          chargeId: {
            type: 'number',
            description: 'The charge ID to delete'
          }
        },
        required: ['ticketId', 'chargeId']
      }
    },
  • Tool registration in TOOL_CATEGORIES under the 'tickets' category, listing 'autotask_delete_ticket_charge' as one of the ticket charge tools.
      tools: ['autotask_search_tickets', 'autotask_get_ticket_details', 'autotask_create_ticket', 'autotask_update_ticket', 'autotask_get_ticket_note', 'autotask_search_ticket_notes', 'autotask_create_ticket_note', 'autotask_get_ticket_attachment', 'autotask_search_ticket_attachments', 'autotask_create_ticket_attachment', 'autotask_get_ticket_charge', 'autotask_search_ticket_charges', 'autotask_create_ticket_charge', 'autotask_update_ticket_charge', 'autotask_delete_ticket_charge', 'autotask_get_ticket_history', 'autotask_search_ticket_history']
    },
  • Service layer method deleteTicketCharge(ticketId, chargeId) which performs the actual HTTP DELETE via http.childDelete('Tickets', ticketId, 'Charges', chargeId).
    async deleteTicketCharge(ticketId: number, chargeId: number): Promise<void> {
      const http = await this.ensureClient();
      try {
        this.logger.debug(`Deleting ticket charge ${chargeId} from ticket ${ticketId}`);
        await http.childDelete('Tickets', ticketId, 'Charges', chargeId);
        this.logger.info(`Ticket charge ${chargeId} deleted successfully`);
      } catch (error) {
        this.logger.error(`Failed to delete ticket charge ${chargeId}:`, error);
        throw error;
      }
    }
  • Low-level HTTP implementation childDelete() that sends DELETE /{ParentEntity}/{parentId}/{ChildEntity}/{childId} to the Autotask API.
    async childDelete(
      parentEntity: string,
      parentId: number,
      childEntity: string,
      childId: number
    ): Promise<void> {
      await this.request<void>(
        'DELETE',
        `/${parentEntity}/${parentId}/${childEntity}/${childId}`
      );
    }
Behavior5/5

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

Description adds behavioral details beyond annotations: 'DESTRUCTIVE — IRREVERSIBLE', 'cannot be undone', 'all associated billing data'. Annotations already indicate destructiveHint=true; description enriches with specifics and an explicit warning.

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 concise sentence plus a warning emoji. Front-loaded with critical danger signal. No superfluous words.

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?

Covers purpose, irreversibility, and confirmation requirement. Lacks mention of return behavior (e.g., success/failure indication), but for a delete operation, this is acceptable. Sibling tools and annotations provide additional context.

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 covers both parameters (ticketId, chargeId) with descriptions. Description does not add additional parameter-level meaning. Baseline 3 for high schema coverage.

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 'Permanently deletes a ticket charge record and all associated billing data', specifying the verb (deletes), resource (ticket charge record), and scope (all associated billing data). Differentiates from sibling delete tools targeting 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 Guidelines4/5

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

Explicitly instructs 'Confirm with the user before invoking', providing a clear usage guideline. Does not explicitly mention when not to use or alternatives like updating the charge, but the destructive hint and warning suffice.

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/wyre-technology/autotask-mcp'

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