updateNamespace
Modify an existing namespace by updating configuration parameters for file storage, vector storage, embedding models, and integrations like Notion, Google Drive, and Dropbox.
Instructions
Updates an existing namespace with the provided configuration parameters.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| boxConfig | No | ||
| dropboxConfig | No | ||
| embeddingModelConfig | No | ||
| fileStorageConfig | No | ||
| googleDriveConfig | No | ||
| namespaceId | No | ||
| notionConfig | No | ||
| onedriveConfig | No | ||
| sharepointConfig | No | ||
| tenantId | No | ||
| vectorStorageConfig | No | ||
| webScraperConfig | No |
Implementation Reference
- src/index.ts:180-189 (handler)MCP tool handler function for 'updateNamespace'. Extracts parameters, creates SourceSync client, and delegates to client.updateNamespace, wrapped in safeApiCall for error handling.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 with the MCP server using server.tool, specifying name, 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 the input parameters for the updateNamespace tool, including optional configs for storage, embedding, scraper, and connectors.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 (helper)SourceSyncApiClient method that sends a PATCH request to the SourceSync API endpoint /v1/namespaces/{namespaceId} to update namespace configurations.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>() }