Skip to main content
Glama

Get signed-in user's stable id and email (app UI, backend correlation)

get_sessions_identity

Returns the workspace end-user's userId and email for the authenticated session token. Does not return Firebase UID or session payload.

userId is a stable, opaque identifier for this person across sessions and logins — it is not derived from Firebase. Use it as the correlation key when your own backend needs to link an external event (e.g. a billing provider webhook you receive and verify yourself) back to this user. Do not use the session token or session id for this — sessions expire and rotate, userId does not.

Email is best-effort from hosted login (Firebase email claim persisted on the user row). When unknown, email is null. Browser SDK: secureflows-js fetchSessionIdentity(token) (≥ 0.1.15 for userId).

Source: GET /api/v1/sessions/identity Requires auth.sessionToken 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
paramsNo
connectionYes

Schema Changelog

Changes observed during successful MCP inspections.

  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, the description carries the full behavioral burden and meets it: it states return values, explicitly lists what is not returned, discloses that `email` is best-effort and may be `null`, and reveals the auth mechanism. This goes well beyond a simple one-line tool description.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is front-loaded with the core return and is well organized, but it is long and includes the somewhat tangential closing sentence about preferring `connection.workspaceName` and `connection.appId` as stable config. Several sentences are valuable, but not every sentence fully earns its place for a simple identity lookup.

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 read-only identity lookup with no output schema or annotations, the description is complete: return semantics, null behavior, auth requirement, source endpoint, SDK path, and exclusions are all covered. An agent has enough context to invoke it correctly for the described correlation use case.

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?

Despite the reported low schema coverage, the description meaningfully documents the key parameters: `auth.sessionToken` is required and sent as Bearer, and `connection.workspaceName`/`appId` are referenced for stable config. It leaves body/query/params implied (they are empty in the schema) and doesn't explicitly map every field, so a small gap remains.

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?

Description opens with the concrete action — returning the authenticated user's `userId` and `email` — and names the exact resource (`GET /api/v1/sessions/identity`). It also differentiates from the many session siblings by explicitly saying it does not return Firebase UID or session payload, so an agent won't confuse it with session listing/renewal tools.

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?

It gives a clear when-to-use: use `userId` as the stable correlation key when a backend must link an external event back to a user. It also gives a when-not-to: do not use session token or session id because they expire and rotate, and it requires `auth.sessionToken` which it sends as a Bearer token.

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.