Skip to main content
Glama

Get Kimi File Diff

kimi_get_diff
Read-onlyIdempotent

Get the exact diff for a file in a Kimi session workspace. Use after a changed path is identified to retrieve the patch content for that file. Read-only, does not modify state.

Instructions

Read the diff for one file in an owned Kimi session workspace. Use after kimi_get_handoff or kimi_review_package identifies a changed path and exact patch content is needed. Returns the requested path and diff content. This tool is read-only and does not modify the file, session, or durable job state.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYesWorkspace-relative file path whose diff should be returned. Prefer a path reported by kimi_get_handoff or kimi_review_package.
sessionIdYesKimi session ID that owns the workspace/file change.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv0.3.2
    • addedInput schema / properties / path / description
      Added value: +"Workspace-relative file path whose diff should be returned. Prefer a path reported by kimi_get_handoff or kimi_review_package."
    • addedInput schema / properties / sessionId / description
      Added value: +"Kimi session ID that owns the workspace/file change."
  2. First observedv0.3.0

TDQS

A4.5/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint, and destructiveHint, so the safety profile is known. The description adds value by explicitly stating what is not modified—file, session, or durable job state—and by clarifying the return behavior (requested path and diff content), which goes beyond the generic annotation hints.

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 sentences with no filler. It front-loads the action, then provides the trigger context, the expected return, and the safety guarantee. Every sentence earns its place.

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 simple two-parameter read-only tool with no output schema, the description covers the purpose, when to call it, what it returns, and its side-effect behavior. There is no meaningful gap that would prevent an agent from invoking it 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?

The input schema already provides 100% description coverage for both sessionId and path, including guidance to prefer paths from kimi_get_handoff or kimi_review_package. The tool description adds no additional parameter-level meaning beyond the schema, so the baseline score of 3 applies.

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 names a specific verb ('Read the diff') and a specific resource ('for one file in an owned Kimi session workspace'). It clearly distinguishes the tool as the diff-reading step after kimi_get_handoff or kimi_review_package, so an agent can identify what it does without needing to open the schema.

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 gives explicit when-to-use guidance: after kimi_get_handoff or kimi_review_package identifies a changed path, when exact patch content is needed. This tells the agent the preceding steps and the condition that should trigger this tool, which is strong contextual usage guidance.

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