Skip to main content
Glama
scmdr

SourceSync.ai MCP Server

by scmdr

ingestText

Adds text content to a knowledge base with configurable metadata and chunking options for structured data management.

Instructions

Ingests raw text content into the namespace. Supports optional metadata and chunk configuration.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
namespaceIdNo
ingestConfigYes
tenantIdNo

Implementation Reference

  • src/index.ts:209-226 (registration)
    MCP server.tool registration for the 'ingestText' tool, including description, input schema reference, and inline handler function that creates a SourceSync client and delegates to its ingestText method.
    server.tool( 'ingestText', 'Ingests raw text content into the namespace. Supports optional metadata and chunk configuration.', ingestTextSchema.shape, async (params: IngestTextParams) => { return safeApiCall(async () => { const { namespaceId, tenantId, ingestConfig } = params // Create a client with the provided parameters const client = createClient({ namespaceId, tenantId }) // Direct passthrough to the API return await client.ingestText({ ingestConfig, }) }) }, )
  • Handler function for the ingestText MCP tool. Extracts parameters, creates SourceSyncApiClient instance, and calls its ingestText method with the provided ingestConfig, wrapped in safeApiCall for error handling.
    async (params: IngestTextParams) => { return safeApiCall(async () => { const { namespaceId, tenantId, ingestConfig } = params // Create a client with the provided parameters const client = createClient({ namespaceId, tenantId }) // Direct passthrough to the API return await client.ingestText({ ingestConfig, }) }) },
  • Zod schema (ingestTextSchema) defining the input parameters for the ingestText tool, including optional namespaceId, required ingestConfig with text source and config, optional chunkConfig, and optional tenantId.
    export const ingestTextSchema = z.object({ namespaceId: namespaceIdSchema.optional(), ingestConfig: z.object({ source: z.literal(SourceSyncIngestionSource.TEXT), config: z.object({ name: z.string().optional(), text: z.string(), metadata: z.record(z.union([z.string(), z.array(z.string())])).optional(), }), chunkConfig: chunkConfigSchema.optional(), }), tenantId: tenantIdSchema, })
  • SourceSyncApiClient.ingestText method: the core implementation that sends a POST request to the SourceSync API endpoint '/v1/ingest/text' with namespaceId and ingestConfig (merging default chunkConfig).
    public async ingestText({ ingestConfig, }: Omit< SourceSyncIngestTextRequest, 'namespaceId' >): Promise<SourceSyncIngestResponse> { return this.client .url('/v1/ingest/text') .json({ namespaceId: this.namespaceId, ingestConfig: { ...ingestConfig, chunkConfig: SourceSyncApiClient.CHUNK_CONFIG, }, } satisfies SourceSyncIngestTextRequest) .post() .json<SourceSyncIngestResponse>() }

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