Skip to main content
Glama
scmdr

SourceSync.ai MCP Server

by scmdr

listNamespaces

Retrieve available namespaces for your SourceSync.ai API key to organize and access knowledge management content.

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 function that creates a SourceSync client and calls its listNamespaces method, wrapped in safeApiCall for error handling.
    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()
      })
    },
  • src/index.ts:144-158 (registration)
    Registration of the 'listNamespaces' MCP tool using server.tool, including name, description, input schema, and handler.
    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 listNamespaces tool (optional tenantId).
    export const listNamespacesSchema = z.object({
      tenantId: tenantIdSchema,
    })
  • SourceSyncApiClient method that performs the actual HTTP GET request to /v1/namespaces to list namespaces.
    public async listNamespaces(): Promise<SourceSyncListNamespacesResponse> {
      return this.client
        .url('/v1/namespaces')
        .get()
        .json<SourceSyncListNamespacesResponse>()
    }
Behavior2/5

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

With no annotations provided, the description carries full burden but offers minimal behavioral insight. It mentions the tool lists namespaces 'available for the current API key and optional tenant ID', hinting at authentication and scoping, but lacks details on permissions, rate limits, pagination, or response format. This is inadequate for a tool with zero annotation coverage.

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 no wasted words. It front-loads the core purpose ('Lists all namespaces') and includes essential context about API key and tenant ID, making it appropriately sized and well-structured.

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 no annotations, no output schema, and low schema coverage, the description is incomplete. It lacks details on behavioral traits (e.g., read-only nature, error handling), parameter specifics, and return values, making it insufficient for an agent to fully understand tool usage in this context.

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

Parameters3/5

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

The description adds some meaning by noting 'tenantId' is optional and used for scoping namespaces, which the schema (0% coverage) does not specify. However, with only one parameter and low schema coverage, the description compensates partially but doesn't fully explain the parameter's purpose or format beyond basic optionality.

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 ('Lists') and resource ('all namespaces'), specifying scope ('available for the current API key and optional tenant ID'). It distinguishes from siblings like 'getNamespace' (singular) and 'createNamespace' (write operation), but doesn't explicitly contrast with other list operations like 'listConnections'.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage when needing to enumerate namespaces, mentioning the optional 'tenantId' parameter. However, it provides no explicit guidance on when to use this versus alternatives like 'getNamespace' for specific namespace details or 'createNamespace' for creating new ones, nor does it mention prerequisites or exclusions.

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

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