Skip to main content
Glama

createNamespace

Creates a new namespace in SourceSync.ai's knowledge management platform by configuring file storage, vector storage, and embedding models for organizing and searching content.

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

  • MCP tool handler function for 'createNamespace'. Extracts tenantId, creates a SourceSync client, and delegates to client.createNamespace, wrapped in safeApiCall for error handling.
    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 the input parameters (name, storage configs, etc.) for the createNamespace tool, used for validation in MCP.
    export const createNamespaceSchema = z.object({
      name: z.string(),
      fileStorageConfig: fileStorageConfigSchema,
      vectorStorageConfig: vectorStorageConfigSchema,
      embeddingModelConfig: embeddingModelConfigSchema,
      webScraperConfig: webScraperConfigSchema.optional(),
      tenantId: tenantIdSchema,
    })
  • src/index.ts:128-142 (registration)
    MCP server.tool call registering the 'createNamespace' tool, specifying name, description, input schema shape, and inline handler function.
    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)
        })
      },
    )
  • SourceSyncApiClient helper method implementing the core logic: POST JSON request to '/v1/namespaces' endpoint to create a new 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>()
    }
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 states this is a creation operation but doesn't mention permissions required, whether the operation is idempotent, what happens on conflict, rate limits, or what the response contains. For a complex creation tool with 6 parameters and nested objects, this leaves significant behavioral gaps.

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 enumerates the main configuration areas. It's appropriately sized for the tool's complexity, though it could benefit from a second sentence about behavioral aspects or usage context.

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 inadequate. It doesn't explain what a 'namespace' represents in this context, doesn't cover error conditions, doesn't describe the return value, and leaves behavioral aspects unspecified. The agent would struggle to use this tool correctly 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 four required parameter categories (name, file storage, vector storage, embedding model) which helps understand the scope, but with 0% schema description coverage and 6 total parameters (including optional webScraperConfig and tenantId), it doesn't fully compensate. It provides high-level semantic grouping but lacks details about parameter formats, constraints, or relationships.

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: 'Creates a new namespace with the provided configuration.' It specifies the verb ('creates') and resource ('namespace'), but doesn't differentiate from sibling tools like 'createConnection' or 'updateNamespace' beyond the resource name. The description is specific about what gets created but lacks sibling comparison.

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. It doesn't mention prerequisites, when-not-to-use scenarios, or compare with sibling tools like 'updateNamespace' or 'getNamespace'. The agent must infer usage from the tool name alone, which is insufficient for proper selection.

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/sitegpt/sourcesyncai-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server