Skip to main content
Glama
nahmanmate

Better Auth MCP Server

by nahmanmate

analyze_logs

Analyze authentication logs to identify security issues and system errors within a specified time range for Better Auth MCP Server.

Instructions

Analyze Better-Auth logs for issues

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
timeRangeYesTime range to analyze (e.g. '24h', '7d')

Implementation Reference

  • The handler function for the 'analyze_logs' tool. It extracts the 'timeRange' parameter, logs the analysis start, and returns a textual response indicating log analysis completion (placeholder implementation).
    case "analyze_logs": {
      const { timeRange } = request.params.arguments as { timeRange: string };
      logger.info(`Analyzing logs for time range: ${timeRange}`);
      // Implementation would analyze Better-Auth logs
      return {
        content: [{
          type: "text",
          text: `Log analysis complete for time range: ${timeRange}`
        }]
      };
    }
  • src/index.ts:169-182 (registration)
    Tool registration in the ListTools response, defining the name, description, and input schema for 'analyze_logs'.
    {
      name: "analyze_logs",
      description: "Analyze Better-Auth logs for issues",
      inputSchema: {
        type: "object",
        properties: {
          timeRange: {
            type: "string",
            description: "Time range to analyze (e.g. '24h', '7d')"
          }
        },
        required: ["timeRange"]
      }
    },
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 mentions analyzing logs for issues but doesn't specify what the tool returns (e.g., error summaries, patterns), whether it's read-only or has side effects, or any operational constraints like rate limits or authentication needs. This leaves significant gaps in understanding the tool's behavior.

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, efficient sentence that states the tool's purpose without unnecessary words. It is front-loaded and appropriately sized for a basic tool, though it could be more informative without sacrificing conciseness.

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 lack of annotations and output schema, the description is incomplete. It doesn't explain what the analysis entails, what types of issues are detected, or the format of results. For a tool with one parameter but no structured output information, more context is needed to understand its full functionality and use cases.

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

Parameters3/5

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

The input schema has 100% description coverage, clearly documenting the 'timeRange' parameter. The description adds no additional meaning beyond the schema, such as examples of issues analyzed or how the time range affects results. With high schema coverage, the baseline score of 3 is appropriate as the description doesn't enhance parameter understanding.

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

Purpose3/5

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

The description states the tool 'Analyze Better-Auth logs for issues', which provides a clear verb ('analyze') and resource ('Better-Auth logs'), but lacks specificity about what constitutes 'issues' or how the analysis is performed. It doesn't differentiate from siblings like 'analyze_current_auth' or 'monitor_auth_flows', leaving the scope vague.

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 guidance is provided on when to use this tool versus alternatives such as 'analyze_current_auth' or 'monitor_auth_flows'. The description implies usage for log analysis but offers no context about prerequisites, exclusions, or specific scenarios where this tool is preferred over others.

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/nahmanmate/better-auth-mcp-server'

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