Skip to main content
Glama

get_state

Inspect the current stateful session data stored in Redis for a specific project and sessionKey. Returns the full JSON state object containing 'request' (last captured request snapshot), 'response' (last captured response snapshot), and any custom variables saved via stateCaptureVariables or set_state. Use this tool after firing test_mock on a stateful endpoint (or after calling set_state) to verify that stateCaptureExpr and stateCaptureVariables saved the expected values before testing downstream mocks that rely on stateLookupExpr.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "projectSlug": "<projectSlug>",
      "sessionKey": "<sessionKey>"
    },
    "name": "get_state"
  }
}

Input Schema

NameRequiredDescriptionDefault
sessionKeyYesExact resolved session key under which state was captured or set (e.g. user email, order_id, or auth token).
projectSlugYesUnique slug of the project workspace (obtain from list_projects, e.g. 'u2uwqsy4').

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • changedInput schema / properties / projectSlug / description
      Previous value: -"Project slug to inspect state for"New value: +"Unique slug of the project workspace (obtain from list_projects, e.g. 'u2uwqsy4')."
    • changedInput schema / properties / sessionKey / description
      Previous value: -"The exact session key resolved via stateLookupExpr/stateCaptureExpr"New value: +"Exact resolved session key under which state was captured or set (e.g. user email, order_id, or auth token)."
  2. First observed

TDQS

A4.4/5.0
Behavior4/5

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

With no annotations, the description carries the disclosure burden and does so for return content and intended call ordering. It falls short on operational details — whether this is strictly read-only, what happens when no state exists for the sessionKey, and whether there are retention/TTL limits on the Redis entry.

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 lead sentence front-loads the action and scope, followed by return shape and usage. It is slightly dense with internal identifier names (stateCaptureExpr, stateCaptureVariables, stateLookupExpr), but each clause contributes actionable information.

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?

There is no output schema, so the description compensates by describing the JSON returned. Combined with the workflow placement relative to test_mock and set_state, an agent has everything needed to call and interpret this tool.

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 100%, so both projectSlug and sessionKey are already documented with examples and provenance. The description only reinforces that sessionKey is the key under which state was captured or set, which adds marginal meaning beyond the 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 states a specific verb and resource ('Inspect the current stateful session data stored in Redis for a specific project and sessionKey') and even enumerates the returned structure ('request', 'response', custom variables). It is immediately distinguishable from siblings like set_state, delete_state, and debug_last_request.

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 explicit when-to-use guidance: after firing test_mock on a stateful endpoint or after set_state, and before testing downstream mocks that rely on stateLookupExpr. Named alternatives (stateCaptureExpr, stateCaptureVariables, stateLookupExpr) supply the surrounding workflow context.

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.

Resources