Skip to main content
Glama

get_session_context

Retrieve stored session constraints, decisions, and patterns so analysis stays consistent with previously agreed rules.

Instructions

Get session context (constraints, decisions, patterns) for context-aware analysis.

Returns session memory that can be included when asking personas to analyze queries. This ensures consistency with previous decisions and agreed patterns.

MCP Design Philosophy: This tool returns session memory as data. The LLM includes this context when analyzing queries to ensure consistency with previous decisions.

Args: session_id: Session identifier project_root: Optional project root for local sessions

Returns: JSON with session constraints, patterns, and recent decisions

Example: # Get session context context = get_session_context(session_id="my-project")

# LLM includes this when asking persona to analyze:
# "Given these constraints: ..., analyze this query"

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
session_idNodefault
project_rootNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/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 clearly states the tool returns session memory as data, avoiding any implication of side effects, and specifies the return format as JSON with constraints, patterns, and decisions. However, it omits details about error conditions (e.g., nonexistent session) or permission requirements, which would enhance transparency.

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

Conciseness5/5

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

The description is well-structured and front-loaded with the core purpose. The additional sections (Args, Returns, Example, Design Philosophy) are each concise and contribute directly to understanding usage. No sentence is wasted, and the length is appropriate given the lack of schema descriptions and annotations.

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?

Given the tool's low complexity (2 optional parameters) and the presence of an output schema, the description is thorough. It covers purpose, usage, parameter meaning, return values, and an example. It also explains the intended integration with personas, making it fully sufficient for an agent to select and invoke the tool correctly.

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?

Schema description coverage is 0%, so the description must compensate. It provides brief but meaningful semantics: session_id is the session identifier, and project_root is an optional project root for local sessions. This adds context beyond the raw schema types and defaults, though it could elaborate further on accepted formats or behaviors.

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 tool gets session context (constraints, decisions, patterns) for context-aware analysis. This specific resource listing distinguishes it from sibling tools like get_session_summary or get_engineering_context, making its purpose unambiguous.

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?

The description explicitly explains when to use the tool: to ensure consistency with previous decisions and agreed patterns. It goes further to describe the MCP design philosophy and provides a concrete example of how the returned context should be included in prompts to personas, offering clear usage guidance.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/amarodeabreu/sensei-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server