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
    }
Behavior2/5

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

No annotations are provided, so the description carries full burden. It mentions 'automatic parsing' as a behavioral trait, but lacks critical details: it doesn't specify if this is a read/write operation (though 'ingests' implies mutation), what permissions are needed, whether it's idempotent, rate limits, or what happens on success/failure. For a mutation tool with zero annotation coverage, this is inadequate.

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

Conciseness5/5

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

The description is extremely concise with two sentences that are front-loaded and waste no words. Every part ('ingests a file into the namespace', 'supports various file formats with automatic parsing') adds value without redundancy.

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 (5 parameters, mutation operation, no annotations, no output schema), the description is incomplete. It lacks details on behavioral traits, parameter meanings, output format, error handling, and differentiation from siblings. For a file ingestion tool with rich input schema, this leaves significant gaps for the agent.

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?

Schema description coverage is low at 20%, with only 'chunkConfig' having a description. The tool description adds no parameter-specific information beyond implying file format support, failing to compensate for the coverage gap. It doesn't explain what 'namespaceId', 'file', 'metadata', or 'tenantId' mean or how they affect ingestion.

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 action ('ingests') and resource ('a file into the namespace'), specifying it supports various formats with automatic parsing. However, it doesn't explicitly differentiate from sibling ingestion tools like ingestText, ingestUrls, ingestWebsite, ingestSitemap, or ingestConnector, which all perform ingestion but for different input types.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives. With multiple sibling ingestion tools (e.g., ingestText for text, ingestUrls for URLs), the agent is left to infer usage based on the 'file' parameter, but no explicit when/when-not rules or prerequisites are stated.

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