Skip to main content
Glama
scmdr

SourceSync.ai MCP Server

by scmdr

ingestFile

Add files to a knowledge base with automatic parsing and chunking. Supports multiple formats for organizing content in SourceSync.ai's platform.

Instructions

Ingests a file into the namespace. Supports various file formats with automatic parsing.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
namespaceIdNo
fileYes
metadataNo
chunkConfigNoOptional Chunk config. When not passed, default chunk config will be used.
tenantIdNo

Implementation Reference

  • Core implementation of ingestFile in SourceSyncApiClient: sends file via multipart form-data to the SourceSync API endpoint /v1/ingest/file, including namespaceId, metadata, and default chunk config.
    public async ingestFile({ file, metadata, }: Omit< SourceSyncIngestFileRequest, 'namespaceId' >): Promise<SourceSyncIngestResponse> { return this.client .url('/v1/ingest/file') .formData({ namespaceId: this.namespaceId, file, metadata: JSON.stringify(metadata), chunkConfig: JSON.stringify(SourceSyncApiClient.CHUNK_CONFIG), }) .post() .json<SourceSyncIngestResponse>() }
  • src/index.ts:230-248 (registration)
    MCP tool registration for 'ingestFile': registers the tool with the McpServer, providing description, Zod schema, and handler that wraps SourceSyncApiClient.ingestFile.
    'ingestFile', 'Ingests a file into the namespace. Supports various file formats with automatic parsing.', IngestFileSchema.shape, async (params) => { return safeApiCall(async () => { const { namespaceId, tenantId, file, metadata, chunkConfig } = params // Create a client with the provided parameters const client = createClient({ namespaceId, tenantId }) // Direct passthrough to the API return await client.ingestFile({ file: file as unknown as File, // Type cast to File as required by the client metadata, chunkConfig, }) }) }, )
  • Zod schema defining the input parameters for the ingestFile tool, including file (Blob), optional metadata, chunkConfig, namespaceId, and tenantId.
    export const IngestFileSchema = z.object({ namespaceId: namespaceIdSchema.optional(), file: z.instanceof(Blob), metadata: z.record(z.union([z.string(), z.array(z.string())])).optional(), chunkConfig: chunkConfigSchema.optional(), tenantId: tenantIdSchema, })
  • TypeScript type definition for SourceSyncIngestFileRequest used by the API client for typing the ingestFile parameters.
    export type SourceSyncIngestFileRequest = { namespaceId: string file: File metadata?: Record<string, any> chunkConfig?: SourceSyncChunkConfig }

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