Skip to main content
Glama

deleteNamespace

Permanently remove a namespace by its ID from SourceSync.ai's knowledge management platform to clean up unused or outdated organizational structures.

Instructions

Permanently deletes a namespace by its ID.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
namespaceIdNo
tenantIdNo

Implementation Reference

  • src/index.ts:192-206 (registration)
    Registration of the 'deleteNamespace' MCP tool using server.tool, including description, input schema, and handler function that delegates to SourceSync client.
    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() }) }, )
  • The handler function executed when the 'deleteNamespace' tool is called. It extracts namespaceId and tenantId from params, creates a SourceSyncApiClient instance, and calls its deleteNamespace method, wrapped in safeApiCall for error handling.
    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() }) },
  • Zod schema defining the input parameters for the deleteNamespace tool: optional namespaceId and tenantId.
    export const deleteNamespaceSchema = z.object({ namespaceId: namespaceIdSchema, tenantId: tenantIdSchema, })
  • TypeScript type inferred from deleteNamespaceSchema for input parameters.
    export type DeleteNamespaceParams = z.infer<typeof deleteNamespaceSchema>
  • Core implementation in SourceSyncApiClient: sends DELETE request to `/v1/namespaces/${namespaceId}` endpoint to delete the namespace.
    public async deleteNamespace(): Promise<SourceSyncDeleteNamespaceResponse> { return this.client .url(`/v1/namespaces/${this.namespaceId}`) .delete() .json<SourceSyncDeleteNamespaceResponse>() }

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

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