Skip to main content
Glama

listNamespaces

Retrieve available namespaces for organizing content in SourceSync.ai knowledge bases using your API key and tenant ID.

Instructions

Lists all namespaces available for the current API key and optional tenant ID.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
tenantIdNo

Implementation Reference

  • MCP tool handler for 'listNamespaces'. Creates a SourceSync client using the provided tenantId and delegates to client.listNamespaces(), wrapped in safeApiCall for error handling.
    server.tool(
      'listNamespaces',
      'Lists all namespaces available for the current API key and optional tenant ID.',
      listNamespacesSchema.shape,
      async (params: ListNamespacesParams) => {
        return safeApiCall(async () => {
          const { tenantId } = params
    
          // Create a client with the provided API key
          const client = createClient({ tenantId })
    
          return await client.listNamespaces()
        })
      },
    )
  • Zod schema defining the input parameters for the listNamespaces tool (optional tenantId).
    export const listNamespacesSchema = z.object({
      tenantId: tenantIdSchema,
    })
  • SourceSyncApiClient.listNamespaces() method implementation, which makes a GET request to /v1/namespaces to retrieve the list of namespaces.
    public async listNamespaces(): Promise<SourceSyncListNamespacesResponse> {
      return this.client
        .url('/v1/namespaces')
        .get()
        .json<SourceSyncListNamespacesResponse>()
    }
  • TypeScript type for the response of listNamespaces API call.
    export type SourceSyncListNamespacesResponse = SourceSyncApiResponse<
      SourceSyncNamespace[]
    >
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It states it's a list operation, implying read-only behavior, but doesn't cover critical aspects like pagination, rate limits, authentication requirements beyond the API key mention, error conditions, or return format. For a tool with zero annotation coverage, this leaves significant gaps in understanding its behavior.

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 that front-loads the core purpose ('Lists all namespaces') and adds necessary context without waste. Every word earns its place, making it 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.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's low complexity (1 optional parameter, no output schema, no annotations), the description is minimally adequate. It covers the basic purpose and parameter context but lacks details on behavior, output, or usage guidelines. With no annotations to fill gaps, it should do more to be fully complete, but it meets the baseline for a simple list tool.

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

Parameters4/5

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

The description adds meaningful context for the single parameter by explaining that 'tenantId' is optional and relates to filtering namespaces 'available for the current API key and optional tenant ID'. Since schema description coverage is 0% (the schema only specifies type without description), this compensates well, though it could specify format or constraints to reach a 5.

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 verb ('Lists') and resource ('all namespaces') with scope ('available for the current API key and optional tenant ID'), making the purpose specific and understandable. However, it doesn't explicitly differentiate from sibling tools like 'getNamespace' or 'createNamespace', which would require a 5.

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 like 'getNamespace' (for a single namespace) or 'listConnections' (for a different resource). It mentions the 'optional tenant ID' parameter but doesn't explain when it should or shouldn't be used, leaving usage context implied at best.

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