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

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

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