revokeConnection
Remove integration with an external service by revoking access for a specific connection in the SourceSync.ai knowledge management platform.
Instructions
Revokes access for a specific connection, removing the integration with the external service.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| namespaceId | No | ||
| connectionId | Yes | ||
| tenantId | No |
Implementation Reference
- src/index.ts:716-732 (registration)Registration of the MCP tool 'revokeConnection' including inline handler function that creates SourceSyncApiClient and calls its revokeConnection method
server.tool( 'revokeConnection', 'Revokes access for a specific connection, removing the integration with the external service.', RevokeConnectionSchema.shape, async (params) => { return safeApiCall(async () => { const { namespaceId, tenantId, connectionId } = params // Create a client with the provided API key const client = createClient({ namespaceId, tenantId }) return await client.revokeConnection({ connectionId, }) }) }, ) - src/index.ts:720-731 (handler)Handler function for revokeConnection tool: extracts params, creates client using createClient helper, calls client.revokeConnection
async (params) => { return safeApiCall(async () => { const { namespaceId, tenantId, connectionId } = params // Create a client with the provided API key const client = createClient({ namespaceId, tenantId }) return await client.revokeConnection({ connectionId, }) }) }, - src/schemas.ts:495-499 (schema)Zod input schema for revokeConnection tool parameters
export const RevokeConnectionSchema = z.object({ namespaceId: namespaceIdSchema.optional(), connectionId: z.string(), tenantId: tenantIdSchema, }) - src/sourcesync.ts:307-319 (helper)SourceSyncApiClient.revokeConnection: makes POST request to SourceSync API /v1/connections/{connectionId}/revoke with namespaceId
public async revokeConnection({ connectionId, }: Omit<SourceSyncRevokeConnectionRequest, 'namespaceId'> & { connectionId: string }): Promise<SourceSyncRevokeConnectionResponse> { return this.client .url(`/v1/connections/${connectionId}/revoke`) .json({ namespaceId: this.namespaceId, } satisfies SourceSyncRevokeConnectionRequest) .post() .json<SourceSyncRevokeConnectionResponse>() } - src/sourcesync.types.ts:370-376 (schema)TypeScript type definitions for SourceSyncRevokeConnectionRequest and Response used by the client method.
export type SourceSyncRevokeConnectionRequest = { namespaceId: string } export type SourceSyncRevokeConnectionResponse = SourceSyncApiResponse<{ connection: SourceSyncConnection }>