Skip to main content
Glama

Find Recent Kimi Session

kimi_find_recent_session
Read-onlyIdempotent

Search recent Kimi sessions by title substring, filtered by status or working directory, to recover a session when its exact ID is unknown.

Instructions

Find raw Kimi sessions whose titles contain a requested substring, optionally filtered by status and working directory. Use this only when the exact session is unknown and durable recovery through kimi_recent_jobs is unavailable or insufficient. Once a session is identified, prefer sessionId-based tools. Discovery does not grant ownership; session-oriented tools still enforce durable ownership when configured. This tool does not create or modify a session.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
cwdNoOptional working directory used to constrain matches to the same workspace. Recommended for safe recovery/dedupe.
statusNoOptional exact Kimi session-status filter, such as running, idle, awaiting_approval, awaiting_question, aborted, or failed.
pageSizeNoMaximum number of recent sessions to inspect. Defaults to 20.
matchAnyCwdNoSet true only when intentionally allowing a title match from any working directory. Defaults to false when cwd is provided.
excludeEmptyNoWhether sessions with no messages should be excluded from the search.
titleContainsYesCase-insensitive substring that must appear in the Kimi session title. Leading and trailing whitespace is ignored.
includeArchiveNoWhether archived Kimi sessions should be included in the search.
includeSummaryNoFetch message count and latest meaningful user/assistant messages for candidates. Adds latency; leave false unless recovery context is needed.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed8 schema fields changedv0.3.2
    • addedInput schema / properties / cwd / description
      Added value: +"Optional working directory used to constrain matches to the same workspace. Recommended for safe recovery/dedupe."
    • addedInput schema / properties / excludeEmpty / description
      Added value: +"Whether sessions with no messages should be excluded from the search."
    • addedInput schema / properties / includeArchive / description
      Added value: +"Whether archived Kimi sessions should be included in the search."
    • addedInput schema / properties / includeSummary / description
      Added value: +"Fetch message count and latest meaningful user/assistant messages for candidates. Adds latency; leave false unless recovery context is needed."
    • addedInput schema / properties / matchAnyCwd / description
      Added value: +"Set true only when intentionally allowing a title match from any working directory. Defaults to false when cwd is provided."
    • addedInput schema / properties / pageSize / description
      Added value: +"Maximum number of recent sessions to inspect. Defaults to 20."
    • addedInput schema / properties / status / description
      Added value: +"Optional exact Kimi session-status filter, such as running, idle, awaiting_approval, awaiting_question, aborted, or failed."
    • addedInput schema / properties / titleContains / description
      Added value: +"Case-insensitive substring that must appear in the Kimi session title. Leading and trailing whitespace is ignored."
  2. First observedv0.3.0

TDQS

A4.7/5.0
Behavior5/5

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

Annotations establish read-only/idempotent/non-destructive safety, and the description reinforces this with 'does not create or modify a session.' It also adds a non-obvious behavioral caveat: discovery does not grant ownership and session-oriented tools still enforce durable ownership.

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?

Four lean sentences arranged by function, usage, ownership caveat, and non-mutation. Every sentence adds a distinct piece of guidance without padding.

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 a rich schema, read-only annotations, and sibling context, the description covers purpose, precise invocation conditions, ownership behavior, and side-effect-free behavior. Nothing critical is missing for correct selection and use.

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 coverage is 100%, so the schema fully describes all 8 parameters and the description need not repeat them. The description adds only general context that results can be filtered by status and cwd, which is already evident from 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?

Names a specific action ('Find') and resource ('raw Kimi sessions') with an explicit matching criterion (title substring) and optional filters. Distinguishes itself by saying it is for when the exact session is unknown and contrasts with kimi_recent_jobs and sessionId-based tools.

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?

Gives explicit when-to-use: only when exact session is unknown and durable recovery via kimi_recent_jobs is unavailable or insufficient. Also states what to do after identification (prefer sessionId-based tools), so an agent knows both when and when not to invoke it.

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