Skip to main content
Glama

Set a value inside the session payload

post_sessions_set_key

Sets a key in the encrypted session payload and returns the updated decrypted payload. If the JSON body is { "value": <x> }, the server unwraps it and stores <x> directly.

Source: POST /api/v1/sessions/set/{key} 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
bodyYesJSON body can be either `{ "value": <x> }` (preferred) or a raw JSON value.
queryNo
paramsYes
connectionYes

Schema Changelog

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

  1. First observed

TDQS

A3.9/5.0
Behavior4/5

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

With no annotations, the description carries the full burden of behavioral disclosure. It reveals that the payload is encrypted, that the body is unwrapped when sent as { "value": <x> }, that the response is the updated decrypted payload, and that auth.sessionToken is forwarded as a Bearer token. This goes well beyond the name and schema, though it does not discuss overwrite semantics, persistence, or error conditions.

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 concise and front-loaded with the core behavior, then adds the body format, source route, auth requirement, and a config best practice. Each sentence earns its place; only the 'Prefer connection.workspaceName...' sentence is slightly tangential but still useful. No filler or redundancy.

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 state-changing tool with five parameters and no output schema, the description covers the essential call semantics: what is set, how the body is interpreted, what authentication is needed, and what is returned. It could additionally describe when to prefer get/delete siblings, but the provided context is sufficient for basic correct invocation.

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 only 20%, so the description needs to compensate. It does add meaning by explaining the body { "value": <x> } unwrapping and identifying params.key as the payload key, and it clarifies the auth token requirement. However, other parameters such as connection.host and query are left to the schema or undocumented, so coverage remains partial.

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 the action: 'Sets a key in the encrypted session payload and returns the updated decrypted payload.' This is specific about the verb, resource, and side effect, and it distinguishes the tool from sibling get_sessions_get_key and delete_sessions_delete_key. The body-unwrapping detail further clarifies exactly what the tool does.

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

Usage Guidelines3/5

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

The description implies usage: use this when you need to set a key in the session payload. It provides some contextual guidance by requiring auth.sessionToken and recommending stable connection.workspaceName/appId fields, but it does not explicitly contrast with sibling get/delete tools or state when-not-to-use it. The guidance is more about configuration than tool selection.

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.