Skip to main content
Glama

Static-scan generated code for secureFlows anti-patterns

secureflows_lint_integration

Checks source you already generated against the secureFlows integration rules. Needs no secureFlows token; safe at scaffolding time. Pass every auth/session-related file in one call — some checks are evaluated across the whole set.

Two kinds of findings: • scope "file" — a forbidden construct is present (localStorage token, legacy /app/login, fetch-based logout, client-side JWT decode, empty catch, restore non-auth errors clearing session UI, Continue CTA gated on null session, ...), reported at an exact file:line. • scope "project" — REQUIRED handling is missing everywhere you passed in: detecting 401/410 but never clearing the token, never handling 403, or handling 403 without the BILLING_GRACE_LOCK carve-out. These are the defects that actually dominate real generated apps, and no "forbidden pattern" check can see them, because the bug is an absence.

Heuristic text analysis, not a parser or a type checker. It can miss things it has no rule for, and a project check can be satisfied by the right keyword in the wrong place. It is a fast first pass — not a substitute for the Agent implementation checklist in SKILL.md, and specifically not for the checks that need a running app (auth-guard mount races, the fresh-reload check). Fix every "error" before calling an integration done; treat "needs_review" as a lead.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
filesYesMap of relative file path -> full file source to scan, e.g. { "src/lib/secureflows.js": "..." }

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. First observed

TDQS

A5/5.0
Behavior5/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. It clearly discloses that this is heuristic text analysis, not a parser or type checker, that it can miss issues, and that project-scope findings are absence-based rather than forbidden patterns. It also explains the error vs needs_review handling.

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?

Although the description is long, every section earns its place: the first paragraph states purpose and usage, the second details finding scopes, and the third covers limitations and actionability. The most important constraints are front-loaded.

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?

The description is complete for a static linter with one parameter and no output schema. It explains input, finding categories, limitations, and expected action on results. An agent has enough context to invoke it correctly and interpret its output.

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

Parameters5/5

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

The schema already documents the files map well, but the description adds critical semantic context: cross-file evaluation means callers must pass the whole auth/session-related file set in one call. It also clarifies the practical meaning of the input ('source you already generated') beyond bare schema types.

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 opens with a specific verb and resource: 'Checks source you already generated against the secureFlows integration rules.' It clearly distinguishes itself from sibling tools like auth_session_callback and secureflows_build_login_url, which are runtime/auth tools rather than static analysis.

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

Usage Guidelines5/5

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

Explicitly states when it is safe and appropriate ('Needs no secureFlows token; safe at scaffolding time'), how to batch input ('Pass every auth/session-related file in one call'), and what it is not for ('not a substitute for the Agent implementation checklist... not for the checks that need a running app').

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

TDQS

A4/5.0
Disambiguation4/5

Most tools target distinct session/auth operations, and the descriptions clearly separate browser redirects from API endpoints. The main ambiguity is between get_sessions and get_sessions_my (payload vs. list) and the two logout variants, though the docs disambiguate them.

Naming Consistency4/5

API tools consistently use snake_case `{method}_{resource}_{action}` names, but a few deviate: `auth_session_callback` lacks the method prefix, `get_sessions_get_key`/`delete_sessions_delete_key` are redundant, and the `secureflows_*` helpers use a different prefix. Still readable and predictable.

Tool Count4/5

18 tools is slightly above the sweet spot, but the count is justified by distinct session lifecycle operations, auth redirects, and integration helpers. Only `get_docs_search` feels peripheral to the core session domain.

Completeness5/5

The surface covers session create, get-or-create, read, key-level update/delete, renew, revoke, logout, identity, and self-service listing/revocation, plus login/logout URL builders and linting. No important dead ends for the stated auth/session purpose.