Skip to main content
Glama
scmdr

SourceSync.ai MCP Server

by scmdr

ingestUrls

Extracts and processes content from specified URLs with configurable scraping options and metadata for knowledge management.

Instructions

Ingests content from a list of URLs. Supports scraping options and metadata.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
namespaceIdNo
ingestConfigYes
tenantIdNo

Implementation Reference

  • MCP tool registration and handler implementation for 'ingestUrls'. Parses params, creates SourceSyncApiClient instance, and invokes its ingestUrls method via safeApiCall wrapper.
    server.tool(
      'ingestUrls',
      'Ingests content from a list of URLs. Supports scraping options and metadata.',
      IngestUrlsSchema.shape,
      async (params) => {
        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.ingestUrls({
            ingestConfig,
          })
        })
      },
    )
  • Zod schema (IngestUrlsSchema) defining the input structure and validation for the ingestUrls tool, including urls array, optional scrapeOptions, metadata, and chunkConfig.
    export const IngestUrlsSchema = z.object({
      namespaceId: namespaceIdSchema.optional(),
      ingestConfig: z.object({
        source: z.literal(SourceSyncIngestionSource.URLS_LIST),
        config: z.object({
          urls: z.array(z.string()),
          scrapeOptions: ScrapeOptionsSchema.optional(),
          metadata: z.record(z.union([z.string(), z.array(z.string())])).optional(),
        }),
        chunkConfig: chunkConfigSchema.optional(),
      }),
      tenantId: tenantIdSchema,
    })
  • SourceSyncApiClient.ingestUrls helper method: constructs and sends POST request to SourceSync API endpoint '/v1/ingest/urls' with namespaceId and ingestConfig (merging default chunkConfig).
    public async ingestUrls({
      ingestConfig,
    }: Omit<
      SourceSyncIngestUrlsRequest,
      'namespaceId'
    >): Promise<SourceSyncIngestResponse> {
      return this.client
        .url('/v1/ingest/urls')
        .json({
          namespaceId: this.namespaceId,
          ingestConfig: {
            ...ingestConfig,
            chunkConfig: SourceSyncApiClient.CHUNK_CONFIG,
          },
        } satisfies SourceSyncIngestUrlsRequest)
        .post()
        .json<SourceSyncIngestResponse>()
    }
  • TypeScript type definition for SourceSyncIngestUrlsRequest, used by the SourceSyncApiClient for type safety in the ingestUrls API call.
    export type SourceSyncIngestUrlsRequest = {
      namespaceId: string
      ingestConfig: {
        source: SourceSyncIngestionSource.URLS_LIST
        config: {
          urls: string[]
          scrapeOptions?: SourceSyncScrapeOptions
          metadata?: Record<string, any>
        }
        chunkConfig?: SourceSyncChunkConfig
      }
    }
  • src/index.ts:10-19 (registration)
    Import statement registering IngestUrlsSchema for use in the ingestUrls tool definition.
    import {
      validateApiKeySchema,
      createNamespaceSchema,
      listNamespacesSchema,
      getNamespaceSchema,
      updateNamespaceSchema,
      deleteNamespaceSchema,
      ingestTextSchema,
      IngestFileSchema,
      IngestUrlsSchema,
Behavior2/5

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

With no annotations provided, the description carries full burden for behavioral disclosure. It mentions scraping and metadata support but doesn't describe what 'ingest' actually does (e.g., stores content, processes it, where it goes), whether it's asynchronous, what permissions are needed, or what happens on failure. The description is too vague for a mutation operation.

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. The first sentence states the core purpose, and the second adds capability details. There's no wasted verbiage, though it could be more informative given the tool's complexity.

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 complex ingestion tool with 3 parameters (including nested objects), no annotations, and no output schema, the description is inadequate. It doesn't explain what ingestion means in this context, where content goes, what the expected outcome is, or how to interpret results. The agent would struggle to use this tool correctly.

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 for 3 parameters (namespaceId, ingestConfig, tenantId), the description doesn't compensate at all. It mentions 'scraping options and metadata' which partially maps to ingestConfig properties, but doesn't explain namespaceId, tenantId, or the complex nested structure of ingestConfig with its required urls array and optional chunkConfig.

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's purpose: 'Ingests content from a list of URLs' specifies the verb (ingest) and resource (content from URLs). It distinguishes from some siblings like ingestFile or ingestText by specifying URL sources, but doesn't explicitly differentiate from fetchUrlContent or ingestWebsite which also handle URLs.

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 fetchUrlContent, ingestWebsite, or ingestSitemap. It mentions 'Supports scraping options and metadata' which hints at capabilities but doesn't define appropriate use cases or exclusions.

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