Skip to main content
Glama

Get Kimi File Diff

kimi_get_diff
Read-onlyIdempotent

Retrieve the exact diff for one changed file in a Kimi session workspace. Use after a handoff or review identifies a modified path to get precise patch content without modifying the file.

Instructions

Read the diff for one file in a Kimi session workspace. Use after kimi_get_handoff or kimi_review_package identifies a changed path and exact patch content is needed. This is read-only; it does not modify the file or session. The path should refer to a file in the target session workspace.

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

A3.9/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true, idempotentHint=true, and destructiveHint=false. The description repeats this with 'This is read-only; it does not modify the file or session' but adds little beyond the annotations. It also adds the path scoping note, though that is more usage guidance than behavioral disclosure. No contradiction with annotations.

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. Purpose is front-loaded, usage context follows, and the safety/path caveat is last. Every sentence 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?

The tool has no output schema, so the description should explain what the agent will receive, but it never describes the return shape or content of the diff. It covers purpose, prerequisite tools, and read-only behavior, but omits return-value semantics. The tool is simple, so this is a moderate gap rather than a severe one.

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 both params have meaningful schema descriptions. The tool description adds only minor context by reminding that the path should be in the target session workspace and that diff content is expected. Since the schema already carries most parameter meaning, 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 states a specific verb and resource: 'Read the diff for one file in a Kimi session workspace.' It also clarifies the unit of work ('one file') and the need for 'exact patch content,' which helps distinguish it from sibling tools like kimi_get_handoff or kimi_review_package.

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?

The description gives explicit context: 'Use after kimi_get_handoff or kimi_review_package identifies a changed path and exact patch content is needed.' This clearly states when the tool is appropriate and names related tools. It does not explicitly discuss when not to use it or list alternative diff-retrieval paths, so it falls just 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.