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.6/5.0
Behavior5/5

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

With no annotations, the description carries the full behavioral burden and meets it thoroughly. It discloses side effects (tokenRevision increment invalidates older session JWTs), validation checks (signature, tokenType=SESSION, Firebase UID match), expiry extension, email backfill, and auth forwarding as Bearer.

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 path form, encoding, auth, and configuration. It is longer than a minimal description, but the extra sentences earn their place; only the final generic config sentence feels slightly tangential.

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 mutating auth operation with no output schema, the description is remarkably complete: it gives the path, HTTP method, auth requirement, URL-encoding, return values, side effects, and validity duration. An agent has enough to invoke it correctly without guessing.

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

Parameters4/5

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

The description adds important semantics beyond the schema: sessionToken must be URL-encoded in the path, may be expired, and is parsed without expiry enforcement; auth.firebaseToken is forwarded as a Bearer token. It could have also elaborated on connection.appId/workspaceName usage, but the schema descriptions cover those basics.

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 states a specific action: verify the Firebase ID token, consume an internal SESSION JWT from the sessionToken path segment, increment tokenRevision, and return a new sessionToken. It is clearly distinct from sibling tools like revoke or get_or_create because it focuses on replacing an existing token without enforcing JWT expiry.

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 makes the intended use apparent: renew an expired or expiring session JWT, since JWT expiry is explicitly not enforced and server-side expiry is extended by one hour. It does not explicitly name sibling alternatives or state when not to use it, but the context is clear enough for an agent to select it.

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.