Skip to main content
Glama
scmdr

SourceSync.ai MCP Server

by scmdr

ingestConnector

Processes backlogged or failed documents in SourceSync.ai connectors by automatically ingesting them without requiring manual ID input, using existing authorization flows.

Instructions

Ingests all documents in the connector that are in backlog or failed status. No need to provide the document ids or file ids for the ingestion. Ids are already in the backlog when picked thorough the picker. If not, the user has to go through the authorization flow again, where they will be asked to pick the documents again.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
namespaceIdNo
ingestConfigYes
tenantIdNo

Implementation Reference

  • src/index.ts:311-330 (registration)
    MCP tool registration for 'ingestConnector', including the handler function that wraps the SourceSync client call.
    server.tool(
      'ingestConnector',
      'Ingests all documents in the connector that are in backlog or failed status. No need to provide the document ids or file ids for the ingestion. Ids are already in the backlog when picked thorough the picker. If not, the user has to go through the authorization flow again, where they will be asked to pick the documents again.',
      IngestConnectorSchema.shape,
      async (params) => {
        return safeApiCall(async () => {
          const { namespaceId, tenantId, ingestConfig } = params
    
          // Create a client with the provided API key
          const client = createClient({ namespaceId, tenantId })
    
          return await client.ingestConnector({
            ingestConfig: {
              ...ingestConfig,
              source: ingestConfig.source as unknown as SourceSyncIngestionSource,
            },
          })
        })
      },
    )
  • Core implementation of ingestConnector in SourceSyncApiClient, makes the HTTP POST request to the SourceSync API.
    public async ingestConnector({
      ingestConfig,
    }: Omit<
      SourceSyncIngestConnectorRequest,
      'namespaceId'
    >): Promise<SourceSyncIngestResponse> {
      return this.client
        .url(`/v1/ingest/${toLowerKebabCase(ingestConfig.source)}`)
        .json({
          namespaceId: this.namespaceId,
          ingestConfig: {
            ...ingestConfig,
            chunkConfig: SourceSyncApiClient.CHUNK_CONFIG,
          },
        } satisfies SourceSyncIngestConnectorRequest)
        .post()
        .json<SourceSyncIngestResponse>()
    }
  • Zod schema defining the input parameters for the ingestConnector tool.
    export const IngestConnectorSchema = z.object({
      namespaceId: namespaceIdSchema.optional(),
      ingestConfig: z.object({
        source: z.string(),
        config: z.object({
          connectionId: z.string(),
          metadata: z.record(z.union([z.string(), z.array(z.string())])).optional(),
        }),
        chunkConfig: chunkConfigSchema.optional(),
      }),
      tenantId: tenantIdSchema,
    })
  • TypeScript type definition for the SourceSyncIngestConnectorRequest used in the API client.
    export type SourceSyncIngestConnectorRequest = {
      namespaceId: string
      ingestConfig: {
        source: SourceSyncIngestionSource
        config: {
          connectionId: string
          metadata?: Record<string, any>
        }
        chunkConfig?: SourceSyncChunkConfig
      }
    }
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It mentions that 'Ids are already in the backlog when picked through the picker' and references an authorization flow, hinting at workflow dependencies. However, it fails to disclose critical traits such as whether this is a read or write operation, potential side effects (e.g., data mutation), error handling, rate limits, or authentication needs, leaving significant gaps for an ingestion tool.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is reasonably concise with three sentences that focus on core functionality and workflow notes. It avoids unnecessary fluff and is front-loaded with the main purpose. However, the second sentence about 'No need to provide the document ids' could be integrated more smoothly, and some details feel slightly repetitive, but overall it's efficient.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's complexity (3 parameters with nested objects, no output schema, and no annotations), the description is incomplete. It explains the 'what' (ingesting backlog/failed documents) but lacks details on parameters, return values, error conditions, and behavioral traits. For a tool that likely involves data processing and system interactions, this leaves too many unknowns for reliable agent use.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema description coverage is 0%, meaning parameters like 'namespaceId', 'ingestConfig', and 'tenantId' are undocumented in the schema. The description adds no information about these parameters—it doesn't explain what they mean, their required values, or how they relate to the ingestion process. This leaves the agent with insufficient guidance to use the tool effectively, failing to compensate for the schema gap.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool 'ingests all documents in the connector that are in backlog or failed status,' specifying the verb (ingests), resource (documents), and scope (backlog/failed status). However, it doesn't explicitly differentiate from sibling tools like 'ingestFile' or 'ingestUrls,' which handle different document sources, leaving some ambiguity about when to choose this over those alternatives.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage by mentioning that it handles documents 'in backlog or failed status' and references an authorization flow, suggesting it's for retrying failed ingestions or processing queued items. However, it lacks explicit guidance on when to use this versus alternatives like 'ingestFile' or 'resyncDocuments,' and doesn't state prerequisites or exclusions clearly, relying on implied context.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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