Skip to main content
Glama

filter_sessions

Filter AI coding sessions by metadata like date range, provider, model, project, language, or minimum tool-call counts. Retrieve exact matches from Postgres without semantic search.

Instructions

List sessions by metadata using authoritative Postgres filters, without semantic search.

Use when the user provides no semantic text query and instead asks for sessions in a date window or matching metadata such as provider, model, project, language, category, minimum turn/tool-call counts, or code changes. Do not invent search text for these requests and do not use this tool when the user asks for sessions similar to a topic; use search_sessions.

Use provider="codex" for Codex sessions whose stored model names are in the GPT family. date_from is inclusive and date_to is exclusive; both are YYYY-MM-DD ingestion dates. scope controls whose sessions are listed: "mine", "team", or "org". Omit it to use the widest scope permitted by the organization's sharing settings. Results are capped at 100.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNo
modelNo
scopeNo
date_toNo
languageNo
providerNo
date_fromNo
file_pathNo
min_turnsNo
model_familyNo
project_nameNo
min_tool_callsNo
has_code_changesNo
session_categoryNo
include_changed_filesNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Install Server

TDQS

A4.7/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 discloses result capping ('Results are capped at 100'), date inclusivity/exclusivity, default scope behavior, and the special provider='codex' mapping. It does not discuss ordering or output format, but an output schema exists and the tool is a read-style listing.

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 compact and front-loaded with the essential purpose. Every sentence adds distinct value: purpose, when to use, when not to use, special provider handling, date semantics, and scope behavior.

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?

For a 15-parameter filtering tool with no annotations and no schema descriptions, the description is unusually complete. It covers selection criteria, exclusion criteria, date/scope/provider nuances, and result limits; the existing output schema covers return shape.

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 explains the non-ovious semantics of scope, date_from/date_to, provider, and the minimum-count/code-change filters. It does not individually explain limit, file_path, model_family, or include_changed_files, but these are fairly inferable and the schema provides titles.

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 opens with a specific verb and resource: 'List sessions by metadata using authoritative Postgres filters, without semantic search.' It also explicitly distinguishes itself from the sibling search_sessions, so an agent can tell them apart without inspecting schemas.

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 provides explicit when-to-use guidance ('Use when the user provides no semantic text query...'), what not to do ('Do not invent search text'), and names the alternative tool for semantic-topic queries ('use search_sissions'). It also covers date semantics and scope behavior.

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

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/ReclaimLLM/RCLM'

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