Skip to main content
Glama

Build secureFlows hosted login URL

secureflows_build_login_url

Builds a correct hosted-login redirect URL. Needs no secureFlows token — safe to call at app-scaffolding time, before any user session exists, which is the phase most secureFlows integration mistakes happen in.

Always targets /app/sessions/login (session apps). Never builds the legacy /app/login console URL, which returns a firebaseToken your SecureFlowsCallback handler cannot consume and causes an infinite redirect loop.

Use this instead of hand-building the URL with URLSearchParams — hand-built login URLs are the #1 source of the login-loop and stale-renewal bugs documented in SKILL.md.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
appIdYesApp id from the human prompt ("appId = ...")
intentNofresh_login: normal sign-in, or app-load restore with no prior token (default — almost always correct, including after an explicit sign-out). renew_expired_token: ONLY when resuming the SAME still-intended user after a soft token expiry (401/410) while staying logged in — never after Sign out.fresh_login
originNosecureFlows origin — always https://www.secure-flows.com in productionhttps://www.secure-flows.com
redirectUriYesThe app's unguarded /callback URL, built from the published/allowlisted app origin — never from an iframe or editor chrome origin.
expiredTokenNoThe old sessionToken to renew. Only read when intent=renew_expired_token. Setting this after an explicit sign-out is the "send a dead JWT into hosted login" anti-pattern — it breaks renewal when the underlying identity changed.
workspaceNameYesWorkspace name from the human prompt ("workspace = ...")

Schema Changelog

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

  1. First observed

TDQS

A4.4/5.0
Behavior5/5

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

With no annotations provided, the description takes on full behavioral disclosure and does it well. It reveals that no token is required, that the tool targets the session-login endpoint, that it never returns a legacy firebaseToken, and that using the wrong URL causes an infinite redirect loop. These are meaningful behavioral traits beyond simply "builds a URL."

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 compact and front-loaded with the core purpose. Every sentence earns its place: safety timing, endpoint selection, legacy-URL risk, and the hand-building pitfall. There is no filler or repetition.

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

Completeness4/5

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

For a 6-parameter tool with no output schema and no annotations, the description is largely complete: it covers when to call it, why it is safe, what endpoint it targets, and what failure mode it prevents. The only minor gap is that it never explicitly states the return value is the redirect URL string, although that is strongly implied by "Builds a correct hosted-login redirect URL."

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?

Schema description coverage is 100%, and the schema itself already provides rich parameter explanations, including intent semantics, origin constraints, and expiredToken warnings. The description adds high-level context but does not materially extend the per-parameter meaning, so the baseline score of 3 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 starts with a specific verb and resource: "Builds a correct hosted-login redirect URL." It further distinguishes itself by stating it "Always targets /app/sessions/login" and explicitly "Never builds the legacy /app/login console URL," which separates it clearly from secureflows_build_logout_url and prevents confusion with legacy alternatives.

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

Usage Guidelines4/5

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

The description gives a clear when: "safe to call at app-scaffolding time, before any user session exists." It also names the common alternative mistake, "hand-building the URL with URLSearchParams," and tells the agent to use this tool instead. It does not explicitly list exclusions such as "use secureflows_build_logout_url for logout," but the context and sibling names make the intended usage fairly clear.

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.