Skip to main content
Glama
Unstructured-IO

Unstructured API MCP Server

Official

list_destinations

Retrieve a list of available destinations from the Unstructured API, optionally filtered by connector type, to manage data flow and integration points.

Instructions

List available destinations from the Unstructured API.

Args: destination_type: Optional destination connector type to filter by Returns: String containing the list of destinations

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
destination_typeNo

Implementation Reference

  • The handler function implementing the logic for the 'list_destinations' tool. It uses the UnstructuredClient to fetch destinations, optionally filters by type, sorts them alphabetically by name, and returns a formatted list as a string.
    @mcp.tool() async def list_destinations( ctx: Context, destination_type: Optional[DestinationConnectorType | str] = None, ) -> str: """List available destinations from the Unstructured API. Args: destination_type: Optional destination connector type to filter by Returns: String containing the list of destinations """ client = ctx.request_context.lifespan_context.client request = ListDestinationsRequest() if destination_type: try: destination_type = ( DestinationConnectorType(destination_type) if isinstance(destination_type, str) else destination_type ) request.destination_type = destination_type except KeyError: return f"Invalid destination type: {destination_type}" response = await client.destinations.list_destinations_async(request=request) sorted_destinations = sorted( response.response_list_destinations, key=lambda dest: dest.name.lower(), ) if not sorted_destinations: return "No destinations found" result = ["Available destinations:"] for dest in sorted_destinations: result.append(f"- {dest.name} (ID: {dest.id})") return "\n".join(result)
  • Import of ListDestinationsRequest schema used internally in the handler for API requests.
    ListDestinationsRequest, ListJobsRequest, ListSourcesRequest, ListWorkflowsRequest, RunWorkflowRequest, UpdateWorkflowRequest, )
  • Usage of the underlying client method in a helper function gather_workflows_details.
    client.destinations.list_destinations_async(request=ListDestinationsRequest()),
  • The @mcp.tool() decorator registers the list_destinations function as an MCP tool.
    @mcp.tool()

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