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
    }>
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It states it 'retrieves details,' implying a read-only operation, but doesn't specify if it requires authentication, has rate limits, or what details are returned. For a tool with 3 parameters and no output schema, this is insufficient behavioral context.

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 no wasted words. It's front-loaded with the core action and resource, making it easy to parse quickly.

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 complexity (3 parameters, no annotations, no output schema), the description is incomplete. It doesn't explain the return values, parameter interactions, or behavioral traits like error handling. For a retrieval tool in a context with many sibling tools, more detail is needed to guide 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 for undocumented parameters. It only mentions 'ID' (likely referring to 'connectionId'), ignoring 'namespaceId' and 'tenantId'. This leaves two parameters unexplained, failing to add meaningful semantics beyond the minimal 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 ('Retrieves details') and resource ('for a specific connection by its ID'), making the purpose understandable. However, it doesn't differentiate from sibling tools like 'listConnections' or 'getNamespace', which would require mentioning it fetches a single connection rather than listing multiple.

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 such as 'listConnections' for multiple connections or 'getNamespace' for namespace details. It lacks context about prerequisites or exclusions, leaving the agent to infer usage from the name alone.

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

Install Server

Other Tools

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

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