Skip to main content
Glama
scmdr

SourceSync.ai MCP Server

by scmdr

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

Implementation Reference

  • 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,
          })
        })
      },
    )
  • 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,
    })
  • 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>()
    }
  • TypeScript type definitions for the request (ingestJobRunId) and response (SourceSyncApiResponse<SourceSyncIngestJobRun>) of getIngestJobRunStatus.
    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/scmdr/sourcesyncai-mcp'

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