Skip to main content
Glama

Delegate Kimi Task and Wait

kimi_delegate_and_wait
Destructive

Start a Kimi task and block until it becomes idle, fails, or times out, returning handoff/review data on idle. For long-running work, delegate to get a durable jobId immediately.

Instructions

Start a Kimi task and wait until it becomes idle, blocked, failed, aborted, or the caller wait times out. Use this when the caller can remain connected for the expected task duration; prefer kimi_delegate_task for long-running work so the durable jobId is returned immediately. When durable jobs are configured, the result includes jobId. Idle results include handoff and review data; timeout does not abort the underlying Kimi session. After a client-side timeout or disconnect, use kimi_recent_jobs to recover the existing job rather than submitting the task again.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
cwdYesWorking directory visible to the Kimi runtime. In the managed hosted deployment use /workspace; local desktop paths are not automatically available to the remote runtime.
planYesOrdered implementation or analysis steps Kimi should follow. For swarm work, use distinct non-conflicting scopes that can be delegated to workers.
taskYesConcrete objective for Kimi to execute. Include the requested outcome and relevant constraints.
depthNoResearch depth: quick (one source per item), standard (default; one or two authoritative sources, gaps marked not documented), deep (cross-checked, thorough).
modelNoConfigured Kimi model alias. In the managed ai& deployment omit this field to use the centrally configured model binding; do not pass a raw provider model ID unless Kimi exposes it as an alias.
dedupeNoOptional duplicate-session guard. When supplied, the bridge searches recent sessions before creating a new session and may reuse a compatible match.
thinkingNoOptional Kimi thinking setting. Omit to use the bridge default; the managed pilot is configured for high thinking.
sessionIdNoExisting Kimi session ID to submit into. Omit for a fresh session; fresh sessions are recommended for new swarm jobs.
swarmModeNoSet true to activate and verify Kimi native swarm mode before prompt submission. When true, the result includes structured swarmEvidence when Kimi wire records are available.
timeoutMsNoMaximum time in milliseconds to wait for this call. A timeout returns control without aborting the Kimi session, so the same session can be waited on later.
acceptanceCriteriaYesVerifiable conditions that define successful completion. Pass an empty array only when there are genuinely no explicit acceptance checks.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.5.1
    • addedInput schema / properties / depth
      Added value: +{
      +  "description": "Research depth: quick (one source per item), standard (default; one or two authoritative sources, gaps marked not documented), deep (cross-checked, thorough).",
      +  "enum": [
      +    "quick",
      +    "standard",
      +    "deep"
      +  ],
      +  "type": "string"
      +}
  2. Changed18 schema fields changedv0.3.2
    • addedInput schema / properties / acceptanceCriteria / description
      Added value: +"Verifiable conditions that define successful completion. Pass an empty array only when there are genuinely no explicit acceptance checks."
    • addedInput schema / properties / cwd / description
      Added value: +"Working directory visible to the Kimi runtime. In the managed hosted deployment use /workspace; local desktop paths are not automatically available to the remote runtime."
    • addedInput schema / properties / dedupe / description
      Added value: +"Optional duplicate-session guard. When supplied, the bridge searches recent sessions before creating a new session and may reuse a compatible match."
    • addedInput schema / properties / dedupe / properties / excludeEmpty / description
      Added value: +"Whether sessions with no messages should be excluded from the dedupe search."
    • addedInput schema / properties / dedupe / properties / includeArchive / description
      Added value: +"Whether archived sessions should be included in the dedupe search."
    • addedInput schema / properties / dedupe / properties / includeSummary / description
      Added value: +"Fetch recent user/assistant summary data for candidate sessions. Adds latency; leave false for normal dedupe checks."
    • addedInput schema / properties / dedupe / properties / matchAnyCwd / description
      Added value: +"Set true only when intentionally allowing reuse from a different working directory. Defaults to false for workspace safety."
    • addedInput schema / properties / dedupe / properties / pageSize / description
      Added value: +"Maximum number of recent sessions to inspect for a title match. Defaults to 20."
    • addedInput schema / properties / dedupe / properties / reuseIfStatus / description
      Added value: +"Statuses the caller permits for reuse. The bridge still only auto-reuses running, idle, awaiting_approval, and awaiting_question sessions."
    • addedInput schema / properties / dedupe / 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 / dedupe / properties / titleContains / description
      Added value: +"Case-insensitive substring used to find an existing recent session before creating a new one. Use a task-specific title fragment."
    • addedInput schema / properties / model / description
      Added value: +"Configured Kimi model alias. In the managed ai& deployment omit this field to use the centrally configured model binding; do not pass a raw provider model ID unless Kimi exposes it as an alias."
    • addedInput schema / properties / plan / description
      Added value: +"Ordered implementation or analysis steps Kimi should follow. For swarm work, use distinct non-conflicting scopes that can be delegated to workers."
    • addedInput schema / properties / sessionId / description
      Added value: +"Existing Kimi session ID to submit into. Omit for a fresh session; fresh sessions are recommended for new swarm jobs."
    • addedInput schema / properties / swarmMode / description
      Added value: +"Set true to activate and verify Kimi native swarm mode before prompt submission. When true, the result includes structured swarmEvidence when Kimi wire records are available."
    • addedInput schema / properties / task / description
      Added value: +"Concrete objective for Kimi to execute. Include the requested outcome and relevant constraints."
    • addedInput schema / properties / thinking / description
      Added value: +"Optional Kimi thinking setting. Omit to use the bridge default; the managed pilot is configured for high thinking."
    • addedInput schema / properties / timeoutMs / description
      Added value: +"Maximum time in milliseconds to wait for this call. A timeout returns control without aborting the Kimi session, so the same session can be waited on later."
  3. First observedv0.3.0

TDQS

A4.6/5.0
Behavior5/5

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

The description goes well beyond the annotations by explaining timeout semantics ('timeout does not abort the underlying Kimi session'), durable jobId inclusion, and idle-result content such as handoff and review data. It also clarifies that a client-side disconnect does not destroy the underlying job, which is valuable behavioral context an agent would otherwise not know.

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 three dense sentences with every sentence earning its place: the first defines behavior, the second gives usage guidance and sibling differentiation, and the third covers timeout recovery and result contents. It is front-loaded with the core action and avoids repetition of schema details.

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 an 11-parameter tool with no output schema, the description provides strong context by explaining when to use it, what happens on timeout, and how to recover a job. It does not enumerate result shapes for blocked/failed/aborted statuses, but enough is specified for an agent to invoke the tool and handle the common recovery path.

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% and the input schema already provides detailed explanations for cwd, plan, task, dedupe, timeoutMs, and others. The description adds no extra parameter-level semantics beyond what the schema already documents, so the baseline of 3 is appropriate.

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 precise verb+resource statement: 'Start a Kimi task and wait until it becomes idle, blocked, failed, aborted, or the caller wait times out.' It also distinguishes itself from kimi_delegate_task by noting the waiting behavior and immediate jobId return differences, so an agent can clearly tell which tool to select.

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?

Usage conditions are explicit: this tool is for cases where the caller can remain connected for the expected duration, while kimi_delegate_task is preferred for long-running work. It also gives a recovery instruction after timeout or disconnect, directing the caller to kimi_recent_jobs instead of resubmitting.

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