Skip to main content
Glama

getNamespace

Retrieve a specific namespace by its ID from SourceSync.ai's knowledge management platform to organize and access content in knowledge bases.

Instructions

Retrieves a specific namespace by its ID.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
namespaceIdNo
tenantIdNo

Implementation Reference

  • src/index.ts:160-174 (registration)
    Registration of the 'getNamespace' MCP tool, including the handler function that creates a SourceSync client and calls getNamespace on it.
    server.tool(
      'getNamespace',
      'Retrieves a specific namespace by its ID.',
      getNamespaceSchema.shape,
      async (params: GetNamespaceParams) => {
        return safeApiCall(async () => {
          const { namespaceId, tenantId } = params
    
          // Create a client with the provided API key
          const client = createClient({ namespaceId, tenantId })
    
          return await client.getNamespace()
        })
      },
    )
  • Zod schema defining input parameters for the getNamespace tool: namespaceId and optional tenantId.
    export const getNamespaceSchema = z.object({
      namespaceId: namespaceIdSchema,
      tenantId: tenantIdSchema,
    })
  • The handler function for the getNamespace tool, which extracts parameters, creates the client, and delegates to client.getNamespace() wrapped in safeApiCall.
    async (params: GetNamespaceParams) => {
      return safeApiCall(async () => {
        const { namespaceId, tenantId } = params
    
        // Create a client with the provided API key
        const client = createClient({ namespaceId, tenantId })
    
        return await client.getNamespace()
      })
  • Core implementation in SourceSyncApiClient that performs the HTTP GET request to fetch the namespace details from the API.
    public async getNamespace(): Promise<SourceSyncGetNamespaceResponse> {
      return this.client
        .url(`/v1/namespaces/${this.namespaceId}`)
        .get()
        .json<SourceSyncGetNamespaceResponse>()
    }
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states 'Retrieves', implying a read-only operation, but doesn't clarify permissions, rate limits, error handling, or response format. For a tool with no annotation coverage, this leaves significant gaps in understanding how it behaves beyond basic functionality.

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 directly states the tool's purpose without unnecessary words. It is front-loaded with the core action and resource, making it easy to parse quickly. Every part of the sentence contributes essential information.

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 the complexity (2 parameters, no annotations, no output schema), the description is insufficient. It doesn't explain what a namespace is, what data it returns, or how parameters interact. For a retrieval tool in a system with many siblings, more context is needed to ensure the agent can use it correctly without trial and error.

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 for undocumented parameters. It mentions 'namespaceId' but not 'tenantId', leaving one parameter unexplained. The description adds minimal semantic context beyond the schema, failing to clarify parameter relationships (e.g., if tenantId is optional or required with namespaceId).

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 ('Retrieves') and resource ('a specific namespace by its ID'), making the purpose unambiguous. It distinguishes from siblings like 'listNamespaces' by specifying retrieval of a single namespace rather than listing multiple. However, it doesn't explicitly mention what a namespace contains or its context, leaving some room for improvement.

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 'listNamespaces' or 'getConnection'. It doesn't mention prerequisites (e.g., needing a namespace ID), exclusions, or typical use cases. Without such context, the agent must infer usage from the tool name and parameters alone.

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