update_neo4j_destination
Modify a Neo4j destination connector in the Unstructured API MCP Server by specifying the destination ID, database, URI, and username for updated configurations.
Instructions
Update an neo4j destination connector.
Args:
destination_id: ID of the destination connector to update
database: The neo4j database, e.g. "neo4j"
uri: The neo4j URI, e.g. neo4j+s://<neo4j_instance_id>.databases.neo4j.io
username: The neo4j username
Returns:
String containing the updated destination connector information
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| batch_size | No | ||
| database | No | ||
| destination_id | Yes | ||
| uri | No | ||
| username | No |
Implementation Reference
- The core handler function that performs the update operation for Neo4j destination connectors by retrieving current config, applying updates, and calling the backend API.async def update_neo4j_destination( ctx: Context, destination_id: str, database: Optional[str] = None, uri: Optional[str] = None, batch_size: Optional[int] = None, ) -> str: """Update an neo4j destination connector. Args: destination_id: ID of the destination connector to update database: The neo4j database, e.g. "neo4j" uri: The neo4j URI, e.g. neo4j+s://<neo4j_instance_id>.databases.neo4j.io batch_size: The batch size for the connector Returns: String containing the updated destination connector information """ client = ctx.request_context.lifespan_context.client # Get the current destination connector configuration try: get_response = await client.destinations.get_destination_async( request=GetDestinationRequest(destination_id=destination_id), ) current_config = get_response.destination_connector_information.config except Exception as e: return f"Error retrieving destination connector: {str(e)}" # Update configuration with new values config = dict(current_config) if database is not None: config["database"] = database if uri is not None: config["uri"] = uri if batch_size is not None: config["batch_size"] = batch_size destination_connector = UpdateDestinationConnector(config=config) try: response = await client.destinations.update_destination_async( request=UpdateDestinationRequest( destination_id=destination_id, update_destination_connector=destination_connector, ), ) result = create_log_for_created_updated_connector( response, connector_name="neo4j", connector_type="Destination", created_or_updated="Updated", ) return result except Exception as e: return f"Error updating neo4j destination connector: {str(e)}"
- Input schema description for the neo4j-specific configuration parameters in the type_specific_config dict of the update_destination_connector tool.neo4j: database: (Optional[str]): The Neo4j database, e.g. "neo4j" uri: (Optional[str]): The Neo4j URI e.g. neo4j+s://<neo4j_instance_id>.databases.neo4j.io batch_size: (Optional[int]) The batch size for the connector
- uns_mcp/connectors/destination/destination_tool.py:200-209 (registration)Dispatches to update_neo4j_destination handler when destination_type is 'neo4j' in the generic update_destination_connector tool.update_functions = { "astradb": update_astradb_destination, "databricks_delta_table": update_databricks_delta_table_destination, "databricks_volumes": update_databricks_volumes_destination, "mongodb": update_mongodb_destination, "neo4j": update_neo4j_destination, "pinecone": update_pinecone_destination, "s3": update_s3_destination, "weaviate": update_weaviate_destination, }
- uns_mcp/connectors/destination/__init__.py:10-14 (registration)Registers the generic update_destination_connector MCP tool, which uses the neo4j handler internally.def register_destination_connectors(mcp: FastMCP): """Register all destination connector tools with the MCP server.""" mcp.tool()(create_destination_connector) mcp.tool()(update_destination_connector) mcp.tool()(delete_destination_connector)