Skip to main content
Glama

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
NameRequiredDescriptionDefault
namespaceIdNo
ingestJobRunIdYes
tenantIdNo

Implementation Reference

  • 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,
          })
        })
      },
    )
  • 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,
    })
  • 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>()
    }
  • 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>

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/pbteja1998/sourcesyncai-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server