Skip to main content
Glama
victor-velazquez-ai

Enterprise MCP Template

delete_record

Remove records from enterprise systems by specifying record type and ID. This tool deletes customer, invoice, or other data from upstream APIs like Salesforce or NetSuite.

Instructions

Delete a record from the upstream API.

Args: record_type: The type of record (e.g., "customer", "invoice") record_id: Internal ID of the record. account_id: Account ID (required if not configured on server). base_url: Optional full API URL (overrides account_id).

Returns: Structured response with deletion result.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
record_typeYes
record_idYes
account_idNo
base_urlNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The MCP tool handler that receives the request and calls the API client.
    async def delete_record(
        record_type: str,
        record_id: str,
        account_id: Optional[str] = None,
        base_url: Optional[str] = None,
    ) -> Dict[str, Any]:
        """
        Delete a record from the upstream API.
    
        Args:
            record_type: The type of record (e.g., "customer", "invoice")
            record_id: Internal ID of the record.
            account_id: Account ID (required if not configured on server).
            base_url: Optional full API URL (overrides account_id).
    
        Returns:
            Structured response with deletion result.
        """
        token = _get_oauth_token()
    
        async with _get_client(base_url, account_id) as client:
            response = await client.delete_record(
                access_token=token,
                record_type=record_type,
                record_id=record_id,
                base_url_override=base_url,
            )
            return _serialize_response(response)
  • The underlying API client implementation that performs the HTTP DELETE request.
    async def delete_record(
        self,
        access_token: str,
        record_type: str,
        record_id: str,
        base_url_override: Optional[str] = None,
    ) -> APIResponse:
        """
        Delete a record by ID.
        
        Args:
            access_token: OAuth Bearer token
            record_type: The record type/endpoint name
            record_id: The record's internal ID
            base_url_override: Override the base URL
        """
        base = base_url_override or self._base_url
        url = f"{base}/{record_type}/{record_id}"
        
        logger.info(f"Deleting {record_type} #{record_id}")
        return await self._request_with_retry("DELETE", url, access_token)
  • Registration of the tool using the @mcp.tool decorator.
    @mcp.tool()
    async def delete_record(
Behavior3/5

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

With no annotations, description carries full burden. It successfully discloses conditional auth requirements (account_id only required if not server-configured) and parameter precedence (base_url overrides account_id). However, it fails to state that deletion is permanent/irreversible or describe error conditions.

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?

Uses structured docstring format (Args/Returns) that is front-loaded with the core action. Slightly verbose given the Returns section repeats what the output schema already provides, but every line conveys useful information.

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?

With 4 parameters and 0% schema coverage, the description successfully documents all inputs. Acknowledges return value existence without duplicating the output schema. Only gap is missing warning about destructive nature given lack of destructiveHint annotation.

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

Parameters5/5

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

Schema has 0% description coverage, but the description comprehensively documents all 4 parameters: record_type (with examples), record_id (semantics), account_id (conditional requirement), and base_url (override behavior). Fully compensates for schema deficiency.

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?

States specific verb (Delete) and resource (record) and distinguishes from siblings create_record/update_record/get_record. 'Upstream API' is slightly vague context, but the core purpose is unmistakable.

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?

Provides no guidance on when to use this versus update_record or create_record, nor does it warn that deletion is permanent. The Args section explains parameter mechanics but not usage strategy.

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/victor-velazquez-ai/enterprise-mcp-template'

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