Skip to main content
Glama
Zehee

Kimi Code Memory MCP Server

by Zehee

refine_session_turns

Converts verbose session logs into refined turn summaries, writing structured output to a file. Limit by turn count or specific IDs for focused memory refinement.

Instructions

Read a session wire.jsonl and generate Refined Turn Summaries. Output is written to refined/.jsonl.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNoOptional limit: refine only the most recent N turns
turnIdsNoOptional list of turnIds to refine
sessionIdNoSession identifier (default: current session)
session_idNoAlias for sessionId

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. First observedv0.4.2

TDQS

A3.7/5.0
Behavior3/5

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

With no annotations, the description must carry the behavioral burden. It does disclose a side effect: 'Output is written to refined/<sessionId>.jsonl' and implies the source file is only read. However, it does not mention whether the output file is overwritten or appended, what the tool returns, or any other side effects.

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?

Two sentences convey the action, input, and output destination without wasted words. The most important details are front-loaded, and each clause earns its place.

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?

For a tool with no annotations and no output schema, the description is adequate but has clear gaps: it does not describe the return value, file overwrite behavior, or what the refined JSONL will contain. The optional parameters are documented in the schema, so that part is covered.

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 100%, so the schema already explains each parameter. The description adds no parameter-level detail beyond naming the output path, which partially clarifies sessionId's role. No compensation is needed, but no bonus either.

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 states a specific verb-resource pairing: 'Read a session wire.jsonl' and 'generate Refined Turn Summaries.' It also names the output destination, clearly distinguishing this tool from siblings like load_turn_context and organize_memories. The action and artifact are unambiguous.

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?

The usage context is implied rather than explicit: use this when you need Refined Turn Summaries for a session. It does not state when to avoid this tool or mention alternatives, even though several siblings deal with session/memory context.

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

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/Zehee/kimi-code-memory-mcp-server'

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