Skip to main content
Glama
TykanN

Swit MCP Server

by TykanN

swit-oauth-status

Verify OAuth authentication status for the Swit MCP Server integration to confirm if it is properly authenticated and ready.

Instructions

Check OAuth authentication status

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handler function (handleOAuthStatus) that executes the 'swit-oauth-status' tool logic. It checks OAuth authentication status and returns whether the user is authenticated, the status message, the web server URL, and a contextual message.
    export const handleOAuthStatus = async (oauthWebServer: OAuthWebServer | null) => {
      const isAuthenticated = oauthWebServer?.isAuthenticated() || false;
      const port = process.env.OAUTH_PORT || '3000';
    
      return {
        authenticated: isAuthenticated,
        status: isAuthenticated ? 'Authenticated' : 'Authentication required',
        webServerUrl: oauthWebServer ? `http://localhost:${port}` : null,
        message: isAuthenticated
          ? 'OAuth authentication completed. Swit API is ready to use.'
          : 'OAuth authentication required. Use swit-oauth-start tool to begin authentication.',
      };
    };
  • The tool schema definition for 'swit-oauth-status'. It registers the tool name, description ('Check OAuth authentication status'), and an empty input schema (no parameters required).
    {
      name: 'swit-oauth-status',
      description: 'Check OAuth authentication status',
      inputSchema: zodToJsonSchema(EmptySchema),
  • src/index.ts:109-109 (registration)
    Where the tool handler is registered into the toolHandlers map: oauthHandlers(oauthWebServer) is spread into toolHandlers, which includes the 'swit-oauth-status' handler.
    toolHandlers = { ...oauthHandlers(oauthWebServer), ...coreHandlers(switClient) };
  • src/index.ts:61-62 (registration)
    The ListToolsRequestSchema handler that returns the list of all tools, including oauthTools (which contains 'swit-oauth-status') registered with the MCP server.
    server.setRequestHandler(ListToolsRequestSchema, async () => {
      return { tools: [...oauthTools, ...coreTools] };
  • The oauthHandlers factory function that maps 'swit-oauth-status' to the handleOAuthStatus function, connecting the tool name to its implementation.
    export const oauthHandlers = (oauthWebServer: OAuthWebServer | null) => ({
      'swit-oauth-status': () => handleOAuthStatus(oauthWebServer),
      'swit-oauth-start': () => handleOAuthStart(oauthWebServer),
      'swit-oauth-logout': () => handleOAuthLogout(oauthWebServer),
    });
Behavior2/5

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

With no annotations provided, the description carries full burden for behavioral disclosure. It does not state that the tool is read-only, idempotent, or what the output represents (e.g., token expiry, user info). The minimal description leaves the agent guessing about side effects.

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, concise sentence that clearly communicates the tool's purpose. No wasted words; every part earns its place.

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

Completeness3/5

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

Given the simplicity of the tool (no parameters, no output schema), the description is minimally adequate. However, it fails to describe what the status response contains, which would be helpful for an agent interpreting the result.

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?

The tool has zero parameters and schema coverage is 100%. Per the calibration, baseline for 0 params is 4. The description adds no parameter information, but none is needed.

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 verb 'Check' and resource 'OAuth authentication status'. It effectively distinguishes from sibling tools like swit-oauth-start and swit-oauth-logout, which handle initiation and logout respectively.

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 explicit guidance is provided on when to use this tool versus alternatives. While the purpose is clear, the description lacks any context about prerequisites or scenarios where checking status is appropriate.

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/TykanN/swit-mcp'

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