updateNamespace
Modify configuration settings for a namespace to adjust file storage, vector databases, embedding models, or data source integrations in SourceSync.ai's knowledge management system.
Instructions
Updates an existing namespace with the provided configuration parameters.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| namespaceId | No | ||
| fileStorageConfig | No | ||
| vectorStorageConfig | No | ||
| embeddingModelConfig | No | ||
| webScraperConfig | No | ||
| notionConfig | No | ||
| googleDriveConfig | No | ||
| dropboxConfig | No | ||
| onedriveConfig | No | ||
| boxConfig | No | ||
| sharepointConfig | No | ||
| tenantId | No |
Implementation Reference
- src/index.ts:176-190 (handler)MCP tool handler for 'updateNamespace': extracts params, creates SourceSync client, and delegates to client.updateNamespace wrapped in safeApiCall.server.tool( 'updateNamespace', 'Updates an existing namespace with the provided configuration parameters.', updateNamespaceSchema.shape, async (params: UpdateNamespaceParams) => { return safeApiCall(async () => { const { namespaceId, tenantId, ...updateParams } = params // Create a client with the provided API key const client = createClient({ namespaceId, tenantId }) return await client.updateNamespace(updateParams) }) }, )
- src/index.ts:176-190 (registration)Registers the 'updateNamespace' tool in the MCP server with description, input schema, and handler function.server.tool( 'updateNamespace', 'Updates an existing namespace with the provided configuration parameters.', updateNamespaceSchema.shape, async (params: UpdateNamespaceParams) => { return safeApiCall(async () => { const { namespaceId, tenantId, ...updateParams } = params // Create a client with the provided API key const client = createClient({ namespaceId, tenantId }) return await client.updateNamespace(updateParams) }) }, )
- src/schemas.ts:130-143 (schema)Zod schema defining input parameters for the updateNamespace tool, including optional configs for storage, embedding, etc.export const updateNamespaceSchema = z.object({ namespaceId: namespaceIdSchema, fileStorageConfig: fileStorageConfigSchema.optional(), vectorStorageConfig: vectorStorageConfigSchema.optional(), embeddingModelConfig: embeddingModelConfigSchema.optional(), webScraperConfig: webScraperConfigSchema.optional(), notionConfig: notionConfigSchema.optional(), googleDriveConfig: googleDriveConfigSchema.optional(), dropboxConfig: dropboxConfigSchema.optional(), onedriveConfig: onedriveConfigSchema.optional(), boxConfig: boxConfigSchema.optional(), sharepointConfig: sharepointConfigSchema.optional(), tenantId: tenantIdSchema, })
- src/sourcesync.ts:194-222 (handler)SourceSyncApiClient.updateNamespace: core implementation that performs PATCH request to API endpoint /v1/namespaces/{namespaceId} with partial config updates.public async updateNamespace({ fileStorageConfig, vectorStorageConfig, embeddingModelConfig, webScraperConfig, notionConfig, googleDriveConfig, dropboxConfig, onedriveConfig, boxConfig, sharepointConfig, }: SourceSyncUpdateNamespaceRequest): Promise<SourceSyncUpdateNamespaceResponse> { return this.client .url(`/v1/namespaces/${this.namespaceId}`) .json({ fileStorageConfig, vectorStorageConfig, embeddingModelConfig, webScraperConfig, notionConfig, googleDriveConfig, dropboxConfig, onedriveConfig, boxConfig, sharepointConfig, } satisfies SourceSyncUpdateNamespaceRequest) .patch() .json<SourceSyncUpdateNamespaceResponse>() }
- src/sourcesync.types.ts:276-289 (schema)TypeScript type definitions for SourceSyncUpdateNamespaceRequest (input) and Response (output) used by the client implementation.export type SourceSyncUpdateNamespaceRequest = { fileStorageConfig?: SourceSyncFileStorageConfig vectorStorageConfig?: SourceSyncVectorStorageConfig embeddingModelConfig?: SourceSyncEmbeddingModelConfig webScraperConfig?: SourceSyncWebScraperConfig notionConfig?: SourceSyncNotionConfig googleDriveConfig?: SourceSyncGoogleDriveConfig dropboxConfig?: SourceSyncDropboxConfig onedriveConfig?: SourceSyncOnedriveConfig boxConfig?: SourceSyncBoxConfig sharepointConfig?: SourceSyncSharepointConfig } export type SourceSyncUpdateNamespaceResponse =