Skip to main content
Glama

trakt_get_auth_status

Verify Trakt.tv authentication status for your Plex account. Confirms whether the integration is active.

Instructions

Check Trakt.tv authentication status

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The actual implementation of trakt_get_auth_status handler. Calls this.traktClient.testConnection() and returns authentication status with user info if successful, or an error message if not.
    async traktGetAuthStatus(): Promise<Record<string, unknown>> {
      this.initializeTraktClient();
    
      try {
        const testResult = await this.traktClient.testConnection();
        
        if (testResult.success && testResult.user) {
          return {
            authenticated: true,
            user: {
              username: testResult.user.username,
              name: testResult.user.name,
              vip: testResult.user.vip,
              joined_at: testResult.user.joined_at
            },
            config: this.traktClient.getConfig(),
            message: 'Successfully authenticated with Trakt'
          };
        } else {
          return {
            authenticated: false,
            error: testResult.error,
            message: 'Not authenticated with Trakt. Use trakt_authenticate to set up.'
          };
        }
      } catch (error) {
        return {
          authenticated: false,
          error: error instanceof Error ? error.message : 'Authentication check failed'
        };
      }
    }
  • Input/output schema definition for trakt_get_auth_status tool. No input parameters, just checks auth status.
    {
      name: "trakt_get_auth_status",
      description: "Check Trakt.tv authentication status",
      inputSchema: { type: "object" as const, properties: {} },
    },
  • Registration of the tool in the tool registry, mapping 'trakt_get_auth_status' to the handler function traktFunctions.traktGetAuthStatus().
    registry.register("trakt_get_auth_status", () =>
      traktFunctions.traktGetAuthStatus().then(wrapResponse)
    );
  • Helper method initializeTraktClient() that sets up the TraktClient used by the handler, reading config from environment variables.
    private initializeTraktClient(): void {
      if (this.isInitialized) return;
    
      const config: TraktConfig = {
        baseUrl: process.env.TRAKT_BASE_URL || DEFAULT_TRAKT_API_URL,
        clientId: process.env.TRAKT_CLIENT_ID || '',
        clientSecret: process.env.TRAKT_CLIENT_SECRET || '',
        redirectUri: process.env.TRAKT_REDIRECT_URI || 'urn:ietf:wg:oauth:2.0:oob',
        accessToken: process.env.TRAKT_ACCESS_TOKEN,
        refreshToken: process.env.TRAKT_REFRESH_TOKEN
      };
    
      if (!config.clientId || !config.clientSecret) {
        throw new Error('TRAKT_CLIENT_ID and TRAKT_CLIENT_SECRET environment variables are required');
      }
    
      this.traktClient = new TraktClient(config);
      this.syncEngine = new TraktSyncEngine(this.traktClient, this.plexClient);
      this.isInitialized = true;
    }
Behavior1/5

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

No annotations provided, and the description offers no behavioral details beyond the action of checking. Important aspects like error handling, response format, or required prior steps are missing.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single concise sentence with no wasted words. However, it could be slightly expanded to include output or behavior without losing brevity.

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 no output schema, the description should clarify the return value or expected behavior. It does not, leaving the agent uncertain about what the tool returns or when to call it.

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?

Input schema has 0 parameters with 100% coverage, so there is no need for the description to add parameter details. Baseline score of 4 is appropriate.

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 tool's purpose with a specific verb 'Check' and resource 'Trakt.tv authentication status', distinguishing it from sibling tools like trakt_authenticate and trakt_get_sync_status.

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 on when to use this tool vs alternatives such as trakt_authenticate or trakt_get_sync_status. The description provides no context for selection.

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/niavasha/plex-mcp-server'

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