Skip to main content
Glama

load_cross_session_context

Search every session in a project for query-matching turns and return recent matches, each tagged with its session ID for deep-linking.

Instructions

Search every session of one project and return the most important matching turns across all of them.

"Important" means: messages whose content matches search_query (case- insensitive substring), ranked by recency descending. Each result is annotated with the originating session_id so the dashboard can deep-link back. Requires CONTEXT_BROKER_CONTEXT_BACKEND=redis.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "load_cross_session_context"
  }
}

Input Schema

NameRequiredDescriptionDefault
top_kNo
project_rootNo
search_queryNo
per_session_limitNo

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.4.0

TDQS

A3.6/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 and does a good job: it discloses matching semantics (case-insensitive substring), ranking (recency descending), and result shape (each hit tagged with session_id). The backend requirement is an important operational caveat. It does not say what happens if the backend is not redis or how results are capped across sessions.

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?

Purpose is front-loaded in the first sentence, then the definition of 'important' and the operational requirement follow in a sensible order. The dashboard deep-link rationale is minor but justifies why session_id appears in results. The docstring-style backticks are slightly noisy but not wasteful.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

An output schema exists, so return values need not be explained. However, all four parameters are optional with empty-string defaults, and the description never says what an empty search_query or empty project_root means — a critical ambiguity for a search tool. Without annotations, a mutation-free read tool should also note cost or timeout behavior across many sessions.

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 0% across four parameters, so the description must compensate. It meaningfully defines search_query and the project scoping, but leaves top_k and per_session_limit entirely to their names and defaults, and never explains how the two limits interact.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/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: search across every session of one project and return the top matching turns. The scope (one project, all sessions) is explicit. It stops short of naming a sibling such as load_chat_context or search_context, so the agent must infer the distinction from the scope phrase alone.

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?

Usage is implied by the scope: use this when the target content may live in any session of a project rather than a single conversation. The one explicit prerequisite, CONTEXT_BROKER_CONTEXT_BACKEND=redis, is genuinely useful. No when-not-to-use guidance or named alternative is given, so sibling selection still relies on inference.

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