get_job_info
Retrieve detailed information about a specific job using its unique ID with the Unstructured API MCP Server. Ideal for tracking job status and outputs.
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-538 (handler)The main handler function for the 'get_job_info' tool. It is decorated with @mcp.tool(), which both defines and registers the tool with the FastMCP server. The function fetches job details from the Unstructured API client using the job_id parameter and returns a formatted string summary of the job information.@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)