Skip to main content
Glama

Wait for Kimi Session

kimi_wait_until_idle
Read-onlyIdempotent

Poll a Kimi session until idle, awaiting approval/question, failed, or aborted. Return normalized status and pending data without aborting or modifying the session.

Instructions

Poll an owned Kimi session until it is idle, awaiting approval, awaiting a question, failed, aborted, or the caller wait times out. Use the sessionId returned by delegation or recovered through kimi_recent_jobs. Returns normalized status and pending approval/question data when applicable. A timeout only ends this wait attempt; it does not abort the Kimi session or mark the durable job timed out. This tool does not modify workspace content.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sessionIdYesKimi session ID returned by delegation or session-discovery tools.
timeoutMsNoMaximum time in milliseconds to poll before returning timeout. Timeout does not abort or otherwise mutate the session.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv0.3.2
    • addedInput schema / properties / sessionId / description
      Added value: +"Kimi session ID returned by delegation or session-discovery tools."
    • addedInput schema / properties / timeoutMs / description
      Added value: +"Maximum time in milliseconds to poll before returning timeout. Timeout does not abort or otherwise mutate the session."
  2. First observedv0.3.0

TDQS

A4.3/5.0
Behavior5/5

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

Beyond the readOnly/idempotent/destructive annotations, the description discloses meaningful behavior: a timeout only ends the wait attempt without aborting the session or marking the durable job timed out, and pending approval/question data is returned when applicable. These details align with the annotations, so there is no contradiction.

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?

The description is front-loaded with the core polling purpose and terminal states, and most sentences add unique value such as timeout semantics and return content. The final sentence about not modifying workspace content partially duplicates the readOnlyHint annotation, so it is not perfectly lean.

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

Completeness4/5

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

For a two-parameter poll tool with no output schema, the description adequately covers sessionId provenance, terminal states, timeout behavior, and return content. The exact shape or error signaling of 'normalized status' is underspecified, but an agent has enough information to invoke the tool correctly.

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 already documents both sessionId and timeoutMs, including the non-mutating timeout behavior. The description adds only marginal provenance guidance by naming kimi_recent_jobs as a recovery path, which the schema already implies via 'session-discovery tools'.

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 ('Poll') and a specific resource (an owned Kimi session), and enumerates the exact terminal states. It distinguishes itself from sibling discovery/delegation/abort tools by describing the wait/poll role and by referencing session IDs from delegation or kimi_recent_jobs.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It gives clear usage context: the sessionId must come from delegation or be recovered through kimi_recent_jobs, and it clarifies that a timeout is not an abort or a durable-job failure. It does not explicitly name alternatives like kimi_delegate_and_wait or state when not to use the tool, so it stops short of a 5.

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