delete_source_connector
Remove a source connector from the Unstructured API MCP Server by specifying its ID to manage data integration sources.
Instructions
Delete a source connector.
Args:
source_id: ID of the source connector to delete
Returns:
String containing the result of the deletion
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| source_id | Yes |
Implementation Reference
- The handler function that executes the deletion of a source connector using the unstructured client API.async def delete_source_connector(ctx: Context, source_id: str) -> str: """Delete a source connector. Args: source_id: ID of the source connector to delete Returns: String containing the result of the deletion """ client = ctx.request_context.lifespan_context.client try: await client.sources.delete_source_async(request=DeleteSourceRequest(source_id=source_id)) return f"Source Connector with ID {source_id} deleted successfully" except Exception as e: return f"Error deleting source connector: {str(e)}"
- uns_mcp/connectors/source/__init__.py:15-15 (registration)Registers the delete_source_connector function as an MCP tool.mcp.tool()(delete_source_connector)
- uns_mcp/connectors/source/__init__.py:4-7 (registration)Imports the delete_source_connector function for registration.create_source_connector, delete_source_connector, update_source_connector, )