Skip to main content
Glama
scmdr

SourceSync.ai MCP Server

by scmdr

createNamespace

Create a new namespace in SourceSync.ai by configuring file storage, vector storage, and embedding models for organizing and managing documents with semantic search capabilities.

Instructions

Creates a new namespace with the provided configuration. Requires a name, file storage configuration, vector storage configuration, and embedding model configuration.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYes
fileStorageConfigYes
vectorStorageConfigYes
embeddingModelConfigYes
webScraperConfigNo
tenantIdNo

Implementation Reference

  • src/index.ts:128-142 (registration)
    Registration of the MCP 'createNamespace' tool, including the inline handler that delegates to SourceSync client.
    server.tool(
      'createNamespace',
      'Creates a new namespace with the provided configuration. Requires a name, file storage configuration, vector storage configuration, and embedding model configuration.',
      createNamespaceSchema.shape,
      async (params: CreateNamespaceParams) => {
        return safeApiCall(async () => {
          const { tenantId, ...createParams } = params
    
          // Create a client with the provided API key
          const client = createClient({ tenantId })
    
          return await client.createNamespace(createParams)
        })
      },
    )
  • Zod schema defining input parameters for the createNamespace tool.
    export const createNamespaceSchema = z.object({
      name: z.string(),
      fileStorageConfig: fileStorageConfigSchema,
      vectorStorageConfig: vectorStorageConfigSchema,
      embeddingModelConfig: embeddingModelConfigSchema,
      webScraperConfig: webScraperConfigSchema.optional(),
      tenantId: tenantIdSchema,
    })
  • Core implementation in SourceSyncApiClient that sends POST request to /v1/namespaces to create the namespace.
    public async createNamespace({
      name,
      fileStorageConfig,
      vectorStorageConfig,
      embeddingModelConfig,
      webScraperConfig,
    }: SourceSyncCreateNamespaceRequest): Promise<SourceSyncCreateNamespaceResponse> {
      return this.client
        .url('/v1/namespaces')
        .json({
          name,
          fileStorageConfig,
          vectorStorageConfig,
          embeddingModelConfig,
          webScraperConfig,
        } satisfies SourceSyncCreateNamespaceRequest)
        .post()
        .json<SourceSyncCreateNamespaceResponse>()
    }
  • TypeScript type definitions for createNamespace request and response.
    export type SourceSyncCreateNamespaceRequest = {
      name: string
      fileStorageConfig: SourceSyncFileStorageConfig
      vectorStorageConfig: SourceSyncVectorStorageConfig
      embeddingModelConfig: SourceSyncEmbeddingModelConfig
      webScraperConfig?: SourceSyncWebScraperConfig
    }
    
    export type SourceSyncCreateNamespaceResponse =
      SourceSyncApiResponse<SourceSyncNamespace>
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. While 'Creates' implies a write operation, the description doesn't mention permissions needed, whether the operation is idempotent, what happens on failure, or what the response looks like. For a complex creation tool with 6 parameters, this is inadequate behavioral context.

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 efficiently structured in a single sentence that states the action and lists required components. Every word serves a purpose, though it could benefit from slightly more context about what a namespace represents in this system.

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 creation tool with 6 parameters, nested objects, no annotations, and no output schema, the description is insufficient. It doesn't explain what a namespace is, what happens after creation, error conditions, or how this relates to sibling tools. The agent would struggle to use this tool effectively without additional context.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The description lists the four required parameter categories (name, file storage, vector storage, embedding model), which provides some semantic context beyond the 0% schema description coverage. However, it doesn't explain the optional parameters (webScraperConfig, tenantId) or provide any details about what values are expected for each configuration type.

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 ('Creates') and resource ('a new namespace'), and specifies the required configuration components (name, file storage, vector storage, embedding model). However, it doesn't distinguish this from sibling tools like 'createConnection' or explain what a namespace represents in this context.

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 'createConnection' or 'updateNamespace'. It mentions required parameters but doesn't explain prerequisites, use cases, or when this tool is appropriate versus other namespace-related tools.

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