deleteNamespace
Permanently remove a namespace by its ID to manage and organize data within the SourceSync.ai MCP Server, ensuring efficient knowledge management.
Instructions
Permanently deletes a namespace by its ID.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| namespaceId | No | ||
| tenantId | No |
Implementation Reference
- src/index.ts:192-206 (registration)MCP tool registration for 'deleteNamespace', including the inline handler function that extracts parameters, creates a SourceSync client, and delegates to client.deleteNamespace() wrapped in safeApiCall for error handling.server.tool( 'deleteNamespace', 'Permanently deletes a namespace by its ID.', deleteNamespaceSchema.shape, async (params: DeleteNamespaceParams) => { return safeApiCall(async () => { const { namespaceId, tenantId } = params // Create a client with the provided API key const client = createClient({ namespaceId, tenantId }) return await client.deleteNamespace() }) }, )
- src/sourcesync.ts:227-232 (handler)Core implementation of the deleteNamespace method in the SourceSyncApiClient class, which performs an HTTP DELETE request to `/v1/namespaces/${namespaceId}` and parses the response.public async deleteNamespace(): Promise<SourceSyncDeleteNamespaceResponse> { return this.client .url(`/v1/namespaces/${this.namespaceId}`) .delete() .json<SourceSyncDeleteNamespaceResponse>() }
- src/schemas.ts:145-148 (schema)Zod schema defining the input parameters for the deleteNamespace tool: required namespaceId and optional tenantId.export const deleteNamespaceSchema = z.object({ namespaceId: namespaceIdSchema, tenantId: tenantIdSchema, })