Skip to main content
Glama

Renew session JWT (replace expired token)

post_sessions_renew_session_token

Verifies Firebase ID token. Parses sessionToken path segment as an internal SESSION JWT without enforcing JWT expiry (signature and tokenType=SESSION are still validated). Loads the session by id from the token subject; the Firebase UID must match the session owner. Increments tokenRevision on the server so previous session JWTs (same session id, older revision) are no longer accepted for GET/POST/DELETE /sessions/.... Returns a new sessionToken (with the new tokenRevision claim) and the current decrypted payload; extends server-side session expiry by 1 hour.

If the Firebase token includes email, the server best-effort backfills it on the session owner when the user row has no email yet (audit display only).

Use the path form POST /api/v1/sessions/renew/{sessionToken}URL-encode the JWT (e.g. encodeURIComponent in JS).

Source: POST /api/v1/sessions/renew/{sessionToken} Requires auth.firebaseToken and forwards it as a Bearer token. Prefer connection.workspaceName and connection.appId as stable config instead of generating identity fields dynamically.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
authNo
bodyNo
queryNo
paramsYes
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?

With no annotations provided, the description carries the full burden of behavioral disclosure. It does this exceptionally well by revealing that JWT expiry is not enforced, tokenRevision is incremented, previous session JWTs become invalid, server-side expiry is extended by 1 hour, and email backfill is best-effort. These are exactly the non-obvious side effects an agent needs to know.

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 dense but front-loaded with the core behavior, then covers side effects, return value, and invocation details. Almost every sentence adds necessary information, though the final note about preferring stable connection config is slightly tangential and could be integrated more cleanly.

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 complex tool with no annotations and no output schema, this description is highly complete. It covers authentication, token parsing and validation rules, side effects, return values, expiry extension, URL encoding, and required auth fields. An agent has enough context to invoke this tool correctly and anticipate its effects.

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?

Despite the schema coverage signal showing 0%, the description meaningfully explains the critical parameters: sessionToken is a potentially expired internal JWT in the path and must be URL-encoded, auth.firebaseToken is required and sent as a Bearer token. It also adds practical guidance about connection.workspaceName and connection.appId, going well beyond the bare 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?

The description clearly states a specific action: renew a session JWT by verifying a Firebase token, invalidating prior session tokens, and returning a new token. It explicitly differentiates what this tool does from sibling tools like post_sessions_revoke and post_sessions_revoke_session_id by focusing on token renewal rather than revocation.

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 explains the exact use case: replacing an expired session token while still validating the Firebase identity and session ownership. It also specifies the URL form and URL-encoding requirement, but it does not explicitly mention alternatives or when not to use this tool, so it stops short of full exclusion guidance.

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.