Skip to main content
Glama
mamertofabian

ElevenLabs MCP Server

delete_job

Remove a voiceover job and its files from the ElevenLabs MCP Server to manage storage and clean up completed tasks.

Instructions

Delete a voiceover job and its associated files

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
job_idYesID of the job to delete

Implementation Reference

  • The main handler logic for the delete_job tool. It retrieves the job, deletes the associated audio file if present, then calls the database delete_job method, and returns success message.
    elif name == "delete_job":
        job_id = arguments.get("job_id")
        if not job_id:
            raise ValueError("job_id is required")
    
        # Get job to check if it exists and get file path
        job = await self.db.get_job(job_id)
        if not job:
            return [types.TextContent(
                type="text",
                text=f"Job {job_id} not found"
            )]
    
        # Delete associated audio file if it exists
        if job.output_file:
            try:
                output_path = Path(job.output_file)
                if output_path.exists():
                    output_path.unlink()
            except Exception as e:
                return [types.TextContent(
                    type="text",
                    text=f"Error deleting audio file: {str(e)}"
                )]
    
        # Delete job from database
        deleted = await self.db.delete_job(job_id)
        return [types.TextContent(
            type="text",
            text=f"Successfully deleted job {job_id} and associated files"
        )]
  • Tool registration in list_tools(), including name, description, and input schema.
    types.Tool(
        name="delete_job",
        description="Delete a voiceover job and its associated files",
        inputSchema={
            "type": "object",
            "properties": {
                "job_id": {
                    "type": "string",
                    "description": "ID of the job to delete"
                }
            },
            "required": ["job_id"]
        }
    ),
  • Database helper method that performs the SQL DELETE on the audio_jobs table for the given job_id.
    async def delete_job(self, job_id: str) -> bool:
        """Delete an audio job by ID. Returns True if job was deleted."""
        async with aiosqlite.connect(self.db_path) as db:
            cursor = await db.execute("DELETE FROM audio_jobs WHERE id = ?", (job_id,))
            deleted = cursor.rowcount > 0
            await db.commit()
            return deleted
Behavior2/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 states the tool deletes a job and associated files, which implies a destructive, irreversible operation. However, it lacks details about permissions needed, confirmation prompts, error handling, or what happens if the job doesn't exist.

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 a single, efficient sentence that directly states the tool's purpose without any unnecessary words. It's appropriately sized and front-loaded with the essential information.

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?

For a destructive operation tool with no annotations and no output schema, the description is insufficient. It doesn't explain what happens after deletion (e.g., confirmation message, error responses), nor does it address important behavioral aspects like permissions or irreversible consequences.

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 input schema has 100% description coverage, with the single parameter 'job_id' clearly documented. The description doesn't add any additional parameter semantics beyond what the schema already provides, so the baseline score of 3 is appropriate.

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 specific action ('Delete') and target resource ('a voiceover job and its associated files'), making the purpose unambiguous. It distinguishes this destructive operation from sibling tools that are primarily about generation, retrieval, or listing.

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?

The description provides no guidance on when to use this tool versus alternatives or any prerequisites. While it's clear this is for deletion, there's no mention of when deletion is appropriate versus other operations like retrieving or listing jobs.

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/mamertofabian/elevenlabs-mcp-server'

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