getIngestJobRunStatus
Check the status of an ingestion job in SourceSync.ai to monitor data processing progress and verify completion.
Instructions
Checks the status of a previously submitted ingestion job.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| namespaceId | No | ||
| ingestJobRunId | Yes | ||
| tenantId | No |
Implementation Reference
- src/index.ts:337-348 (handler)MCP tool handler that extracts parameters, creates a SourceSyncApiClient instance using createClient helper, and invokes the underlying getIngestJobRunStatus method.async (params) => { return safeApiCall(async () => { const { namespaceId, tenantId, ingestJobRunId } = params // Create a client with the provided API key const client = createClient({ namespaceId, tenantId }) return await client.getIngestJobRunStatus({ ingestJobRunId, }) }) },
- src/index.ts:332-349 (registration)Registers the 'getIngestJobRunStatus' tool with the MCP server using server.tool, specifying name, description, input schema, and handler function.// Add getIngestJobRunStatus tool server.tool( 'getIngestJobRunStatus', 'Checks the status of a previously submitted ingestion job.', IngestJobRunStatusSchema.shape, async (params) => { return safeApiCall(async () => { const { namespaceId, tenantId, ingestJobRunId } = params // Create a client with the provided API key const client = createClient({ namespaceId, tenantId }) return await client.getIngestJobRunStatus({ ingestJobRunId, }) }) }, )
- src/schemas.ts:280-284 (schema)Zod schema defining the input parameters for the getIngestJobRunStatus tool: optional namespaceId, required ingestJobRunId, optional tenantId.export const IngestJobRunStatusSchema = z.object({ namespaceId: namespaceIdSchema.optional(), ingestJobRunId: z.string(), tenantId: tenantIdSchema, })
- src/sourcesync.ts:456-467 (helper)SourceSyncApiClient helper method that makes the HTTP GET request to the SourceSync API endpoint /v1/ingest-job-runs/{ingestJobRunId} with namespaceId query param to retrieve the job status.public async getIngestJobRunStatus({ ingestJobRunId, }: Omit< SourceSyncGetIngestJobRunStatusRequest, 'namespaceId' >): Promise<SourceSyncGetIngestJobRunStatusResponse> { return this.client .url(`/v1/ingest-job-runs/${ingestJobRunId}`) .query({ namespaceId: this.namespaceId }) .get() .json<SourceSyncGetIngestJobRunStatusResponse>() }
- src/sourcesync.types.ts:528-534 (schema)TypeScript type definitions for the request (ingestJobRunId) and response (SourceSyncApiResponse<SourceSyncIngestJobRun>) used by the getIngestJobRunStatus API method.export type SourceSyncGetIngestJobRunStatusRequest = { ingestJobRunId: string } export type SourceSyncGetIngestJobRunStatusResponse = SourceSyncApiResponse<SourceSyncIngestJobRun>