Skip to main content
Glama

delete_estimate

Permanently delete an estimate from Harvest. This action cannot be undone.

Instructions

Delete an estimate permanently. This action cannot be undone.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
estimate_idYesThe ID of the estimate to delete

Implementation Reference

  • The DeleteEstimateHandler class implements the tool logic. It validates input via zod schema (estimate_id), calls harvestClient.deleteEstimate(), and returns a success message or delegates to handleMCPToolError.
    class DeleteEstimateHandler implements ToolHandler {
      constructor(private readonly config: BaseToolConfig) {}
    
      async execute(args: Record<string, any>): Promise<CallToolResult> {
        try {
          const inputSchema = z.object({ estimate_id: z.number().int().positive() });
          const { estimate_id } = validateInput(inputSchema, args, 'delete estimate');
          
          logger.info('Deleting estimate via Harvest API', { estimateId: estimate_id });
          await this.config.harvestClient.deleteEstimate(estimate_id);
          
          return {
            content: [{ type: 'text', text: JSON.stringify({ message: `Estimate ${estimate_id} deleted successfully` }, null, 2) }],
          };
        } catch (error) {
          return handleMCPToolError(error, 'delete_estimate');
        }
      }
    }
  • Inline zod schema for delete_estimate input validation: requires an estimate_id (positive integer).
    const inputSchema = z.object({ estimate_id: z.number().int().positive() });
  • Registration entry in registerEstimateTools(): defines tool name 'delete_estimate', description, inputSchema (object with estimate_id number), and maps to DeleteEstimateHandler.
    {
      tool: {
        name: 'delete_estimate',
        description: 'Delete an estimate permanently. This action cannot be undone.',
        inputSchema: {
          type: 'object',
          properties: {
            estimate_id: { type: 'number', description: 'The ID of the estimate to delete' },
          },
          required: ['estimate_id'],
          additionalProperties: false,
        },
      },
      handler: new DeleteEstimateHandler(config),
    },
  • EstimatesClient.deleteEstimate() — the HTTP client helper that sends DELETE /estimates/{estimateId} to the Harvest API.
    async deleteEstimate(estimateId: number): Promise<void> {
      try {
        this.logger.debug('Deleting estimate', { estimateId });
        await this.client.delete(`/estimates/${estimateId}`);
        this.logger.info('Successfully deleted estimate', { estimateId });
      } catch (error) {
        this.logger.error('Failed to delete estimate', { estimateId, error: (error as Error).message });
        throw error;
      }
    }
  • HarvestApi.deleteEstimate() — delegates to estimatesClient.deleteEstimate().
    async deleteEstimate(estimateId: number): Promise<void> {
      return this.estimatesClient.deleteEstimate(estimateId);
    }
  • src/server.ts:140-140 (registration)
    Server category mapping includes 'delete_estimate' in the 'estimates' category group.
    'estimates': ['list_estimates', 'get_estimate', 'create_estimate', 'update_estimate', 'delete_estimate'],
Behavior3/5

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

With no annotations, the description carries the burden of disclosing behavior. It correctly states the irreversibility, but lacks details about permissions, cascading effects, or return behavior. For a simple delete, this is adequate but not thorough.

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?

Extremely concise, just two sentences with no wasted words. Essential information is front-loaded.

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 simplicity of the tool (one parameter, no output schema), the description is mostly complete. It covers the action and its irreversibility, though it could mention the expected return value (e.g., success confirmation).

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 coverage is 100%, and the description adds no extra meaning beyond what the schema already provides for the single parameter 'estimate_id'.

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?

Clearly states it deletes an estimate permanently. The verb 'delete' and resource 'estimate' are specific and distinguish it from sibling tools like 'update_estimate' or 'create_estimate'.

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

Usage Guidelines3/5

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

Implicitly warns that the action cannot be undone, suggesting careful use, but does not provide explicit guidance on when to use this tool versus alternatives (e.g., updating to a cancelled state) or any prerequisites.

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