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
| Name | Required | Description | Default |
|---|---|---|---|
| job_id | Yes |
Implementation Reference
- uns_mcp/server.py:510-537 (handler)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)