Skip to main content
Glama
warrenzhu25

Dataproc MCP Server

by warrenzhu25

delete_batch_job

Remove a Dataproc batch job from Google Cloud by specifying project ID, region, and batch ID to manage serverless batch operations.

Instructions

Delete a batch job.

Args:
    project_id: Google Cloud project ID
    region: Dataproc region
    batch_id: Batch job ID to delete

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
project_idYes
regionYes
batch_idYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • MCP tool handler and registration for 'delete_batch_job'. Decorated with @mcp.tool(), delegates to DataprocBatchClient.delete_batch_job.
    @mcp.tool()
    async def delete_batch_job(project_id: str, region: str, batch_id: str) -> str:
        """Delete a batch job.
    
        Args:
            project_id: Google Cloud project ID
            region: Dataproc region
            batch_id: Batch job ID to delete
        """
        batch_client = DataprocBatchClient()
        try:
            result = await batch_client.delete_batch_job(project_id, region, batch_id)
            return str(result)
        except Exception as e:
            logger.error("Failed to delete batch job", error=str(e))
            return f"Error: {str(e)}"
  • Core implementation of delete_batch_job in DataprocBatchClient. Calls Google Cloud Dataproc API to delete the batch job.
    async def delete_batch_job(
        self, project_id: str, region: str, batch_id: str
    ) -> dict[str, Any]:
        """Delete a batch job."""
        try:
            loop = asyncio.get_event_loop()
            client = self._get_batch_client(region)
    
            request = types.DeleteBatchRequest(
                name=f"projects/{project_id}/locations/{region}/batches/{batch_id}"
            )
    
            await loop.run_in_executor(None, client.delete_batch, request)
    
            return {
                "batch_id": batch_id,
                "status": "DELETED",
                "message": f"Batch job {batch_id} deletion initiated",
            }
    
        except Exception as e:
            logger.error("Failed to delete batch job", error=str(e))
            raise
Behavior2/5

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

With no annotations provided, the description carries full burden for behavioral disclosure. It states 'Delete a batch job' which implies a destructive, irreversible operation, but doesn't specify whether this requires special permissions, what happens to associated resources, or if there are confirmation steps. This is inadequate for a destructive tool with zero annotation coverage.

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 efficiently structured with a clear purpose statement followed by parameter explanations. It avoids unnecessary elaboration, though the parameter section could be more integrated with the main description rather than appearing as a separate list.

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?

Given that this is a destructive operation with no annotations, the description is minimally adequate but lacks critical context about irreversible effects, permissions, or error conditions. The presence of an output schema helps, but the description should do more to compensate for the missing behavioral annotations.

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 description lists all three parameters with brief explanations, but the schema description coverage is 0%, so these explanations are essential. However, they only provide basic identification (e.g., 'Google Cloud project ID') without detailing format constraints, valid values, or relationships between parameters, offering only marginal semantic value beyond the schema titles.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb 'Delete' and the resource 'batch job', making the purpose immediately understandable. However, it doesn't differentiate from sibling tools like 'cancel_job' or 'delete_cluster', which would require explicit comparison to achieve a perfect score.

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 like 'cancel_job' or 'delete_cluster'. It also doesn't mention prerequisites, consequences, or appropriate contexts for deletion, leaving the agent with insufficient usage context.

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/warrenzhu25/dataproc-mcp'

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