Skip to main content
Glama

delete_client

Archive a Harvest client to preserve historical project and billing data while removing them from active use.

Instructions

Delete (archive) a client. This action archives the client rather than permanently deleting it, preserving historical project and billing data.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
client_idYesThe ID of the client to delete

Implementation Reference

  • The DeleteClientHandler class, which implements the ToolHandler interface, processes the request to delete a client via the Harvest API.
    class DeleteClientHandler implements ToolHandler {
      constructor(private readonly config: BaseToolConfig) {}
    
      async execute(args: Record<string, any>): Promise<CallToolResult> {
        try {
          const inputSchema = z.object({ client_id: z.number().int().positive() });
          const { client_id } = validateInput(inputSchema, args, 'delete client');
          
          logger.info('Deleting client via Harvest API', { clientId: client_id });
          await this.config.harvestClient.deleteClient(client_id);
          
          return {
            content: [{ type: 'text', text: JSON.stringify({ message: `Client ${client_id} deleted successfully` }, null, 2) }],
          };
        } catch (error) {
          return handleMCPToolError(error, 'delete_client');
        }
      }
    }
  • The registration of the 'delete_client' tool within the registerClientTools function, associating it with the DeleteClientHandler.
    {
      tool: {
        name: 'delete_client',
        description: 'Delete (archive) a client. This action archives the client rather than permanently deleting it, preserving historical project and billing data.',
        inputSchema: {
          type: 'object',
          properties: {
            client_id: { type: 'number', description: 'The ID of the client to delete' },
          },
          required: ['client_id'],
          additionalProperties: false,
        },
      },
      handler: new DeleteClientHandler(config),
    },
Behavior4/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It effectively explains that this is a destructive operation (deletion) but clarifies it's actually archiving, preserving data—important context not inferable from the schema alone. However, it doesn't mention permissions, reversibility, or side effects on related entities.

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 two sentences with zero waste: the first states the action and resource, and the second clarifies the archival behavior. It's front-loaded with the core purpose and efficiently adds necessary context without redundancy.

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 destructive tool with no annotations and no output schema, the description is adequate but has gaps. It explains the archival behavior, which is critical, but doesn't cover return values, error conditions, or dependencies (e.g., if the client must be inactive first). Given the complexity, it's minimally viable but could be more complete.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema already documents the 'client_id' parameter. The description doesn't add specific parameter details beyond what the schema provides, but it contextualizes the parameter's effect by explaining the archival outcome, which adds semantic value. Baseline is 3 for high coverage, but the contextual explanation justifies a slightly higher score.

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 verb ('delete/archive') and resource ('a client'), distinguishing it from siblings like 'get_client' or 'update_client'. It specifies that deletion means archiving rather than permanent removal, which is a crucial distinction.

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?

The description implies usage when you need to remove a client while preserving historical data, but it doesn't explicitly state when to use this versus alternatives like 'update_client' for deactivation or other deletion tools. It provides clear context about the archival behavior but lacks explicit exclusions or comparisons.

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/ianaleck/harvest-mcp-server'

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