Skip to main content
Glama

listConnections

Retrieve all configured data source connections for your knowledge base, with optional filtering by specific cloud storage providers like Notion or Google Drive.

Instructions

Lists all connections for the current namespace, optionally filtered by connector type.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
namespaceIdNo
connectorNo
tenantIdNo

Implementation Reference

  • MCP tool handler function for 'listConnections'. Parses params, creates SourceSyncApiClient, and calls its listConnections method.
    async (params: any) => {
      return safeApiCall(async () => {
        const { namespaceId, connector, tenantId } = params
    
        // Create a client with the provided parameters
        const client = createClient({ namespaceId, tenantId })
    
        // Call the listConnections method with the connector as enum if provided
        return await client.listConnections({
          connector: connector || undefined,
        })
      })
    },
  • src/index.ts:658-675 (registration)
    Registers the 'listConnections' tool with the MCP server, including description, input schema, and handler.
    server.tool(
      'listConnections',
      'Lists all connections for the current namespace, optionally filtered by connector type.',
      ListConnectionsSchema.shape,
      async (params: any) => {
        return safeApiCall(async () => {
          const { namespaceId, connector, tenantId } = params
    
          // Create a client with the provided parameters
          const client = createClient({ namespaceId, tenantId })
    
          // Call the listConnections method with the connector as enum if provided
          return await client.listConnections({
            connector: connector || undefined,
          })
        })
      },
    )
  • Zod schema defining input parameters for the listConnections tool: optional namespaceId, connector, and tenantId.
    export const ListConnectionsSchema = z.object({
      namespaceId: namespaceIdSchema.optional(),
      connector: ConnectorEnum.optional(),
      tenantId: tenantIdSchema,
    })
  • SourceSyncApiClient method that performs the actual API call to list connections via GET /v1/connections with namespaceId and optional connector query params.
    public async listConnections({
      connector,
    }: SourceSyncListConnectionsRequest): Promise<SourceSyncListConnectionsResponse> {
      return this.client
        .url('/v1/connections')
        .query({ namespaceId: this.namespaceId, connector })
        .get()
        .json<SourceSyncListConnectionsResponse>()
    }
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 only states it's a list operation with optional filtering. It doesn't disclose behavioral traits like whether it's read-only (implied but not stated), pagination, rate limits, authentication needs, or what 'current namespace' means contextually. For a tool with no annotations, 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 connections') and adds optional detail ('optionally filtered by connector type'). There's no wasted text, and it's appropriately sized for a list operation.

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 parameter coverage (0% schema description, only 1 of 3 params mentioned in description), the description is incomplete. It doesn't explain return values, error conditions, or the context of 'current namespace' versus parameters like 'namespaceId'. For a tool with three parameters and no structured documentation, this is inadequate.

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 only mentions 'connector type' filtering, which corresponds to the 'connector' parameter with enum values. It doesn't explain 'namespaceId' or 'tenantId' parameters, leaving two of three parameters undocumented. The description adds minimal value beyond what the schema's enum suggests for one parameter.

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 ('connections for the current namespace'), with optional filtering by connector type. It distinguishes from siblings like 'getConnection' (singular) and 'createConnection' (write operation). However, it doesn't explicitly differentiate from other list operations like 'listNamespaces' beyond the resource name.

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 list connections, optionally filtered by type, but provides no explicit guidance on when to use this versus alternatives like 'getConnection' for a specific connection or 'createConnection' for creating new ones. It mentions filtering capability but doesn't specify scenarios where filtering is beneficial.

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