getIngestJobRunStatus
Check the status of a submitted ingestion job to monitor progress and completion in SourceSync.ai's knowledge management platform.
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:333-349 (handler)MCP tool handler for getIngestJobRunStatus: creates SourceSync client and calls its getIngestJobRunStatus method, wrapped in safeApiCall.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/index.ts:333-349 (registration)Registers the 'getIngestJobRunStatus' tool with McpServer using IngestJobRunStatusSchema for input validation.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 for input parameters to the getIngestJobRunStatus tool: namespaceId (optional), ingestJobRunId (required), tenantId (optional).export const IngestJobRunStatusSchema = z.object({ namespaceId: namespaceIdSchema.optional(), ingestJobRunId: z.string(), tenantId: tenantIdSchema, })
- src/sourcesync.ts:456-467 (helper)SourceSyncApiClient method implementing the API call to retrieve ingest job run status via GET /v1/ingest-job-runs/{ingestJobRunId}.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>) of getIngestJobRunStatus.export type SourceSyncGetIngestJobRunStatusRequest = { ingestJobRunId: string } export type SourceSyncGetIngestJobRunStatusResponse = SourceSyncApiResponse<SourceSyncIngestJobRun>