deleteOrganizationContent
Remove specific content from an organization's database by providing its content ID to manage stored information.
Instructions
Delete specific content from the organization's database
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"contentId": "<contentId>"
},
"name": "deleteOrganizationContent"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| contentId | Yes | The ID of the content to delete |
Implementation Reference
- rag_tools.py:38-50 (handler)The handler function for the deleteOrganizationContent tool. It invokes the rag_service to delete the content by ID and returns a success message.
def delete_organization_content(self, content_id: str) -> list[str]: """ Delete specific content from the organization's database. Args: content_id: The ID of the content to delete (required) Returns: Success message """ self.rag_service.delete_content(content_id, self.user_id_from_environment) return ["Content deleted successfully"] - rag_service.py:46-57 (helper)Helper function in RagService that performs the actual HTTP DELETE request to remove the specified content from the content service.
def delete_content(self, content_id: str, user_id: str = "invalid") -> None: """Delete specific content from the organization's database""" url = f"{self.content_service_url}/contents/{content_id}" headers = {'userId': user_id} try: response = requests.delete(url, headers=headers) response.raise_for_status() except requests.RequestException as e: print(f"Error deleting content: {e}") raise - mcp_server.py:73-87 (registration)Registration of the deleteOrganizationContent tool in the list_tools handler, defining its name, description, and input schema.
types.Tool( name="deleteOrganizationContent", description="Delete specific content from the organization's database", inputSchema={ "type": "object", "properties": { "contentId": { "type": "string", "description": "The ID of the content to delete" } }, "required": ["contentId"], "additionalProperties": False } ), - mcp_server.py:76-86 (schema)Input schema for the deleteOrganizationContent tool, specifying the required contentId parameter.
inputSchema={ "type": "object", "properties": { "contentId": { "type": "string", "description": "The ID of the content to delete" } }, "required": ["contentId"], "additionalProperties": False }