Skip to main content
Glama

getConnection

Retrieve details for a specific connection by its ID in SourceSync.ai's knowledge management platform to organize, ingest, retrieve, and search content.

Instructions

Retrieves details for a specific connection by its ID.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
namespaceIdNo
connectionIdYes
tenantIdNo

Implementation Reference

  • MCP tool registration and handler function for 'getConnection'. Creates a SourceSyncApiClient instance and invokes its getConnection method to retrieve connection details by ID.
    server.tool(
      'getConnection',
      'Retrieves details for a specific connection by its ID.',
      GetConnectionSchema.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.getConnection({
            connectionId,
          })
        })
      },
    )
  • Zod schema defining the input parameters for the getConnection tool: optional namespaceId, required connectionId, optional tenantId.
    export const GetConnectionSchema = z.object({
      namespaceId: namespaceIdSchema.optional(),
      connectionId: z.string(),
      tenantId: tenantIdSchema,
    })
  • SourceSyncApiClient.getConnection method implementation. Makes a GET request to the SourceSync API endpoint `/v1/connections/{connectionId}` with namespaceId query param to fetch connection details.
    public async getConnection({
      connectionId,
    }: SourceSyncGetConnectionRequest): Promise<SourceSyncGetConnectionResponse> {
      return this.client
        .url(`/v1/connections/${connectionId}`)
        .query({ namespaceId: this.namespaceId })
        .get()
        .json<SourceSyncGetConnectionResponse>()
    }
  • TypeScript type definitions for the SourceSync API getConnection request and response structures.
    export type SourceSyncGetConnectionRequest = {
      connectionId: string
    }
    
    export type SourceSyncGetConnectionResponse = 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 but only mentions retrieval without disclosing behavioral traits like authentication needs, rate limits, error handling, or response format. It lacks details on whether this is a read-only operation, what permissions are required, or how it behaves with invalid IDs.

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 without unnecessary words. Every part earns its place, making it highly concise and well-structured for quick understanding.

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 the tool's complexity (3 parameters, no annotations, no output schema), the description is incomplete. It doesn't cover parameter meanings, behavioral context, or return values, leaving significant gaps for an agent to use it effectively in a server with many sibling tools.

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?

The schema has 0% description coverage for its 3 parameters, and the description adds no semantic information beyond implying 'connectionId' is required. It doesn't explain what 'namespaceId' or 'tenantId' are, their relationships, or when they're needed, failing to compensate for the low schema coverage.

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 ('Retrieves details') and resource ('for a specific connection by its ID'), making the purpose unambiguous. However, it doesn't differentiate from sibling tools like 'listConnections' or 'getNamespace', which would require explicit comparison for a score of 5.

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?

No guidance is provided on when to use this tool versus alternatives like 'listConnections' for browsing or 'getNamespace' for namespace details. The description only states what it does, not when it's appropriate, leaving the agent to infer usage context.

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