revokeConnection
Remove integration with an external service by revoking access for a specific connection. Use this to terminate unwanted or inactive connections securely.
Instructions
Revokes access for a specific connection, removing the integration with the external service.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| connectionId | Yes | ||
| namespaceId | No | ||
| tenantId | No |
Implementation Reference
- src/sourcesync.ts:307-319 (handler)Core handler implementation in SourceSyncApiClient that sends POST request to /v1/connections/{connectionId}/revoke with namespaceId to revoke the connection.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/index.ts:716-732 (registration)MCP server.tool registration for 'revokeConnection', including input schema and thin handler that instantiates SourceSync client 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/schemas.ts:495-499 (schema)Zod schema defining input parameters for the revokeConnection tool: optional namespaceId, required connectionId, optional tenantId.export const RevokeConnectionSchema = z.object({ namespaceId: namespaceIdSchema.optional(), connectionId: z.string(), tenantId: tenantIdSchema, })
- src/sourcesync.types.ts:370-376 (schema)TypeScript type definitions for the SourceSync API request (namespaceId) and response (updated connection) used by the client.export type SourceSyncRevokeConnectionRequest = { namespaceId: string } export type SourceSyncRevokeConnectionResponse = SourceSyncApiResponse<{ connection: SourceSyncConnection }>