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>()
    }
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries full burden. It discloses the permanent nature of deletion ('permanently deletes'), which is a critical behavioral trait. However, it lacks other important details such as authentication requirements, error conditions (e.g., if namespace doesn't exist), or side effects (e.g., impact on related documents).

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence with zero wasted words. It's appropriately sized and front-loaded, directly stating the core action without unnecessary elaboration.

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?

Given this is a destructive operation with no annotations, no output schema, and 2 parameters (one undocumented), the description is incomplete. It should address permissions, consequences, and parameter details to adequately guide an agent in a high-stakes deletion context.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must compensate. It only mentions 'namespaceId' as a parameter, ignoring 'tenantId' entirely. This leaves half of the parameters undocumented, failing to add meaningful semantics beyond the bare schema.

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 action ('permanently deletes') and resource ('a namespace by its ID'), providing specific verb+resource pairing. However, it doesn't distinguish this from sibling tools like 'deleteDocuments' or 'updateNamespace' which also involve namespace operations, missing explicit differentiation.

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 (e.g., whether the namespace must be empty), exclusions, or reference sibling tools like 'listNamespaces' for selection or 'updateNamespace' for modifications instead of deletion.

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