Skip to main content
Glama
Unstructured-IO

Unstructured API MCP Server

Official

update_s3_destination

Modify the S3 destination connector by updating its ID and remote URL, enabling accurate data storage and retrieval within the Unstructured API MCP Server.

Instructions

Update an S3 destination connector.

Args: destination_id: ID of the destination connector to update remote_url: The S3 URI to the bucket or folder Returns: String containing the updated destination connector information

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
destination_idYes
recursiveNo
remote_urlNo

Implementation Reference

  • The handler function that executes the core logic for updating an S3 destination connector by fetching current config, applying updates, and calling the API.
    async def update_s3_destination( ctx: Context, destination_id: str, remote_url: Optional[str] = None, recursive: Optional[bool] = None, ) -> str: """Update an S3 destination connector. Args: destination_id: ID of the destination connector to update remote_url: The S3 URI to the bucket or folder 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 remote_url is not None: config["remote_url"] = remote_url if recursive is not None: config["recursive"] = recursive 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="S3", connector_type="Destination", created_or_updated="Updated", ) return result except Exception as e: return f"Error updating S3 destination connector: {str(e)}"
  • Registration of the update_s3_destination handler in the dispatcher dictionary for 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, }
  • Import of the update_s3_destination function for use in the destination tools.
    from uns_mcp.connectors.destination.s3 import ( create_s3_destination, update_s3_destination, )
  • MCP tool registration for the higher-level update_destination_connector which dispatches to update_s3_destination.
    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)

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/Unstructured-IO/UNS-MCP'

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