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

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(

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