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>()
    }

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

C2.8/5.0
Behavior2/5

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

With no annotations provided, the description carries full burden for behavioral disclosure. It states the action is 'permanent', which is crucial for a destructive operation, but lacks details on permissions required, error conditions (e.g., if namespace doesn't exist), side effects, or response format. This leaves significant gaps for a mutation tool.

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, direct sentence with no wasted words. It front-loads the key information ('permanently deletes') and is appropriately sized for the tool's complexity.

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?

For a destructive mutation tool with no annotations, 0% schema coverage, and no output schema, the description is insufficient. It lacks details on parameters, error handling, prerequisites, and behavioral context, making it incomplete for safe and effective use by an AI agent.

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 but fails to do so. It mentions 'namespaceId' implicitly but doesn't explain its format or purpose. It omits 'tenantId' entirely, leaving both parameters undocumented. This is inadequate for a tool with two parameters.

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'), making the purpose unambiguous. However, it doesn't differentiate from sibling tools like 'deleteDocuments' or 'revokeConnection', which also perform deletion operations on different resources.

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?

No guidance is provided on when to use this tool versus alternatives. It doesn't mention prerequisites (e.g., whether the namespace must be empty), contrast with similar tools like 'deleteDocuments' or 'revokeConnection', or specify conditions under which deletion is appropriate.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.