Skip to main content
Glama

Session login callback (redirect)

auth_session_callback

Browser redirect endpoint used after hosted /app/sessions/login. No Authorization header.

  1. Verifies firebaseToken (Firebase ID token).

  2. Ensures client_redirect_uri is allowlisted for app_id (same rules as validate-redirect).

  3. Create vs renew: If session_token is absent, reuses the newest active session for (workspace_name, Firebase UID, app_id) or creates one (get-or-create). Optional payload (URL-encoded JSON object, default {}) is stored only on create — ignored when reusing an existing session. If session_token is present (previous session JWT, may be expired), renews that session; payload must not be sent on the same request. Optional ttl_seconds applies to both paths (default 0 = unlimited; otherwise 60–604800). When the Firebase token includes email, the server best-effort persists or backfills it on the workspace end-user row (audit display only).

  4. Responds with 302 Found to client_redirect_uri with query params sessionToken and, if provided, state.

If client_redirect_uri is not allowed for app_id, responds 400 and does not redirect (open-redirect mitigation). Other failures return an HTTP error status with a JSON {"status", "error"} body and do not redirect.

Source: GET /api/v1/auth/callback No Authorization header is required. Prefer connection.workspaceName and connection.appId as stable config instead of generating identity fields dynamically.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
authNo
bodyNo
queryYes
paramsNo
connectionYes

Schema Changelog

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

  1. First observed

TDQS

A4.7/5.0
Behavior5/5

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

No annotations are present, so the description carries full burden, and it does so richly: explains 302 redirect with sessionToken/state, 400 on non-allowlisted redirect URI, no redirect on errors, create-vs-renew logic, payload ignored on renew, ttl_seconds default/range, and best-effort email backfill. This goes far beyond a simple action statement.

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?

Structured with numbered steps and bolded terms, and the essential endpoint context is front-loaded. Minor redundancy ('No Authorization header' appears twice) and the length is long, but each paragraph earns its place given the tool's complexity.

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 tool with no output schema and no annotations, the description is exceptionally complete: it covers required parameters, optionals, constraints, error responses, redirection behavior, and configuration guidance. An agent has everything needed to select and call it correctly.

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?

Even though schema coverage is 0%, the description explains all key parameters and their interplay: payload only on create and must not combine with session_token, ttl_seconds range and default, session_token renewal semantics, client_redirect_uri allowlisting, and response query params. This is substantial added meaning beyond the raw schema.

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?

States a specific verb and resource: 'Browser redirect endpoint used after hosted /app/sessions/login.' It clearly delineates the tool's role in the auth flow (callback after login), and the emphasis on no Authorization header distinguishes it from direct API session tools. The create-vs-renew explanation further clarifies its scope.

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?

Provides clear context: explicitly says it is for the browser redirect after hosted login, that no Authorization header is used, and recommends using connection.workspaceName/appId as stable config. It does not explicitly name when-not-to-use alternatives, but the context is unmistakable.

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

A3.7/5.0
Disambiguation2/5

Several tools cover nearly identical actions with subtle differences: post_sessions, post_sessions_get_or_create, and post_sessions_renew_session_token all create/reuse sessions; get_auth_logout and post_auth_logout both log out; and the two revoke endpoints overlap heavily. An agent would struggle to pick the correct variant without reading detailed descriptions.

Naming Consistency2/5

Naming mixes HTTP-verb prefixes (get_, post_, delete_) with domain-specific verbs (auth_session_callback, secureflows_build_login_url), and get_sessions_get_key is redundant and awkward. The pattern is inconsistent across the set even though individual chunks are readable.

Tool Count3/5

18 tools is on the heavy side for what is essentially session lifecycle management plus a few helper utilities. Many tools could be consolidated (e.g., one logout tool, one revoke tool, one key-access pattern), making the surface feel fragmented.

Completeness4/5

The session lifecycle is well covered: create, renew, revoke, logout, get payload, set/delete keys, identity, and self-service listing are all present. Minor gaps include no direct TTL adjustment after creation and no admin-level session management, but the core workflows are complete.