Skip to main content
Glama
scmdr

SourceSync.ai MCP Server

by scmdr

validateApiKey

Verify API key validity for SourceSync.ai by testing access to list namespaces, ensuring proper authentication for knowledge management operations.

Instructions

Validates the API key by attempting to list namespaces. Returns the list of namespaces if successful.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The inline handler function that executes the validateApiKey tool logic. It creates a SourceSync client using environment variables and calls listNamespaces to validate the API key, wrapped in safeApiCall for error handling.
    async (params: ValidateApiKeyParams) => {
      return safeApiCall(async () => {
        // Create a client with the provided API key
        const client = createClient({})
    
        // Validate the API key by listing namespaces
        // @ts-ignore - Ignoring type error for now to focus on error handling
        return await client.listNamespaces()
      })
    },
  • src/index.ts:111-125 (registration)
    Registration of the validateApiKey tool on the MCP server, including name, description, input schema, and handler function.
    server.tool(
      'validateApiKey',
      'Validates the API key by attempting to list namespaces. Returns the list of namespaces if successful.',
      validateApiKeySchema.shape,
      async (params: ValidateApiKeyParams) => {
        return safeApiCall(async () => {
          // Create a client with the provided API key
          const client = createClient({})
    
          // Validate the API key by listing namespaces
          // @ts-ignore - Ignoring type error for now to focus on error handling
          return await client.listNamespaces()
        })
      },
    )
  • Zod schema for validateApiKey tool input parameters, defined as an empty object since no parameters are required.
    export const validateApiKeySchema = z.object({})
Behavior3/5

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

With no annotations provided, the description carries full burden. It discloses the validation method (list namespaces attempt) and conditional return behavior (list if successful), which are useful behavioral traits. However, it doesn't mention error handling, rate limits, authentication requirements beyond the API key, or what 'successful' entails beyond returning a list.

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?

Two concise sentences front-load the purpose and outcome with zero waste. Every word earns its place: first sentence defines the action and method, second specifies the return value conditionally. No fluff or repetition.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's low complexity (no parameters, simple validation purpose) and lack of annotations/output schema, the description is reasonably complete. It explains what the tool does and what it returns, though it could benefit from more behavioral context like error scenarios. For a validation tool, this covers the essentials.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

There are 0 parameters, and schema description coverage is 100% (though schema is empty). The description doesn't need to compensate for missing parameter info. It appropriately focuses on the tool's purpose without redundant parameter explanations, earning a baseline 4 for zero-parameter tools.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the specific action ('validates the API key') and method ('by attempting to list namespaces'), distinguishing it from siblings like 'listNamespaces' which just lists namespaces without validation. It explicitly mentions the resource involved (API key) and the outcome (returns list of namespaces if successful).

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage context: to verify API key validity, likely as an initial setup or diagnostic step. It doesn't explicitly state when NOT to use it or name alternatives, but the context is clear enough for an agent to infer this is for validation rather than operational tasks like data ingestion or search.

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

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