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>()
    }
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 'ingests' which implies a write operation, but doesn't specify whether this is idempotent, what permissions are required, whether it's asynchronous, what happens on failure, or what the expected output looks like. The mention of 'optional metadata and chunk configuration' is helpful but insufficient for a mutation 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 appropriately concise with two sentences that efficiently convey the core functionality and key features. It's front-loaded with the main purpose and follows with supporting details, though it could be slightly more structured by separating required vs optional aspects.

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?

For a mutation tool with 3 parameters (including complex nested objects), 0% schema description coverage, and no output schema, the description is inadequate. It doesn't explain what 'ingests' means operationally, what the expected outcome is, error conditions, or provide sufficient parameter guidance given the schema complexity.

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?

With 0% schema description coverage and 3 parameters (including nested objects), the description provides minimal help. It mentions 'optional metadata and chunk configuration' which hints at some parameters, but doesn't explain the required namespaceId, tenantId, or the structure of ingestConfig. The schema shows complex nested objects that aren't addressed in the description.

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 ('raw text content into the namespace'), making the purpose understandable. It distinguishes from some siblings like ingestFile or ingestUrls by specifying text content, but doesn't explicitly differentiate from ingestConnector or ingestWebsite which might also handle text.

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 like ingestFile, ingestUrls, or ingestWebsite. It mentions optional metadata and chunk configuration but doesn't explain when these features are needed or what the default behavior is when they're omitted.

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