Skip to main content
Glama
ZERONOVA LAB MCP Server

ZERONOVA LAB MCP Server

check_api_auth

Detect Next.js API routes lacking authentication checks and return unprotected file paths with fix snippets for Supabase Auth, NextAuth, or Passport.

Instructions

Check API route authentication in a Next.js project. Detects API routes (App Router route.ts, Pages Router pages/api/) without authentication middleware or session checks. Supports Next.js, Supabase Auth, NextAuth, and Passport patterns. Returns unprotected routes with file paths and fix code snippets.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "project_path": "<project_path>"
    },
    "name": "check_api_auth"
  }
}

Input Schema

NameRequiredDescriptionDefault
project_pathYesAbsolute path to the project directory to audit. Must be a directory you own or manage.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.6.0

TDQS

A3.9/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does well: it discloses what is inspected (route.ts and pages/api/ handlers), which auth patterns are recognized (NextAuth, Supabase Auth, Passport), and what the response contains (unprotected routes with file paths and fix code snippets). It stops short of stating that the tool is strictly read-only and does not modify files, which matters for an audit tool that emits 'fix code snippets'.

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?

Four short sentences: purpose first, then detection detail, then supported frameworks, then return shape. Every sentence adds information an agent would otherwise have to guess, and nothing is redundant.

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

Completeness5/5

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

For a single-parameter read-only audit with no output schema, the description supplies the missing pieces: what files are scanned, which auth libraries count as protection, and what the result contains. An agent can decide to call it and interpret the result without further information.

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?

There is a single parameter with 100% schema description coverage, so the schema already explains project_path as an absolute directory path that must be owned or managed. The description adds no additional meaning such as monorepo/subdirectory handling or behavior on an invalid path, so the baseline of 3 applies.

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?

Names a specific verb and resource: detect Next.js API routes lacking authentication middleware or session checks, including App Router route.ts and Pages Router pages/api/ locations. The resource is specific enough to be separable from security-check siblings like check_rls_config or check_injection_risk, but no sibling is named explicitly.

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

Usage Guidelines3/5

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

The audit scenario is implied by 'in a Next.js project' and the detection targets, which gives an agent enough to know the trigger context. However, there is no explicit when-not guidance, no statement of prerequisites (e.g., project must have Next.js pages/api or app routes), and no routing to related checks such as check_injection_risk or check_client_secrets.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.