Skip to main content
Glama
TykanN

Swit MCP Server

by TykanN

swit-oauth-status

Check OAuth authentication status for the Swit MCP Server to verify access to Swit collaboration tools before performing workspace operations.

Instructions

Check OAuth authentication status

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handleOAuthStatus function that executes the core logic of the 'swit-oauth-status' tool by checking OAuth authentication status and returning relevant details.
    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.',
      };
    };
  • Input schema definition for the 'swit-oauth-status' tool (empty schema since no parameters required).
      name: 'swit-oauth-status',
      description: 'Check OAuth authentication status',
      inputSchema: zodToJsonSchema(EmptySchema),
    },
  • Registration of the 'swit-oauth-status' handler within the oauthHandlers factory function, which is later used in the main index.ts.
    export const oauthHandlers = (oauthWebServer: OAuthWebServer | null) => ({
      'swit-oauth-status': () => handleOAuthStatus(oauthWebServer),
      'swit-oauth-start': () => handleOAuthStart(oauthWebServer),
      'swit-oauth-logout': () => handleOAuthLogout(oauthWebServer),
    });
  • src/index.ts:62-63 (registration)
    Registration of tool schemas (including 'swit-oauth-status' from oauthTools) in the MCP server's listTools handler.
      return { tools: [...oauthTools, ...coreTools] };
    });
  • src/index.ts:109-109 (registration)
    Final dynamic registration of the oauthHandlers (including 'swit-oauth-status') into the MCP toolHandlers object after OAuth initialization.
    toolHandlers = { ...oauthHandlers(oauthWebServer), ...coreHandlers(switClient) };
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states the tool checks authentication status, implying a read-only operation, but doesn't disclose critical traits like what status information is returned (e.g., active, expired, scopes), error handling, or rate limits. For a tool with zero annotation coverage, this is inadequate.

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: 'Check OAuth authentication status'. It's front-loaded with the core purpose, has zero waste, and is appropriately sized for a simple tool. Every word earns its place.

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 (simple check) but lack of annotations and output schema, the description is incomplete. It doesn't explain what the check entails (e.g., returns boolean, status details, or error), nor does it provide context on OAuth flow integration. For a tool with no structured output documentation, the description should do more to clarify behavior.

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 0 parameters, and schema description coverage is 100%, so there are no parameters to document. The description doesn't need to add parameter semantics, and it appropriately doesn't mention any. Baseline is 4 for tools with no parameters, as there's nothing to compensate for.

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 tool's purpose as 'Check OAuth authentication status', which is a specific verb ('Check') and resource ('OAuth authentication status'). However, it doesn't differentiate from sibling tools like 'swit-oauth-start' or 'swit-oauth-logout', which are related to OAuth but serve different purposes. The description is clear but lacks sibling differentiation.

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. It doesn't mention prerequisites (e.g., whether OAuth must be initiated first), context (e.g., use before other operations), or exclusions. With sibling tools like 'swit-oauth-start' and 'swit-oauth-logout', this gap is significant as it leaves the agent guessing about appropriate usage scenarios.

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