Skip to main content
Glama

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
NameRequiredDescriptionDefault
namespaceIdNo
connectionIdYes
tenantIdNo

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,
          })
        })
      },
    )
  • 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,
        })
      })
    },
  • Zod input schema for revokeConnection tool parameters
    export const RevokeConnectionSchema = z.object({
      namespaceId: namespaceIdSchema.optional(),
      connectionId: z.string(),
      tenantId: tenantIdSchema,
    })
  • 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>()
    }
  • TypeScript type definitions for SourceSyncRevokeConnectionRequest and Response used by the client method.
    export type SourceSyncRevokeConnectionRequest = {
      namespaceId: string
    }
    
    export type SourceSyncRevokeConnectionResponse = SourceSyncApiResponse<{
      connection: SourceSyncConnection
    }>

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

C2.8/5.0
Behavior2/5

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

With no annotations provided, the description carries full burden. It mentions 'revokes access' and 'removing integration', implying a destructive operation, but lacks details on permissions needed, whether it's reversible, rate limits, or what happens to associated data. This is a significant gap for a mutation tool.

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 with zero waste. It's appropriately sized and front-loaded, clearly stating the tool's purpose without unnecessary elaboration.

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?

For a mutation tool with 3 parameters, 0% schema coverage, no annotations, and no output schema, the description is incomplete. It lacks details on behavioral traits, parameter meanings, and expected outcomes, making it inadequate for safe and effective use.

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. It mentions 'specific connection' which hints at 'connectionId', but doesn't explain the purpose of 'namespaceId' or 'tenantId', or clarify that only 'connectionId' is required. The description adds minimal value beyond the schema.

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 ('revokes access') and resource ('specific connection'), explaining it removes integration with an external service. However, it doesn't explicitly differentiate from sibling tools like 'deleteNamespace' or 'updateConnection' which might also affect connections.

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 'deleteNamespace' or 'updateConnection', nor does it mention prerequisites or exclusions. It states what the tool does but not when it's appropriate.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.