Skip to main content
Glama
Unstructured-IO

Unstructured API MCP Server

Official

get_job_info

Retrieve detailed information about a specific job by providing its ID to access status, progress, and related data from the Unstructured API.

Instructions

Get detailed information about a specific job.

Args:
    job_id: ID of the job to get information for

Returns:
    String containing the job information

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
job_idYes

Implementation Reference

  • The handler function for the 'get_job_info' tool. It is decorated with @mcp.tool(), which registers it as an MCP tool. The function fetches job information from the Unstructured API client using the provided job_id and formats it into a readable string.
    @mcp.tool()
    async def get_job_info(ctx: Context, job_id: str) -> str:
        """Get detailed information about a specific job.
    
        Args:
            job_id: ID of the job to get information for
    
        Returns:
            String containing the job information
        """
        client = ctx.request_context.lifespan_context.client
    
        response = await client.jobs.get_job_async(
            request=GetJobRequest(job_id=job_id),
        )
    
        info = response.job_information
    
        result = ["Job Information:"]
        result.append(f"Created at: {info.created_at}")
        result.append(f"ID: {info.id}")
        result.append(f"Status: {info.status}")
        result.append(f"Workflow name: {info.workflow_name}")
        result.append(f"Workflow id: {info.workflow_id}")
        result.append(f"Runtime: {info.runtime}")
        result.append(f"Raw result: {json.dumps(json.loads(info.json()), indent=2)}")
    
        return "\n".join(result)

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