Skip to main content
Glama
contextstream

ContextStream MCP Server

Initialize conversation session

init

Initialize a conversation session with automatic context retrieval, including workspace info, recent memory, decisions, and relevant context. Pass the user's first message as context_hint for semantic search.

Instructions

Initialize a new conversation session and automatically retrieve relevant context. This is the FIRST tool AI assistants should call when starting a conversation. Returns: workspace info, project info, recent memory, recent decisions, relevant context, high-priority lessons, and ingest_recommendation.

The ingest_recommendation field indicates if the project needs indexing for code search:

  • If [INGEST_RECOMMENDED] appears, ask the user if they want to enable semantic code search

  • Benefits: AI-powered code understanding, dependency analysis, better context retrieval

  • If user agrees, run: project(action="ingest_local", path="<project_path>")

IMPORTANT: Pass the user's FIRST MESSAGE as context_hint to get semantically relevant context! Example: init(folder_path="/path/to/project", context_hint="how do I implement auth?")

This does semantic search on the first message. You only need context on subsequent messages.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
folder_pathNoCurrent workspace/project folder path (absolute). Use this when IDE roots are not available.
workspace_idNoWorkspace to initialize context for
project_idNoProject to initialize context for
session_idNoCustom session ID (auto-generated if not provided)
context_hintNoRECOMMENDED: Pass the user's first message here for semantic search. This finds relevant context from ANY time, not just recent items.
include_recent_memoryNoInclude recent memory events (default: true)
include_decisionsNoInclude recent decisions (default: true)
auto_indexNoAutomatically create and index project from IDE workspace (default: true)
allow_no_workspaceNoIf true, allow session_init to return connected even if no workspace is resolved (workspace-level tools may not work).
skip_project_creationNoIf true, skip automatic project creation/matching. Use for parent folders containing multiple projects where you want workspace-level context but no project-specific context.
is_post_compactNoSet true immediately after context compaction to restore snapshots/transcripts when hooks are unavailable. Can also be enabled by CONTEXTSTREAM_RESTORE_CONTEXT=true.
Behavior5/5

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

Discloses automatic context retrieval, return fields, semantic search behavior, and actions for ingest_recommendation. No contradictions with annotations.

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?

Front-loaded with core purpose and usage, then structured details on returns, ingest_recommendation, and context_hint. No unnecessary sentences; each sentence adds value.

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 11 parameters and no output schema, the description explains return values and usage patterns thoroughly, covering all necessary context for agent decision-making.

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 coverage is 100% with descriptions for all 11 parameters. The description adds value beyond schema, especially for context_hint and ingest_recommendation, but baseline 3 is appropriate; extra context warrants a 4.

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 initializes a conversation session and retrieves relevant context. It is distinguished as the first tool to call, setting it apart from sibling tools like 'session'.

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?

Explicitly states precedence: 'This is the FIRST tool AI assistants should call'. Provides examples and instructions on when to pass context_hint and how to handle ingest_recommendation, offering clear when-to and how-to 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/contextstream/mcp-server'

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